[SCSI] lpfc 8.1.1 : Add polled-mode support
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / scsi / lpfc / lpfc.h
index adb95674823fb86e45dfb28b4f6a4aa4c285dd23..1f3873ae9d682b3dfefc36820041a4ddcdd55fa6 100644 (file)
@@ -45,6 +45,11 @@ struct lpfc_sli2_slim;
 
 #define MAX_HBAEVT     32
 
+enum lpfc_polling_flags {
+       ENABLE_FCP_RING_POLLING = 0x1,
+       DISABLE_FCP_RING_INT    = 0x2
+};
+
 /* Provide DMA memory definitions the driver uses per port instance. */
 struct lpfc_dmabuf {
        struct list_head list;
@@ -167,6 +172,7 @@ struct lpfc_hba {
        dma_addr_t slim2p_mapping;
        uint16_t pci_cfg_value;
 
+       struct semaphore hba_can_block;
        uint32_t hba_state;
 
 #define LPFC_INIT_START           1    /* Initial state after board reset */
@@ -267,10 +273,6 @@ struct lpfc_hba {
        struct lpfc_nodelist fc_fcpnodev; /* nodelist entry for no device */
        uint32_t nport_event_cnt;       /* timestamp for nlplist entry */
 
-#define LPFC_RPI_HASH_SIZE     64
-#define LPFC_RPI_HASH_FUNC(x)  ((x) & (0x3f))
-       /* ptr to active D_ID / RPIs */
-       struct lpfc_nodelist *fc_nlplookup[LPFC_RPI_HASH_SIZE];
        uint32_t wwnn[2];
        uint32_t RandomData[7];
 
@@ -290,6 +292,8 @@ struct lpfc_hba {
        uint32_t cfg_fcp_bind_method;
        uint32_t cfg_discovery_threads;
        uint32_t cfg_max_luns;
+       uint32_t cfg_poll;
+       uint32_t cfg_poll_tmo;
        uint32_t cfg_sg_seg_cnt;
        uint32_t cfg_sg_dma_buf_size;
 
@@ -341,7 +345,9 @@ struct lpfc_hba {
 #define VPD_PORT            0x8         /* valid vpd port data */
 #define VPD_MASK            0xf         /* mask for any vpd data */
 
+       struct timer_list fcp_poll_timer;
        struct timer_list els_tmofunc;
+
        /*
         * stat  counters
         */
@@ -352,6 +358,7 @@ struct lpfc_hba {
        struct lpfc_sysfs_mbox sysfs_mbox;
 
        /* fastpath list. */
+       spinlock_t scsi_buf_list_lock;
        struct list_head lpfc_scsi_buf_list;
        uint32_t total_scsi_bufs;
        struct list_head lpfc_iocb_list;