diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_def.h')
| -rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 181 |
1 files changed, 72 insertions, 109 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index e0c5bb54b258..00aa48d975a6 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
| @@ -93,6 +93,7 @@ | |||
| 93 | #define LSD(x) ((uint32_t)((uint64_t)(x))) | 93 | #define LSD(x) ((uint32_t)((uint64_t)(x))) |
| 94 | #define MSD(x) ((uint32_t)((((uint64_t)(x)) >> 16) >> 16)) | 94 | #define MSD(x) ((uint32_t)((((uint64_t)(x)) >> 16) >> 16)) |
| 95 | 95 | ||
| 96 | #define MAKE_HANDLE(x, y) ((uint32_t)((((uint32_t)(x)) << 16) | (uint32_t)(y))) | ||
| 96 | 97 | ||
| 97 | /* | 98 | /* |
| 98 | * I/O register | 99 | * I/O register |
| @@ -176,10 +177,10 @@ | |||
| 176 | /* ISP request and response entry counts (37-65535) */ | 177 | /* ISP request and response entry counts (37-65535) */ |
| 177 | #define REQUEST_ENTRY_CNT_2100 128 /* Number of request entries. */ | 178 | #define REQUEST_ENTRY_CNT_2100 128 /* Number of request entries. */ |
| 178 | #define REQUEST_ENTRY_CNT_2200 2048 /* Number of request entries. */ | 179 | #define REQUEST_ENTRY_CNT_2200 2048 /* Number of request entries. */ |
| 179 | #define REQUEST_ENTRY_CNT_2XXX_EXT_MEM 4096 /* Number of request entries. */ | 180 | #define REQUEST_ENTRY_CNT_24XX 2048 /* Number of request entries. */ |
| 180 | #define REQUEST_ENTRY_CNT_24XX 4096 /* Number of request entries. */ | ||
| 181 | #define RESPONSE_ENTRY_CNT_2100 64 /* Number of response entries.*/ | 181 | #define RESPONSE_ENTRY_CNT_2100 64 /* Number of response entries.*/ |
| 182 | #define RESPONSE_ENTRY_CNT_2300 512 /* Number of response entries.*/ | 182 | #define RESPONSE_ENTRY_CNT_2300 512 /* Number of response entries.*/ |
| 183 | #define RESPONSE_ENTRY_CNT_MQ 128 /* Number of response entries.*/ | ||
| 183 | 184 | ||
| 184 | struct req_que; | 185 | struct req_que; |
| 185 | 186 | ||
| @@ -187,7 +188,6 @@ struct req_que; | |||
| 187 | * SCSI Request Block | 188 | * SCSI Request Block |
| 188 | */ | 189 | */ |
| 189 | typedef struct srb { | 190 | typedef struct srb { |
| 190 | struct req_que *que; | ||
| 191 | struct fc_port *fcport; | 191 | struct fc_port *fcport; |
| 192 | 192 | ||
| 193 | struct scsi_cmnd *cmd; /* Linux SCSI command pkt */ | 193 | struct scsi_cmnd *cmd; /* Linux SCSI command pkt */ |
| @@ -201,20 +201,7 @@ typedef struct srb { | |||
| 201 | /* | 201 | /* |
| 202 | * SRB flag definitions | 202 | * SRB flag definitions |
| 203 | */ | 203 | */ |
| 204 | #define SRB_TIMEOUT BIT_0 /* Command timed out */ | 204 | #define SRB_DMA_VALID BIT_0 /* Command sent to ISP */ |
| 205 | #define SRB_DMA_VALID BIT_1 /* Command sent to ISP */ | ||
| 206 | #define SRB_WATCHDOG BIT_2 /* Command on watchdog list */ | ||
| 207 | #define SRB_ABORT_PENDING BIT_3 /* Command abort sent to device */ | ||
| 208 | |||
| 209 | #define SRB_ABORTED BIT_4 /* Command aborted command already */ | ||
| 210 | #define SRB_RETRY BIT_5 /* Command needs retrying */ | ||
| 211 | #define SRB_GOT_SENSE BIT_6 /* Command has sense data */ | ||
| 212 | #define SRB_FAILOVER BIT_7 /* Command in failover state */ | ||
| 213 | |||
| 214 | #define SRB_BUSY BIT_8 /* Command is in busy retry state */ | ||
| 215 | #define SRB_FO_CANCEL BIT_9 /* Command don't need to do failover */ | ||
| 216 | #define SRB_IOCTL BIT_10 /* IOCTL command. */ | ||
| 217 | #define SRB_TAPE BIT_11 /* FCP2 (Tape) command. */ | ||
| 218 | 205 | ||
| 219 | /* | 206 | /* |
| 220 | * ISP I/O Register Set structure definitions. | 207 | * ISP I/O Register Set structure definitions. |
| @@ -372,10 +359,10 @@ struct device_reg_2xxx { | |||
| 372 | }; | 359 | }; |
| 373 | 360 | ||
| 374 | struct device_reg_25xxmq { | 361 | struct device_reg_25xxmq { |
| 375 | volatile uint32_t req_q_in; | 362 | uint32_t req_q_in; |
| 376 | volatile uint32_t req_q_out; | 363 | uint32_t req_q_out; |
| 377 | volatile uint32_t rsp_q_in; | 364 | uint32_t rsp_q_in; |
| 378 | volatile uint32_t rsp_q_out; | 365 | uint32_t rsp_q_out; |
| 379 | }; | 366 | }; |
| 380 | 367 | ||
| 381 | typedef union { | 368 | typedef union { |
| @@ -620,6 +607,7 @@ typedef struct { | |||
| 620 | #define MBC_GET_TIMEOUT_PARAMS 0x22 /* Get FW timeouts. */ | 607 | #define MBC_GET_TIMEOUT_PARAMS 0x22 /* Get FW timeouts. */ |
| 621 | #define MBC_TRACE_CONTROL 0x27 /* Trace control command. */ | 608 | #define MBC_TRACE_CONTROL 0x27 /* Trace control command. */ |
| 622 | #define MBC_GEN_SYSTEM_ERROR 0x2a /* Generate System Error. */ | 609 | #define MBC_GEN_SYSTEM_ERROR 0x2a /* Generate System Error. */ |
| 610 | #define MBC_WRITE_SFP 0x30 /* Write SFP Data. */ | ||
| 623 | #define MBC_READ_SFP 0x31 /* Read SFP Data. */ | 611 | #define MBC_READ_SFP 0x31 /* Read SFP Data. */ |
| 624 | #define MBC_SET_TIMEOUT_PARAMS 0x32 /* Set FW timeouts. */ | 612 | #define MBC_SET_TIMEOUT_PARAMS 0x32 /* Set FW timeouts. */ |
| 625 | #define MBC_MID_INITIALIZE_FIRMWARE 0x48 /* MID Initialize firmware. */ | 613 | #define MBC_MID_INITIALIZE_FIRMWARE 0x48 /* MID Initialize firmware. */ |
| @@ -1570,39 +1558,13 @@ typedef struct fc_port { | |||
| 1570 | #define FCS_DEVICE_DEAD 2 | 1558 | #define FCS_DEVICE_DEAD 2 |
| 1571 | #define FCS_DEVICE_LOST 3 | 1559 | #define FCS_DEVICE_LOST 3 |
| 1572 | #define FCS_ONLINE 4 | 1560 | #define FCS_ONLINE 4 |
| 1573 | #define FCS_NOT_SUPPORTED 5 | ||
| 1574 | #define FCS_FAILOVER 6 | ||
| 1575 | #define FCS_FAILOVER_FAILED 7 | ||
| 1576 | 1561 | ||
| 1577 | /* | 1562 | /* |
| 1578 | * FC port flags. | 1563 | * FC port flags. |
| 1579 | */ | 1564 | */ |
| 1580 | #define FCF_FABRIC_DEVICE BIT_0 | 1565 | #define FCF_FABRIC_DEVICE BIT_0 |
| 1581 | #define FCF_LOGIN_NEEDED BIT_1 | 1566 | #define FCF_LOGIN_NEEDED BIT_1 |
| 1582 | #define FCF_FO_MASKED BIT_2 | 1567 | #define FCF_TAPE_PRESENT BIT_2 |
| 1583 | #define FCF_FAILOVER_NEEDED BIT_3 | ||
| 1584 | #define FCF_RESET_NEEDED BIT_4 | ||
| 1585 | #define FCF_PERSISTENT_BOUND BIT_5 | ||
| 1586 | #define FCF_TAPE_PRESENT BIT_6 | ||
| 1587 | #define FCF_FARP_DONE BIT_7 | ||
| 1588 | #define FCF_FARP_FAILED BIT_8 | ||
| 1589 | #define FCF_FARP_REPLY_NEEDED BIT_9 | ||
| 1590 | #define FCF_AUTH_REQ BIT_10 | ||
| 1591 | #define FCF_SEND_AUTH_REQ BIT_11 | ||
| 1592 | #define FCF_RECEIVE_AUTH_REQ BIT_12 | ||
| 1593 | #define FCF_AUTH_SUCCESS BIT_13 | ||
| 1594 | #define FCF_RLC_SUPPORT BIT_14 | ||
| 1595 | #define FCF_CONFIG BIT_15 /* Needed? */ | ||
| 1596 | #define FCF_RESCAN_NEEDED BIT_16 | ||
| 1597 | #define FCF_XP_DEVICE BIT_17 | ||
| 1598 | #define FCF_MSA_DEVICE BIT_18 | ||
| 1599 | #define FCF_EVA_DEVICE BIT_19 | ||
| 1600 | #define FCF_MSA_PORT_ACTIVE BIT_20 | ||
| 1601 | #define FCF_FAILBACK_DISABLE BIT_21 | ||
| 1602 | #define FCF_FAILOVER_DISABLE BIT_22 | ||
| 1603 | #define FCF_DSXXX_DEVICE BIT_23 | ||
| 1604 | #define FCF_AA_EVA_DEVICE BIT_24 | ||
| 1605 | #define FCF_AA_MSA_DEVICE BIT_25 | ||
| 1606 | 1568 | ||
| 1607 | /* No loop ID flag. */ | 1569 | /* No loop ID flag. */ |
| 1608 | #define FC_NO_LOOP_ID 0x1000 | 1570 | #define FC_NO_LOOP_ID 0x1000 |
| @@ -2047,7 +2009,7 @@ typedef struct vport_params { | |||
| 2047 | #define VP_RET_CODE_NOT_FOUND 6 | 2009 | #define VP_RET_CODE_NOT_FOUND 6 |
| 2048 | 2010 | ||
| 2049 | struct qla_hw_data; | 2011 | struct qla_hw_data; |
| 2050 | 2012 | struct rsp_que; | |
| 2051 | /* | 2013 | /* |
| 2052 | * ISP operations | 2014 | * ISP operations |
| 2053 | */ | 2015 | */ |
| @@ -2069,10 +2031,9 @@ struct isp_operations { | |||
| 2069 | void (*enable_intrs) (struct qla_hw_data *); | 2031 | void (*enable_intrs) (struct qla_hw_data *); |
| 2070 | void (*disable_intrs) (struct qla_hw_data *); | 2032 | void (*disable_intrs) (struct qla_hw_data *); |
| 2071 | 2033 | ||
| 2072 | int (*abort_command) (struct scsi_qla_host *, srb_t *, | 2034 | int (*abort_command) (srb_t *); |
| 2073 | struct req_que *); | 2035 | int (*target_reset) (struct fc_port *, unsigned int, int); |
| 2074 | int (*target_reset) (struct fc_port *, unsigned int); | 2036 | int (*lun_reset) (struct fc_port *, unsigned int, int); |
| 2075 | int (*lun_reset) (struct fc_port *, unsigned int); | ||
| 2076 | int (*fabric_login) (struct scsi_qla_host *, uint16_t, uint8_t, | 2037 | int (*fabric_login) (struct scsi_qla_host *, uint16_t, uint8_t, |
| 2077 | uint8_t, uint8_t, uint16_t *, uint8_t); | 2038 | uint8_t, uint8_t, uint16_t *, uint8_t); |
| 2078 | int (*fabric_logout) (struct scsi_qla_host *, uint16_t, uint8_t, | 2039 | int (*fabric_logout) (struct scsi_qla_host *, uint16_t, uint8_t, |
| @@ -2102,9 +2063,6 @@ struct isp_operations { | |||
| 2102 | 2063 | ||
| 2103 | int (*get_flash_version) (struct scsi_qla_host *, void *); | 2064 | int (*get_flash_version) (struct scsi_qla_host *, void *); |
| 2104 | int (*start_scsi) (srb_t *); | 2065 | int (*start_scsi) (srb_t *); |
| 2105 | void (*wrt_req_reg) (struct qla_hw_data *, uint16_t, uint16_t); | ||
| 2106 | void (*wrt_rsp_reg) (struct qla_hw_data *, uint16_t, uint16_t); | ||
| 2107 | uint16_t (*rd_req_reg) (struct qla_hw_data *, uint16_t); | ||
| 2108 | }; | 2066 | }; |
| 2109 | 2067 | ||
| 2110 | /* MSI-X Support *************************************************************/ | 2068 | /* MSI-X Support *************************************************************/ |
| @@ -2121,7 +2079,6 @@ struct isp_operations { | |||
| 2121 | #define QLA_PCI_MSIX_CONTROL 0xa2 | 2079 | #define QLA_PCI_MSIX_CONTROL 0xa2 |
| 2122 | 2080 | ||
| 2123 | struct scsi_qla_host; | 2081 | struct scsi_qla_host; |
| 2124 | struct rsp_que; | ||
| 2125 | 2082 | ||
| 2126 | struct qla_msix_entry { | 2083 | struct qla_msix_entry { |
| 2127 | int have_irq; | 2084 | int have_irq; |
| @@ -2182,7 +2139,6 @@ struct qla_statistics { | |||
| 2182 | #define MBC_INITIALIZE_MULTIQ 0x1f | 2139 | #define MBC_INITIALIZE_MULTIQ 0x1f |
| 2183 | #define QLA_QUE_PAGE 0X1000 | 2140 | #define QLA_QUE_PAGE 0X1000 |
| 2184 | #define QLA_MQ_SIZE 32 | 2141 | #define QLA_MQ_SIZE 32 |
| 2185 | #define QLA_MAX_HOST_QUES 16 | ||
| 2186 | #define QLA_MAX_QUEUES 256 | 2142 | #define QLA_MAX_QUEUES 256 |
| 2187 | #define ISP_QUE_REG(ha, id) \ | 2143 | #define ISP_QUE_REG(ha, id) \ |
| 2188 | ((ha->mqenable) ? \ | 2144 | ((ha->mqenable) ? \ |
| @@ -2200,6 +2156,8 @@ struct rsp_que { | |||
| 2200 | dma_addr_t dma; | 2156 | dma_addr_t dma; |
| 2201 | response_t *ring; | 2157 | response_t *ring; |
| 2202 | response_t *ring_ptr; | 2158 | response_t *ring_ptr; |
| 2159 | uint32_t __iomem *rsp_q_in; /* FWI2-capable only. */ | ||
| 2160 | uint32_t __iomem *rsp_q_out; | ||
| 2203 | uint16_t ring_index; | 2161 | uint16_t ring_index; |
| 2204 | uint16_t out_ptr; | 2162 | uint16_t out_ptr; |
| 2205 | uint16_t length; | 2163 | uint16_t length; |
| @@ -2210,6 +2168,8 @@ struct rsp_que { | |||
| 2210 | struct qla_hw_data *hw; | 2168 | struct qla_hw_data *hw; |
| 2211 | struct qla_msix_entry *msix; | 2169 | struct qla_msix_entry *msix; |
| 2212 | struct req_que *req; | 2170 | struct req_que *req; |
| 2171 | srb_t *status_srb; /* status continuation entry */ | ||
| 2172 | struct work_struct q_work; | ||
| 2213 | }; | 2173 | }; |
| 2214 | 2174 | ||
| 2215 | /* Request queue data structure */ | 2175 | /* Request queue data structure */ |
| @@ -2217,6 +2177,8 @@ struct req_que { | |||
| 2217 | dma_addr_t dma; | 2177 | dma_addr_t dma; |
| 2218 | request_t *ring; | 2178 | request_t *ring; |
| 2219 | request_t *ring_ptr; | 2179 | request_t *ring_ptr; |
| 2180 | uint32_t __iomem *req_q_in; /* FWI2-capable only. */ | ||
| 2181 | uint32_t __iomem *req_q_out; | ||
| 2220 | uint16_t ring_index; | 2182 | uint16_t ring_index; |
| 2221 | uint16_t in_ptr; | 2183 | uint16_t in_ptr; |
| 2222 | uint16_t cnt; | 2184 | uint16_t cnt; |
| @@ -2256,10 +2218,12 @@ struct qla_hw_data { | |||
| 2256 | uint32_t msix_enabled :1; | 2218 | uint32_t msix_enabled :1; |
| 2257 | uint32_t disable_serdes :1; | 2219 | uint32_t disable_serdes :1; |
| 2258 | uint32_t gpsc_supported :1; | 2220 | uint32_t gpsc_supported :1; |
| 2259 | uint32_t vsan_enabled :1; | ||
| 2260 | uint32_t npiv_supported :1; | 2221 | uint32_t npiv_supported :1; |
| 2261 | uint32_t fce_enabled :1; | 2222 | uint32_t fce_enabled :1; |
| 2262 | uint32_t hw_event_marker_found:1; | 2223 | uint32_t fac_supported :1; |
| 2224 | uint32_t chip_reset_done :1; | ||
| 2225 | uint32_t port0 :1; | ||
| 2226 | uint32_t running_gold_fw :1; | ||
| 2263 | } flags; | 2227 | } flags; |
| 2264 | 2228 | ||
| 2265 | /* This spinlock is used to protect "io transactions", you must | 2229 | /* This spinlock is used to protect "io transactions", you must |
| @@ -2277,14 +2241,15 @@ struct qla_hw_data { | |||
| 2277 | 2241 | ||
| 2278 | #define MIN_IOBASE_LEN 0x100 | 2242 | #define MIN_IOBASE_LEN 0x100 |
| 2279 | /* Multi queue data structs */ | 2243 | /* Multi queue data structs */ |
| 2280 | device_reg_t *mqiobase; | 2244 | device_reg_t __iomem *mqiobase; |
| 2281 | uint16_t msix_count; | 2245 | uint16_t msix_count; |
| 2282 | uint8_t mqenable; | 2246 | uint8_t mqenable; |
| 2283 | struct req_que **req_q_map; | 2247 | struct req_que **req_q_map; |
| 2284 | struct rsp_que **rsp_q_map; | 2248 | struct rsp_que **rsp_q_map; |
| 2285 | unsigned long req_qid_map[(QLA_MAX_QUEUES / 8) / sizeof(unsigned long)]; | 2249 | unsigned long req_qid_map[(QLA_MAX_QUEUES / 8) / sizeof(unsigned long)]; |
| 2286 | unsigned long rsp_qid_map[(QLA_MAX_QUEUES / 8) / sizeof(unsigned long)]; | 2250 | unsigned long rsp_qid_map[(QLA_MAX_QUEUES / 8) / sizeof(unsigned long)]; |
| 2287 | uint16_t max_queues; | 2251 | uint8_t max_req_queues; |
| 2252 | uint8_t max_rsp_queues; | ||
| 2288 | struct qla_npiv_entry *npiv_info; | 2253 | struct qla_npiv_entry *npiv_info; |
| 2289 | uint16_t nvram_npiv_size; | 2254 | uint16_t nvram_npiv_size; |
| 2290 | 2255 | ||
| @@ -2293,6 +2258,9 @@ struct qla_hw_data { | |||
| 2293 | #define FLOGI_MID_SUPPORT BIT_10 | 2258 | #define FLOGI_MID_SUPPORT BIT_10 |
| 2294 | #define FLOGI_VSAN_SUPPORT BIT_12 | 2259 | #define FLOGI_VSAN_SUPPORT BIT_12 |
| 2295 | #define FLOGI_SP_SUPPORT BIT_13 | 2260 | #define FLOGI_SP_SUPPORT BIT_13 |
| 2261 | |||
| 2262 | uint8_t port_no; /* Physical port of adapter */ | ||
| 2263 | |||
| 2296 | /* Timeout timers. */ | 2264 | /* Timeout timers. */ |
| 2297 | uint8_t loop_down_abort_time; /* port down timer */ | 2265 | uint8_t loop_down_abort_time; /* port down timer */ |
| 2298 | atomic_t loop_down_timer; /* loop down timer */ | 2266 | atomic_t loop_down_timer; /* loop down timer */ |
| @@ -2300,7 +2268,6 @@ struct qla_hw_data { | |||
| 2300 | uint16_t max_loop_id; | 2268 | uint16_t max_loop_id; |
| 2301 | 2269 | ||
| 2302 | uint16_t fb_rev; | 2270 | uint16_t fb_rev; |
| 2303 | uint16_t max_public_loop_ids; | ||
| 2304 | uint16_t min_external_loopid; /* First external loop Id */ | 2271 | uint16_t min_external_loopid; /* First external loop Id */ |
| 2305 | 2272 | ||
| 2306 | #define PORT_SPEED_UNKNOWN 0xFFFF | 2273 | #define PORT_SPEED_UNKNOWN 0xFFFF |
| @@ -2381,6 +2348,8 @@ struct qla_hw_data { | |||
| 2381 | IS_QLA25XX(ha) || IS_QLA81XX(ha)) | 2348 | IS_QLA25XX(ha) || IS_QLA81XX(ha)) |
| 2382 | #define IS_NOPOLLING_TYPE(ha) ((IS_QLA25XX(ha) || IS_QLA81XX(ha)) && \ | 2349 | #define IS_NOPOLLING_TYPE(ha) ((IS_QLA25XX(ha) || IS_QLA81XX(ha)) && \ |
| 2383 | (ha)->flags.msix_enabled) | 2350 | (ha)->flags.msix_enabled) |
| 2351 | #define IS_FAC_REQUIRED(ha) (IS_QLA81XX(ha)) | ||
| 2352 | #define IS_NOCACHE_VPD_TYPE(ha) (IS_QLA81XX(ha)) | ||
| 2384 | 2353 | ||
| 2385 | #define IS_IIDMA_CAPABLE(ha) ((ha)->device_type & DT_IIDMA) | 2354 | #define IS_IIDMA_CAPABLE(ha) ((ha)->device_type & DT_IIDMA) |
| 2386 | #define IS_FWI2_CAPABLE(ha) ((ha)->device_type & DT_FWI2) | 2355 | #define IS_FWI2_CAPABLE(ha) ((ha)->device_type & DT_FWI2) |
| @@ -2425,6 +2394,18 @@ struct qla_hw_data { | |||
| 2425 | void *sfp_data; | 2394 | void *sfp_data; |
| 2426 | dma_addr_t sfp_data_dma; | 2395 | dma_addr_t sfp_data_dma; |
| 2427 | 2396 | ||
| 2397 | uint8_t *edc_data; | ||
| 2398 | dma_addr_t edc_data_dma; | ||
| 2399 | uint16_t edc_data_len; | ||
| 2400 | |||
| 2401 | #define XGMAC_DATA_SIZE PAGE_SIZE | ||
| 2402 | void *xgmac_data; | ||
| 2403 | dma_addr_t xgmac_data_dma; | ||
| 2404 | |||
| 2405 | #define DCBX_TLV_DATA_SIZE PAGE_SIZE | ||
| 2406 | void *dcbx_tlv; | ||
| 2407 | dma_addr_t dcbx_tlv_dma; | ||
| 2408 | |||
| 2428 | struct task_struct *dpc_thread; | 2409 | struct task_struct *dpc_thread; |
| 2429 | uint8_t dpc_active; /* DPC routine is active */ | 2410 | uint8_t dpc_active; /* DPC routine is active */ |
| 2430 | 2411 | ||
| @@ -2439,6 +2420,8 @@ struct qla_hw_data { | |||
| 2439 | dma_addr_t init_cb_dma; | 2420 | dma_addr_t init_cb_dma; |
| 2440 | init_cb_t *init_cb; | 2421 | init_cb_t *init_cb; |
| 2441 | int init_cb_size; | 2422 | int init_cb_size; |
| 2423 | dma_addr_t ex_init_cb_dma; | ||
| 2424 | struct ex_init_cb_81xx *ex_init_cb; | ||
| 2442 | 2425 | ||
| 2443 | /* These are used by mailbox operations. */ | 2426 | /* These are used by mailbox operations. */ |
| 2444 | volatile uint16_t mailbox_out[MAILBOX_REGISTER_COUNT]; | 2427 | volatile uint16_t mailbox_out[MAILBOX_REGISTER_COUNT]; |
| @@ -2453,15 +2436,6 @@ struct qla_hw_data { | |||
| 2453 | struct completion mbx_cmd_comp; /* Serialize mbx access */ | 2436 | struct completion mbx_cmd_comp; /* Serialize mbx access */ |
| 2454 | struct completion mbx_intr_comp; /* Used for completion notification */ | 2437 | struct completion mbx_intr_comp; /* Used for completion notification */ |
| 2455 | 2438 | ||
| 2456 | uint32_t mbx_flags; | ||
| 2457 | #define MBX_IN_PROGRESS BIT_0 | ||
| 2458 | #define MBX_BUSY BIT_1 /* Got the Access */ | ||
| 2459 | #define MBX_SLEEPING_ON_SEM BIT_2 | ||
| 2460 | #define MBX_POLLING_FOR_COMP BIT_3 | ||
| 2461 | #define MBX_COMPLETED BIT_4 | ||
| 2462 | #define MBX_TIMEDOUT BIT_5 | ||
| 2463 | #define MBX_ACCESS_TIMEDOUT BIT_6 | ||
| 2464 | |||
| 2465 | /* Basic firmware related information. */ | 2439 | /* Basic firmware related information. */ |
| 2466 | uint16_t fw_major_version; | 2440 | uint16_t fw_major_version; |
| 2467 | uint16_t fw_minor_version; | 2441 | uint16_t fw_minor_version; |
| @@ -2473,13 +2447,15 @@ struct qla_hw_data { | |||
| 2473 | #define RISC_START_ADDRESS_2100 0x1000 | 2447 | #define RISC_START_ADDRESS_2100 0x1000 |
| 2474 | #define RISC_START_ADDRESS_2300 0x800 | 2448 | #define RISC_START_ADDRESS_2300 0x800 |
| 2475 | #define RISC_START_ADDRESS_2400 0x100000 | 2449 | #define RISC_START_ADDRESS_2400 0x100000 |
| 2450 | uint16_t fw_xcb_count; | ||
| 2476 | 2451 | ||
| 2477 | uint16_t fw_options[16]; /* slots: 1,2,3,10,11 */ | 2452 | uint16_t fw_options[16]; /* slots: 1,2,3,10,11 */ |
| 2478 | uint8_t fw_seriallink_options[4]; | 2453 | uint8_t fw_seriallink_options[4]; |
| 2479 | uint16_t fw_seriallink_options24[4]; | 2454 | uint16_t fw_seriallink_options24[4]; |
| 2480 | 2455 | ||
| 2481 | uint8_t mpi_version[4]; | 2456 | uint8_t mpi_version[3]; |
| 2482 | uint32_t mpi_capabilities; | 2457 | uint32_t mpi_capabilities; |
| 2458 | uint8_t phy_version[3]; | ||
| 2483 | 2459 | ||
| 2484 | /* Firmware dump information. */ | 2460 | /* Firmware dump information. */ |
| 2485 | struct qla2xxx_fw_dump *fw_dump; | 2461 | struct qla2xxx_fw_dump *fw_dump; |
| @@ -2545,7 +2521,10 @@ struct qla_hw_data { | |||
| 2545 | uint32_t flt_region_boot; | 2521 | uint32_t flt_region_boot; |
| 2546 | uint32_t flt_region_fw; | 2522 | uint32_t flt_region_fw; |
| 2547 | uint32_t flt_region_vpd_nvram; | 2523 | uint32_t flt_region_vpd_nvram; |
| 2524 | uint32_t flt_region_vpd; | ||
| 2525 | uint32_t flt_region_nvram; | ||
| 2548 | uint32_t flt_region_npiv_conf; | 2526 | uint32_t flt_region_npiv_conf; |
| 2527 | uint32_t flt_region_gold_fw; | ||
| 2549 | 2528 | ||
| 2550 | /* Needed for BEACON */ | 2529 | /* Needed for BEACON */ |
| 2551 | uint16_t beacon_blink_led; | 2530 | uint16_t beacon_blink_led; |
| @@ -2572,6 +2551,7 @@ struct qla_hw_data { | |||
| 2572 | struct qla_chip_state_84xx *cs84xx; | 2551 | struct qla_chip_state_84xx *cs84xx; |
| 2573 | struct qla_statistics qla_stats; | 2552 | struct qla_statistics qla_stats; |
| 2574 | struct isp_operations *isp_ops; | 2553 | struct isp_operations *isp_ops; |
| 2554 | struct workqueue_struct *wq; | ||
| 2575 | }; | 2555 | }; |
| 2576 | 2556 | ||
| 2577 | /* | 2557 | /* |
| @@ -2581,6 +2561,8 @@ typedef struct scsi_qla_host { | |||
| 2581 | struct list_head list; | 2561 | struct list_head list; |
| 2582 | struct list_head vp_fcports; /* list of fcports */ | 2562 | struct list_head vp_fcports; /* list of fcports */ |
| 2583 | struct list_head work_list; | 2563 | struct list_head work_list; |
| 2564 | spinlock_t work_lock; | ||
| 2565 | |||
| 2584 | /* Commonly used flags and state information. */ | 2566 | /* Commonly used flags and state information. */ |
| 2585 | struct Scsi_Host *host; | 2567 | struct Scsi_Host *host; |
| 2586 | unsigned long host_no; | 2568 | unsigned long host_no; |
| @@ -2613,38 +2595,19 @@ typedef struct scsi_qla_host { | |||
| 2613 | #define LOOP_RESYNC_ACTIVE 5 | 2595 | #define LOOP_RESYNC_ACTIVE 5 |
| 2614 | #define LOCAL_LOOP_UPDATE 6 /* Perform a local loop update. */ | 2596 | #define LOCAL_LOOP_UPDATE 6 /* Perform a local loop update. */ |
| 2615 | #define RSCN_UPDATE 7 /* Perform an RSCN update. */ | 2597 | #define RSCN_UPDATE 7 /* Perform an RSCN update. */ |
| 2616 | #define MAILBOX_RETRY 8 | 2598 | #define RELOGIN_NEEDED 8 |
| 2617 | #define ISP_RESET_NEEDED 9 /* Initiate a ISP reset. */ | 2599 | #define REGISTER_FC4_NEEDED 9 /* SNS FC4 registration required. */ |
| 2618 | #define FAILOVER_EVENT_NEEDED 10 | 2600 | #define ISP_ABORT_RETRY 10 /* ISP aborted. */ |
| 2619 | #define FAILOVER_EVENT 11 | 2601 | #define BEACON_BLINK_NEEDED 11 |
| 2620 | #define FAILOVER_NEEDED 12 | 2602 | #define REGISTER_FDMI_NEEDED 12 |
| 2621 | #define SCSI_RESTART_NEEDED 13 /* Processes SCSI retry queue. */ | 2603 | #define FCPORT_UPDATE_NEEDED 13 |
| 2622 | #define PORT_RESTART_NEEDED 14 /* Processes Retry queue. */ | 2604 | #define VP_DPC_NEEDED 14 /* wake up for VP dpc handling */ |
| 2623 | #define RESTART_QUEUES_NEEDED 15 /* Restarts the Lun queue. */ | 2605 | #define UNLOADING 15 |
| 2624 | #define ABORT_QUEUES_NEEDED 16 | 2606 | #define NPIV_CONFIG_NEEDED 16 |
| 2625 | #define RELOGIN_NEEDED 17 | ||
| 2626 | #define LOGIN_RETRY_NEEDED 18 /* Initiate required fabric logins. */ | ||
| 2627 | #define REGISTER_FC4_NEEDED 19 /* SNS FC4 registration required. */ | ||
| 2628 | #define ISP_ABORT_RETRY 20 /* ISP aborted. */ | ||
| 2629 | #define FCPORT_RESCAN_NEEDED 21 /* IO descriptor processing needed */ | ||
| 2630 | #define IODESC_PROCESS_NEEDED 22 /* IO descriptor processing needed */ | ||
| 2631 | #define IOCTL_ERROR_RECOVERY 23 | ||
| 2632 | #define LOOP_RESET_NEEDED 24 | ||
| 2633 | #define BEACON_BLINK_NEEDED 25 | ||
| 2634 | #define REGISTER_FDMI_NEEDED 26 | ||
| 2635 | #define FCPORT_UPDATE_NEEDED 27 | ||
| 2636 | #define VP_DPC_NEEDED 28 /* wake up for VP dpc handling */ | ||
| 2637 | #define UNLOADING 29 | ||
| 2638 | #define NPIV_CONFIG_NEEDED 30 | ||
| 2639 | 2607 | ||
| 2640 | uint32_t device_flags; | 2608 | uint32_t device_flags; |
| 2641 | #define DFLG_LOCAL_DEVICES BIT_0 | 2609 | #define SWITCH_FOUND BIT_0 |
| 2642 | #define DFLG_RETRY_LOCAL_DEVICES BIT_1 | 2610 | #define DFLG_NO_CABLE BIT_1 |
| 2643 | #define DFLG_FABRIC_DEVICES BIT_2 | ||
| 2644 | #define SWITCH_FOUND BIT_3 | ||
| 2645 | #define DFLG_NO_CABLE BIT_4 | ||
| 2646 | |||
| 2647 | srb_t *status_srb; /* Status continuation entry. */ | ||
| 2648 | 2611 | ||
| 2649 | /* ISP configuration data. */ | 2612 | /* ISP configuration data. */ |
| 2650 | uint16_t loop_id; /* Host adapter loop id */ | 2613 | uint16_t loop_id; /* Host adapter loop id */ |
| @@ -2671,6 +2634,11 @@ typedef struct scsi_qla_host { | |||
| 2671 | uint8_t node_name[WWN_SIZE]; | 2634 | uint8_t node_name[WWN_SIZE]; |
| 2672 | uint8_t port_name[WWN_SIZE]; | 2635 | uint8_t port_name[WWN_SIZE]; |
| 2673 | uint8_t fabric_node_name[WWN_SIZE]; | 2636 | uint8_t fabric_node_name[WWN_SIZE]; |
| 2637 | |||
| 2638 | uint16_t fcoe_vlan_id; | ||
| 2639 | uint16_t fcoe_fcf_idx; | ||
| 2640 | uint8_t fcoe_vn_port_mac[6]; | ||
| 2641 | |||
| 2674 | uint32_t vp_abort_cnt; | 2642 | uint32_t vp_abort_cnt; |
| 2675 | 2643 | ||
| 2676 | struct fc_vport *fc_vport; /* holds fc_vport * for each vport */ | 2644 | struct fc_vport *fc_vport; /* holds fc_vport * for each vport */ |
| @@ -2696,7 +2664,7 @@ typedef struct scsi_qla_host { | |||
| 2696 | #define VP_ERR_FAB_LOGOUT 4 | 2664 | #define VP_ERR_FAB_LOGOUT 4 |
| 2697 | #define VP_ERR_ADAP_NORESOURCES 5 | 2665 | #define VP_ERR_ADAP_NORESOURCES 5 |
| 2698 | struct qla_hw_data *hw; | 2666 | struct qla_hw_data *hw; |
| 2699 | int req_ques[QLA_MAX_HOST_QUES]; | 2667 | struct req_que *req; |
| 2700 | } scsi_qla_host_t; | 2668 | } scsi_qla_host_t; |
| 2701 | 2669 | ||
| 2702 | /* | 2670 | /* |
| @@ -2755,10 +2723,5 @@ typedef struct scsi_qla_host { | |||
| 2755 | #include "qla_inline.h" | 2723 | #include "qla_inline.h" |
| 2756 | 2724 | ||
| 2757 | #define CMD_SP(Cmnd) ((Cmnd)->SCp.ptr) | 2725 | #define CMD_SP(Cmnd) ((Cmnd)->SCp.ptr) |
| 2758 | #define CMD_COMPL_STATUS(Cmnd) ((Cmnd)->SCp.this_residual) | ||
| 2759 | #define CMD_RESID_LEN(Cmnd) ((Cmnd)->SCp.buffers_residual) | ||
| 2760 | #define CMD_SCSI_STATUS(Cmnd) ((Cmnd)->SCp.Status) | ||
| 2761 | #define CMD_ACTUAL_SNSLEN(Cmnd) ((Cmnd)->SCp.Message) | ||
| 2762 | #define CMD_ENTRY_STATUS(Cmnd) ((Cmnd)->SCp.have_data_in) | ||
| 2763 | 2726 | ||
| 2764 | #endif | 2727 | #endif |
