diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_def.h')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 54 |
1 files changed, 52 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index c51bd4e5fb44..edb7a704ed77 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <scsi/scsi_bsg_fc.h> | 34 | #include <scsi/scsi_bsg_fc.h> |
35 | 35 | ||
36 | #include "qla_bsg.h" | 36 | #include "qla_bsg.h" |
37 | #include "qla_nx.h" | ||
37 | #define QLA2XXX_DRIVER_NAME "qla2xxx" | 38 | #define QLA2XXX_DRIVER_NAME "qla2xxx" |
38 | 39 | ||
39 | /* | 40 | /* |
@@ -207,6 +208,7 @@ typedef struct srb { | |||
207 | * SRB flag definitions | 208 | * SRB flag definitions |
208 | */ | 209 | */ |
209 | #define SRB_DMA_VALID BIT_0 /* Command sent to ISP */ | 210 | #define SRB_DMA_VALID BIT_0 /* Command sent to ISP */ |
211 | #define SRB_FCP_CMND_DMA_VALID BIT_12 /* FCP command in IOCB */ | ||
210 | 212 | ||
211 | /* | 213 | /* |
212 | * SRB extensions. | 214 | * SRB extensions. |
@@ -417,6 +419,7 @@ typedef union { | |||
417 | struct device_reg_2xxx isp; | 419 | struct device_reg_2xxx isp; |
418 | struct device_reg_24xx isp24; | 420 | struct device_reg_24xx isp24; |
419 | struct device_reg_25xxmq isp25mq; | 421 | struct device_reg_25xxmq isp25mq; |
422 | struct device_reg_82xx isp82; | ||
420 | } device_reg_t; | 423 | } device_reg_t; |
421 | 424 | ||
422 | #define ISP_REQ_Q_IN(ha, reg) \ | 425 | #define ISP_REQ_Q_IN(ha, reg) \ |
@@ -2112,6 +2115,7 @@ struct isp_operations { | |||
2112 | 2115 | ||
2113 | int (*get_flash_version) (struct scsi_qla_host *, void *); | 2116 | int (*get_flash_version) (struct scsi_qla_host *, void *); |
2114 | int (*start_scsi) (srb_t *); | 2117 | int (*start_scsi) (srb_t *); |
2118 | int (*abort_isp) (struct scsi_qla_host *); | ||
2115 | }; | 2119 | }; |
2116 | 2120 | ||
2117 | /* MSI-X Support *************************************************************/ | 2121 | /* MSI-X Support *************************************************************/ |
@@ -2386,7 +2390,8 @@ struct qla_hw_data { | |||
2386 | #define DT_ISP2532 BIT_11 | 2390 | #define DT_ISP2532 BIT_11 |
2387 | #define DT_ISP8432 BIT_12 | 2391 | #define DT_ISP8432 BIT_12 |
2388 | #define DT_ISP8001 BIT_13 | 2392 | #define DT_ISP8001 BIT_13 |
2389 | #define DT_ISP_LAST (DT_ISP8001 << 1) | 2393 | #define DT_ISP8021 BIT_14 |
2394 | #define DT_ISP_LAST (DT_ISP8021 << 1) | ||
2390 | 2395 | ||
2391 | #define DT_IIDMA BIT_26 | 2396 | #define DT_IIDMA BIT_26 |
2392 | #define DT_FWI2 BIT_27 | 2397 | #define DT_FWI2 BIT_27 |
@@ -2409,6 +2414,7 @@ struct qla_hw_data { | |||
2409 | #define IS_QLA2532(ha) (DT_MASK(ha) & DT_ISP2532) | 2414 | #define IS_QLA2532(ha) (DT_MASK(ha) & DT_ISP2532) |
2410 | #define IS_QLA8432(ha) (DT_MASK(ha) & DT_ISP8432) | 2415 | #define IS_QLA8432(ha) (DT_MASK(ha) & DT_ISP8432) |
2411 | #define IS_QLA8001(ha) (DT_MASK(ha) & DT_ISP8001) | 2416 | #define IS_QLA8001(ha) (DT_MASK(ha) & DT_ISP8001) |
2417 | #define IS_QLA82XX(ha) (DT_MASK(ha) & DT_ISP8021) | ||
2412 | 2418 | ||
2413 | #define IS_QLA23XX(ha) (IS_QLA2300(ha) || IS_QLA2312(ha) || IS_QLA2322(ha) || \ | 2419 | #define IS_QLA23XX(ha) (IS_QLA2300(ha) || IS_QLA2312(ha) || IS_QLA2322(ha) || \ |
2414 | IS_QLA6312(ha) || IS_QLA6322(ha)) | 2420 | IS_QLA6312(ha) || IS_QLA6322(ha)) |
@@ -2419,8 +2425,10 @@ struct qla_hw_data { | |||
2419 | #define IS_QLA24XX_TYPE(ha) (IS_QLA24XX(ha) || IS_QLA54XX(ha) || \ | 2425 | #define IS_QLA24XX_TYPE(ha) (IS_QLA24XX(ha) || IS_QLA54XX(ha) || \ |
2420 | IS_QLA84XX(ha)) | 2426 | IS_QLA84XX(ha)) |
2421 | #define IS_QLA81XX(ha) (IS_QLA8001(ha)) | 2427 | #define IS_QLA81XX(ha) (IS_QLA8001(ha)) |
2428 | #define IS_QLA8XXX_TYPE(ha) (IS_QLA81XX(ha) || IS_QLA82XX(ha)) | ||
2422 | #define IS_QLA2XXX_MIDTYPE(ha) (IS_QLA24XX(ha) || IS_QLA84XX(ha) || \ | 2429 | #define IS_QLA2XXX_MIDTYPE(ha) (IS_QLA24XX(ha) || IS_QLA84XX(ha) || \ |
2423 | IS_QLA25XX(ha) || IS_QLA81XX(ha)) | 2430 | IS_QLA25XX(ha) || IS_QLA81XX(ha) || \ |
2431 | IS_QLA82XX(ha)) | ||
2424 | #define IS_MSIX_NACK_CAPABLE(ha) (IS_QLA81XX(ha)) | 2432 | #define IS_MSIX_NACK_CAPABLE(ha) (IS_QLA81XX(ha)) |
2425 | #define IS_NOPOLLING_TYPE(ha) ((IS_QLA25XX(ha) || IS_QLA81XX(ha)) && \ | 2433 | #define IS_NOPOLLING_TYPE(ha) ((IS_QLA25XX(ha) || IS_QLA81XX(ha)) && \ |
2426 | (ha)->flags.msix_enabled) | 2434 | (ha)->flags.msix_enabled) |
@@ -2603,6 +2611,7 @@ struct qla_hw_data { | |||
2603 | uint32_t flt_region_npiv_conf; | 2611 | uint32_t flt_region_npiv_conf; |
2604 | uint32_t flt_region_gold_fw; | 2612 | uint32_t flt_region_gold_fw; |
2605 | uint32_t flt_region_fcp_prio; | 2613 | uint32_t flt_region_fcp_prio; |
2614 | uint32_t flt_region_bootload; | ||
2606 | 2615 | ||
2607 | /* Needed for BEACON */ | 2616 | /* Needed for BEACON */ |
2608 | uint16_t beacon_blink_led; | 2617 | uint16_t beacon_blink_led; |
@@ -2634,6 +2643,38 @@ struct qla_hw_data { | |||
2634 | 2643 | ||
2635 | /* FCP_CMND priority support */ | 2644 | /* FCP_CMND priority support */ |
2636 | struct qla_fcp_prio_cfg *fcp_prio_cfg; | 2645 | struct qla_fcp_prio_cfg *fcp_prio_cfg; |
2646 | |||
2647 | struct dma_pool *dl_dma_pool; | ||
2648 | #define DSD_LIST_DMA_POOL_SIZE 512 | ||
2649 | |||
2650 | struct dma_pool *fcp_cmnd_dma_pool; | ||
2651 | mempool_t *ctx_mempool; | ||
2652 | #define FCP_CMND_DMA_POOL_SIZE 512 | ||
2653 | |||
2654 | unsigned long nx_pcibase; /* Base I/O address */ | ||
2655 | uint8_t *nxdb_rd_ptr; /* Doorbell read pointer */ | ||
2656 | unsigned long nxdb_wr_ptr; /* Door bell write pointer */ | ||
2657 | unsigned long first_page_group_start; | ||
2658 | unsigned long first_page_group_end; | ||
2659 | |||
2660 | uint32_t crb_win; | ||
2661 | uint32_t curr_window; | ||
2662 | uint32_t ddr_mn_window; | ||
2663 | unsigned long mn_win_crb; | ||
2664 | unsigned long ms_win_crb; | ||
2665 | int qdr_sn_window; | ||
2666 | uint32_t nx_dev_init_timeout; | ||
2667 | uint32_t nx_reset_timeout; | ||
2668 | rwlock_t hw_lock; | ||
2669 | uint16_t portnum; /* port number */ | ||
2670 | int link_width; | ||
2671 | struct fw_blob *hablob; | ||
2672 | struct qla82xx_legacy_intr_set nx_legacy_intr; | ||
2673 | |||
2674 | uint16_t gbl_dsd_inuse; | ||
2675 | uint16_t gbl_dsd_avail; | ||
2676 | struct list_head gbl_dsd_list; | ||
2677 | #define NUM_DSD_CHAIN 4096 | ||
2637 | }; | 2678 | }; |
2638 | 2679 | ||
2639 | /* | 2680 | /* |
@@ -2686,10 +2727,13 @@ typedef struct scsi_qla_host { | |||
2686 | #define VP_DPC_NEEDED 14 /* wake up for VP dpc handling */ | 2727 | #define VP_DPC_NEEDED 14 /* wake up for VP dpc handling */ |
2687 | #define UNLOADING 15 | 2728 | #define UNLOADING 15 |
2688 | #define NPIV_CONFIG_NEEDED 16 | 2729 | #define NPIV_CONFIG_NEEDED 16 |
2730 | #define ISP_UNRECOVERABLE 17 | ||
2731 | #define FCOE_CTX_RESET_NEEDED 18 /* Initiate FCoE context reset */ | ||
2689 | 2732 | ||
2690 | uint32_t device_flags; | 2733 | uint32_t device_flags; |
2691 | #define SWITCH_FOUND BIT_0 | 2734 | #define SWITCH_FOUND BIT_0 |
2692 | #define DFLG_NO_CABLE BIT_1 | 2735 | #define DFLG_NO_CABLE BIT_1 |
2736 | #define DFLG_DEV_FAILED BIT_5 | ||
2693 | 2737 | ||
2694 | /* ISP configuration data. */ | 2738 | /* ISP configuration data. */ |
2695 | uint16_t loop_id; /* Host adapter loop id */ | 2739 | uint16_t loop_id; /* Host adapter loop id */ |
@@ -2747,6 +2791,8 @@ typedef struct scsi_qla_host { | |||
2747 | #define VP_ERR_ADAP_NORESOURCES 5 | 2791 | #define VP_ERR_ADAP_NORESOURCES 5 |
2748 | struct qla_hw_data *hw; | 2792 | struct qla_hw_data *hw; |
2749 | struct req_que *req; | 2793 | struct req_que *req; |
2794 | int fw_heartbeat_counter; | ||
2795 | int seconds_since_last_heartbeat; | ||
2750 | } scsi_qla_host_t; | 2796 | } scsi_qla_host_t; |
2751 | 2797 | ||
2752 | /* | 2798 | /* |
@@ -2799,6 +2845,10 @@ typedef struct scsi_qla_host { | |||
2799 | #define OPTROM_SIZE_24XX 0x100000 | 2845 | #define OPTROM_SIZE_24XX 0x100000 |
2800 | #define OPTROM_SIZE_25XX 0x200000 | 2846 | #define OPTROM_SIZE_25XX 0x200000 |
2801 | #define OPTROM_SIZE_81XX 0x400000 | 2847 | #define OPTROM_SIZE_81XX 0x400000 |
2848 | #define OPTROM_SIZE_82XX 0x800000 | ||
2849 | |||
2850 | #define OPTROM_BURST_SIZE 0x1000 | ||
2851 | #define OPTROM_BURST_DWORDS (OPTROM_BURST_SIZE / 4) | ||
2802 | 2852 | ||
2803 | #include "qla_gbl.h" | 2853 | #include "qla_gbl.h" |
2804 | #include "qla_dbg.h" | 2854 | #include "qla_dbg.h" |