scsi: lpfc: Support non-uniform allocation of MSIX vectors to hardware queues
[linux-2.6-microblaze.git] / drivers / scsi / lpfc / lpfc.h
index feae8fb..9fd2811 100644 (file)
@@ -84,8 +84,6 @@ struct lpfc_sli2_slim;
 #define LPFC_HB_MBOX_INTERVAL   5      /* Heart beat interval in seconds. */
 #define LPFC_HB_MBOX_TIMEOUT    30     /* Heart beat timeout  in seconds. */
 
-#define LPFC_LOOK_AHEAD_OFF    0       /* Look ahead logic is turned off */
-
 /* Error Attention event polling interval */
 #define LPFC_ERATT_POLL_INTERVAL       5 /* EATT poll interval in seconds */
 
@@ -235,8 +233,6 @@ typedef struct lpfc_vpd {
        } sli3Feat;
 } lpfc_vpd_t;
 
-struct lpfc_scsi_buf;
-
 
 /*
  * lpfc stat counters
@@ -479,6 +475,7 @@ struct lpfc_vport {
        struct dentry *debug_disc_trc;
        struct dentry *debug_nodelist;
        struct dentry *debug_nvmestat;
+       struct dentry *debug_scsistat;
        struct dentry *debug_nvmektime;
        struct dentry *debug_cpucheck;
        struct dentry *vport_debugfs_root;
@@ -596,6 +593,13 @@ struct lpfc_mbox_ext_buf_ctx {
        struct list_head ext_dmabuf_list;
 };
 
+struct lpfc_epd_pool {
+       /* Expedite pool */
+       struct list_head list;
+       u32 count;
+       spinlock_t lock;        /* lock for expedite pool */
+};
+
 struct lpfc_ras_fwlog {
        uint8_t *fwlog_buff;
        uint32_t fw_buffcount; /* Buffer size posted to FW */
@@ -617,18 +621,19 @@ struct lpfc_ras_fwlog {
 
 struct lpfc_hba {
        /* SCSI interface function jump table entries */
-       struct lpfc_scsi_buf * (*lpfc_get_scsi_buf)
-               (struct lpfc_hba *, struct lpfc_nodelist *);
+       struct lpfc_io_buf * (*lpfc_get_scsi_buf)
+               (struct lpfc_hba *phba, struct lpfc_nodelist *ndlp,
+               struct scsi_cmnd *cmnd);
        int (*lpfc_scsi_prep_dma_buf)
-               (struct lpfc_hba *, struct lpfc_scsi_buf *);
+               (struct lpfc_hba *, struct lpfc_io_buf *);
        void (*lpfc_scsi_unprep_dma_buf)
-               (struct lpfc_hba *, struct lpfc_scsi_buf *);
+               (struct lpfc_hba *, struct lpfc_io_buf *);
        void (*lpfc_release_scsi_buf)
-               (struct lpfc_hba *, struct lpfc_scsi_buf *);
+               (struct lpfc_hba *, struct lpfc_io_buf *);
        void (*lpfc_rampdown_queue_depth)
                (struct lpfc_hba *);
        void (*lpfc_scsi_prep_cmnd)
-               (struct lpfc_vport *, struct lpfc_scsi_buf *,
+               (struct lpfc_vport *, struct lpfc_io_buf *,
                 struct lpfc_nodelist *);
 
        /* IOCB interface function jump table entries */
@@ -671,9 +676,12 @@ struct lpfc_hba {
                (struct lpfc_hba *);
 
        int (*lpfc_bg_scsi_prep_dma_buf)
-               (struct lpfc_hba *, struct lpfc_scsi_buf *);
+               (struct lpfc_hba *, struct lpfc_io_buf *);
        /* Add new entries here */
 
+       /* expedite pool */
+       struct lpfc_epd_pool epd_pool;
+
        /* SLI4 specific HBA data structure */
        struct lpfc_sli4_hba sli4_hba;
 
@@ -787,6 +795,7 @@ struct lpfc_hba {
 
        /* HBA Config Parameters */
        uint32_t cfg_ack0;
+       uint32_t cfg_xri_rebalancing;
        uint32_t cfg_enable_npiv;
        uint32_t cfg_enable_rrq;
        uint32_t cfg_topology;
@@ -810,6 +819,7 @@ struct lpfc_hba {
        uint32_t cfg_fcp_imax;
        uint32_t cfg_fcp_cpu_map;
        uint32_t cfg_hdw_queue;
+       uint32_t cfg_irq_chann;
        uint32_t cfg_suppress_rsp;
        uint32_t cfg_nvme_oas;
        uint32_t cfg_nvme_embed_cmd;
@@ -946,14 +956,6 @@ struct lpfc_hba {
        struct timer_list eratt_poll;
        uint32_t eratt_poll_interval;
 
-       /*
-        * stat  counters
-        */
-       atomic_t fc4ScsiInputRequests;
-       atomic_t fc4ScsiOutputRequests;
-       atomic_t fc4ScsiControlRequests;
-       atomic_t fc4ScsiIoCmpls;
-
        uint64_t bg_guard_err_cnt;
        uint64_t bg_apptag_err_cnt;
        uint64_t bg_reftag_err_cnt;
@@ -1020,6 +1022,7 @@ struct lpfc_hba {
 #ifdef CONFIG_SCSI_LPFC_DEBUG_FS
        struct dentry *hba_debugfs_root;
        atomic_t debugfs_vport_count;
+       struct dentry *debug_multixri_pools;
        struct dentry *debug_hbqinfo;
        struct dentry *debug_dumpHostSlim;
        struct dentry *debug_dumpHBASlim;
@@ -1038,6 +1041,9 @@ struct lpfc_hba {
        struct dentry *debug_nvmeio_trc;
        struct lpfc_debugfs_nvmeio_trc *nvmeio_trc;
        struct dentry *debug_hdwqinfo;
+#ifdef LPFC_HDWQ_LOCK_STAT
+       struct dentry *debug_lockstat;
+#endif
        atomic_t nvmeio_trc_cnt;
        uint32_t nvmeio_trc_size;
        uint32_t nvmeio_trc_output_idx;
@@ -1152,16 +1158,12 @@ struct lpfc_hba {
        uint16_t sfp_warning;
 
 #ifdef CONFIG_SCSI_LPFC_DEBUG_FS
-#define LPFC_CHECK_CPU_CNT    32
-       uint32_t cpucheck_rcv_io[LPFC_CHECK_CPU_CNT];
-       uint32_t cpucheck_xmt_io[LPFC_CHECK_CPU_CNT];
-       uint32_t cpucheck_cmpl_io[LPFC_CHECK_CPU_CNT];
-       uint32_t cpucheck_ccmpl_io[LPFC_CHECK_CPU_CNT];
        uint16_t cpucheck_on;
 #define LPFC_CHECK_OFF         0
 #define LPFC_CHECK_NVME_IO     1
 #define LPFC_CHECK_NVMET_RCV   2
 #define LPFC_CHECK_NVMET_IO    4
+#define LPFC_CHECK_SCSI_IO     8
        uint16_t ktime_on;
        uint64_t ktime_data_samples;
        uint64_t ktime_status_samples;