]> Pileus Git - ~andy/linux/blobdiff - drivers/scsi/lpfc/lpfc.h
[SCSI] lpfc 8.3.6 : FCoE Protocol Fixes
[~andy/linux] / drivers / scsi / lpfc / lpfc.h
index 1877d9811831c1f3a39b0b14aff1ca5868ebb692..2fd3e45c577e31a52522cf83df197e22611e9ef5 100644 (file)
@@ -109,7 +109,8 @@ struct hbq_dmabuf {
        struct lpfc_dmabuf dbuf;
        uint32_t size;
        uint32_t tag;
-       struct lpfc_rcqe rcqe;
+       struct lpfc_cq_event cq_event;
+       unsigned long time_stamp;
 };
 
 /* Priority bit.  Set value to exceed low water mark in lpfc_mem. */
@@ -289,8 +290,8 @@ struct lpfc_vport {
 
        uint16_t vpi;
        uint16_t vfi;
-       uint8_t vfi_state;
-#define LPFC_VFI_REGISTERED    0x1
+       uint8_t vpi_state;
+#define LPFC_VPI_REGISTERED    0x1
 
        uint32_t fc_flag;       /* FC flags */
 /* Several of these flags are HBA centric and should be moved to
@@ -312,6 +313,7 @@ struct lpfc_vport {
 #define FC_BYPASSED_MODE        0x20000         /* NPort is in bypassed mode */
 #define FC_VPORT_NEEDS_REG_VPI 0x80000  /* Needs to have its vpi registered */
 #define FC_RSCN_DEFERRED       0x100000 /* A deferred RSCN being processed */
+#define FC_VPORT_NEEDS_INIT_VPI 0x200000 /* Need to INIT_VPI before FDISC */
 
        uint32_t ct_flags;
 #define FC_CT_RFF_ID           0x1      /* RFF_ID accepted by switch */
@@ -404,6 +406,7 @@ struct lpfc_vport {
        uint8_t stat_data_enabled;
        uint8_t stat_data_blocked;
        struct list_head rcv_buffer_list;
+       unsigned long rcv_buffer_time_stamp;
        uint32_t vport_flag;
 #define STATIC_VPORT   1
 };
@@ -440,6 +443,12 @@ enum intr_type_t {
        MSIX,
 };
 
+struct unsol_rcv_ct_ctx {
+       uint32_t ctxt_id;
+       uint32_t SID;
+       uint32_t oxid;
+};
+
 struct lpfc_hba {
        /* SCSI interface function jump table entries */
        int (*lpfc_new_scsi_buf)
@@ -520,11 +529,16 @@ struct lpfc_hba {
 #define HBA_ERATT_HANDLED      0x1 /* This flag is set when eratt handled */
 #define DEFER_ERATT            0x2 /* Deferred error attention in progress */
 #define HBA_FCOE_SUPPORT       0x4 /* HBA function supports FCOE */
-#define HBA_RECEIVE_BUFFER     0x8 /* Rcv buffer posted to worker thread */
+#define HBA_SP_QUEUE_EVT       0x8 /* Slow-path qevt posted to worker thread*/
 #define HBA_POST_RECEIVE_BUFFER 0x10 /* Rcv buffers need to be posted */
 #define FCP_XRI_ABORT_EVENT    0x20
 #define ELS_XRI_ABORT_EVENT    0x40
 #define ASYNC_EVENT            0x80
+#define LINK_DISABLED          0x100 /* Link disabled by user */
+#define FCF_DISC_INPROGRESS    0x200 /* FCF discovery in progress */
+#define HBA_FIP_SUPPORT                0x400 /* FIP support in HBA */
+#define HBA_AER_ENABLED                0x800 /* AER enabled with HBA */
+       uint32_t fcp_ring_in_use; /* When polling test if intr-hndlr active*/
        struct lpfc_dmabuf slim2p;
 
        MAILBOX_t *mbox;
@@ -542,6 +556,7 @@ struct lpfc_hba {
        uint8_t fc_linkspeed;   /* Link speed after last READ_LA */
 
        uint32_t fc_eventTag;   /* event tag for link attention */
+       uint32_t link_events;
 
        /* These fields used to be binfo */
        uint32_t fc_pref_DID;   /* preferred D_ID */
@@ -595,8 +610,8 @@ struct lpfc_hba {
        uint32_t cfg_enable_hba_reset;
        uint32_t cfg_enable_hba_heartbeat;
        uint32_t cfg_enable_bg;
-       uint32_t cfg_enable_fip;
        uint32_t cfg_log_verbose;
+       uint32_t cfg_aer_support;
 
        lpfc_vpd_t vpd;         /* vital product data */
 
@@ -616,6 +631,8 @@ struct lpfc_hba {
        uint32_t hbq_count;             /* Count of configured HBQs */
        struct hbq_s hbqs[LPFC_MAX_HBQS]; /* local copy of hbq indicies  */
 
+       uint32_t fcp_qidx;              /* next work queue to post work to */
+
        unsigned long pci_bar0_map;     /* Physical address for PCI BAR0 */
        unsigned long pci_bar1_map;     /* Physical address for PCI BAR1 */
        unsigned long pci_bar2_map;     /* Physical address for PCI BAR2 */
@@ -682,6 +699,7 @@ struct lpfc_hba {
        struct pci_pool *lpfc_mbuf_pool;
        struct pci_pool *lpfc_hrb_pool; /* header receive buffer pool */
        struct pci_pool *lpfc_drb_pool; /* data receive buffer pool */
+       struct pci_pool *lpfc_hbq_pool; /* SLI3 hbq buffer pool */
        struct lpfc_dma_pool lpfc_mbuf_safety_pool;
 
        mempool_t *mbox_mem_pool;
@@ -763,11 +781,18 @@ struct lpfc_hba {
 /* Maximum number of events that can be outstanding at any time*/
 #define LPFC_MAX_EVT_COUNT 512
        atomic_t fast_event_count;
+       uint32_t fcoe_eventtag;
+       uint32_t fcoe_eventtag_at_fcf_scan;
        struct lpfc_fcf fcf;
        uint8_t fc_map[3];
        uint8_t valid_vlan;
        uint16_t vlan_id;
        struct list_head fcf_conn_rec_list;
+
+       struct mutex ct_event_mutex; /* synchronize access to ct_ev_waiters */
+       struct list_head ct_ev_waiters;
+       struct unsol_rcv_ct_ctx ct_ctx[64];
+       uint32_t ctx_idx;
 };
 
 static inline struct Scsi_Host *