diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2005-04-23 02:47:27 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-05-20 13:53:25 -0400 |
commit | 354d6b2196c8e53e55e8f169804256ab9c72731d (patch) | |
tree | 2bdbd7618c154ab2614e6d1573cd0c348072d370 /drivers | |
parent | b86fff7368b139171edab66972ea1309092f519e (diff) |
[SCSI] remove some dead code in qla2xxx
Original from: Christoph Hellwig <hch@lst.de>
Modified and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_dbg.c | 3 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 60 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_gbl.h | 14 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 33 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_iocb.c | 3 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 18 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 6 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 79 |
8 files changed, 12 insertions, 204 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index c4cd4ac414c4..329d1a1fa547 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c | |||
@@ -1063,8 +1063,7 @@ qla2x00_print_scsi_cmd(struct scsi_cmnd * cmd) | |||
1063 | return; | 1063 | return; |
1064 | 1064 | ||
1065 | printk(" sp flags=0x%x\n", sp->flags); | 1065 | printk(" sp flags=0x%x\n", sp->flags); |
1066 | printk(" r_start=0x%lx, u_start=0x%lx, f_start=0x%lx, state=%d\n", | 1066 | printk(" state=%d\n", sp->state); |
1067 | sp->r_start, sp->u_start, sp->f_start, sp->state); | ||
1068 | } | 1067 | } |
1069 | 1068 | ||
1070 | #if defined(QL_DEBUG_ROUTINES) | 1069 | #if defined(QL_DEBUG_ROUTINES) |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 7d47b8d92047..83a32e403e29 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -252,31 +252,12 @@ typedef struct srb { | |||
252 | /* Request state */ | 252 | /* Request state */ |
253 | uint16_t state; | 253 | uint16_t state; |
254 | 254 | ||
255 | /* Timing counts. */ | ||
256 | unsigned long e_start; /* Start of extend timeout */ | ||
257 | unsigned long r_start; /* Start of request */ | ||
258 | unsigned long u_start; /* When sent to RISC */ | ||
259 | unsigned long f_start; /* When placed in FO queue*/ | ||
260 | |||
261 | /* Single transfer DMA context */ | 255 | /* Single transfer DMA context */ |
262 | dma_addr_t dma_handle; | 256 | dma_addr_t dma_handle; |
263 | 257 | ||
264 | uint32_t request_sense_length; | 258 | uint32_t request_sense_length; |
265 | uint8_t *request_sense_ptr; | 259 | uint8_t *request_sense_ptr; |
266 | 260 | ||
267 | int ext_history; | ||
268 | |||
269 | /* Suspend delay */ | ||
270 | int delay; | ||
271 | |||
272 | /* Raw completion info for use by failover ? */ | ||
273 | uint8_t fo_retry_cnt; /* Retry count this request */ | ||
274 | uint8_t err_id; /* error id */ | ||
275 | #define SRB_ERR_PORT 1 /* Request failed -- "port down" */ | ||
276 | #define SRB_ERR_LOOP 2 /* Request failed -- "loop down" */ | ||
277 | #define SRB_ERR_DEVICE 3 /* Request failed -- "device error" */ | ||
278 | #define SRB_ERR_OTHER 4 | ||
279 | |||
280 | /* SRB magic number */ | 261 | /* SRB magic number */ |
281 | uint16_t magic; | 262 | uint16_t magic; |
282 | #define SRB_MAGIC 0x10CB | 263 | #define SRB_MAGIC 0x10CB |
@@ -2082,23 +2063,8 @@ typedef struct scsi_qla_host { | |||
2082 | uint32_t current_outstanding_cmd; | 2063 | uint32_t current_outstanding_cmd; |
2083 | srb_t *status_srb; /* Status continuation entry. */ | 2064 | srb_t *status_srb; /* Status continuation entry. */ |
2084 | 2065 | ||
2085 | unsigned long last_irq_cpu; /* cpu where we got our last irq */ | ||
2086 | |||
2087 | uint16_t revision; | 2066 | uint16_t revision; |
2088 | uint8_t ports; | 2067 | uint8_t ports; |
2089 | u_long actthreads; | ||
2090 | u_long ipreq_cnt; | ||
2091 | u_long qthreads; | ||
2092 | |||
2093 | uint32_t total_isr_cnt; /* Interrupt count */ | ||
2094 | uint32_t total_isp_aborts; /* controller err cnt */ | ||
2095 | uint32_t total_lip_cnt; /* LIP cnt */ | ||
2096 | uint32_t total_dev_errs; /* device error cnt */ | ||
2097 | uint32_t total_ios; /* IO cnt */ | ||
2098 | uint64_t total_bytes; /* xfr byte cnt */ | ||
2099 | uint32_t total_mbx_timeout; /* mailbox timeout cnt */ | ||
2100 | uint32_t total_loop_resync; /* loop resyn cnt */ | ||
2101 | uint32_t dropped_frame_error_cnt; | ||
2102 | 2068 | ||
2103 | /* ISP configuration data. */ | 2069 | /* ISP configuration data. */ |
2104 | uint16_t loop_id; /* Host adapter loop id */ | 2070 | uint16_t loop_id; /* Host adapter loop id */ |
@@ -2124,8 +2090,6 @@ typedef struct scsi_qla_host { | |||
2124 | #define P2P_LOOP 3 | 2090 | #define P2P_LOOP 3 |
2125 | 2091 | ||
2126 | uint8_t marker_needed; | 2092 | uint8_t marker_needed; |
2127 | uint8_t sns_retry_cnt; | ||
2128 | uint8_t mem_err; | ||
2129 | 2093 | ||
2130 | uint8_t interrupts_on; | 2094 | uint8_t interrupts_on; |
2131 | 2095 | ||
@@ -2138,16 +2102,11 @@ typedef struct scsi_qla_host { | |||
2138 | uint16_t nvram_base; | 2102 | uint16_t nvram_base; |
2139 | 2103 | ||
2140 | uint16_t loop_reset_delay; | 2104 | uint16_t loop_reset_delay; |
2141 | uint16_t minimum_timeout; | ||
2142 | uint8_t retry_count; | 2105 | uint8_t retry_count; |
2143 | uint8_t login_timeout; | 2106 | uint8_t login_timeout; |
2144 | uint16_t r_a_tov; | 2107 | uint16_t r_a_tov; |
2145 | int port_down_retry_count; | 2108 | int port_down_retry_count; |
2146 | uint8_t loop_down_timeout; | ||
2147 | uint8_t mbx_count; | 2109 | uint8_t mbx_count; |
2148 | uint16_t max_probe_luns; | ||
2149 | uint16_t max_luns; | ||
2150 | uint16_t max_targets; | ||
2151 | uint16_t last_loop_id; | 2110 | uint16_t last_loop_id; |
2152 | 2111 | ||
2153 | uint32_t login_retry_count; | 2112 | uint32_t login_retry_count; |
@@ -2181,7 +2140,6 @@ typedef struct scsi_qla_host { | |||
2181 | uint8_t dpc_active; /* DPC routine is active */ | 2140 | uint8_t dpc_active; /* DPC routine is active */ |
2182 | 2141 | ||
2183 | /* Timeout timers. */ | 2142 | /* Timeout timers. */ |
2184 | uint8_t queue_restart_timer; | ||
2185 | uint8_t loop_down_abort_time; /* port down timer */ | 2143 | uint8_t loop_down_abort_time; /* port down timer */ |
2186 | atomic_t loop_down_timer; /* loop down timer */ | 2144 | atomic_t loop_down_timer; /* loop down timer */ |
2187 | uint8_t link_down_timeout; /* link down timeout */ | 2145 | uint8_t link_down_timeout; /* link down timeout */ |
@@ -2230,18 +2188,6 @@ typedef struct scsi_qla_host { | |||
2230 | 2188 | ||
2231 | mbx_cmd_t mc; | 2189 | mbx_cmd_t mc; |
2232 | 2190 | ||
2233 | uint8_t *cmdline; | ||
2234 | |||
2235 | uint32_t failover_type; | ||
2236 | uint32_t failback_delay; | ||
2237 | unsigned long cfg_flags; | ||
2238 | #define CFG_ACTIVE 0 /* CFG during a failover, event update, or ioctl */ | ||
2239 | #define CFG_FAILOVER 1 /* CFG during path change */ | ||
2240 | |||
2241 | uint32_t binding_type; | ||
2242 | #define BIND_BY_PORT_NAME 0 | ||
2243 | #define BIND_BY_PORT_ID 1 | ||
2244 | |||
2245 | /* Basic firmware related information. */ | 2191 | /* Basic firmware related information. */ |
2246 | struct qla_board_info *brd_info; | 2192 | struct qla_board_info *brd_info; |
2247 | uint16_t fw_major_version; | 2193 | uint16_t fw_major_version; |
@@ -2274,12 +2220,6 @@ typedef struct scsi_qla_host { | |||
2274 | uint8_t nvram_version; | 2220 | uint8_t nvram_version; |
2275 | uint32_t isp_abort_cnt; | 2221 | uint32_t isp_abort_cnt; |
2276 | 2222 | ||
2277 | /* Adapter I/O statistics for failover */ | ||
2278 | uint64_t IosRequested; | ||
2279 | uint64_t BytesRequested; | ||
2280 | uint64_t IosExecuted; | ||
2281 | uint64_t BytesExecuted; | ||
2282 | |||
2283 | /* Needed for BEACON */ | 2223 | /* Needed for BEACON */ |
2284 | uint16_t beacon_blink_led; | 2224 | uint16_t beacon_blink_led; |
2285 | uint16_t beacon_green_on; | 2225 | uint16_t beacon_green_on; |
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index 2efec6c24d60..164866b199e6 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h | |||
@@ -53,27 +53,13 @@ extern void qla2x00_reg_remote_port(scsi_qla_host_t *, fc_port_t *); | |||
53 | */ | 53 | */ |
54 | extern char qla2x00_version_str[]; | 54 | extern char qla2x00_version_str[]; |
55 | 55 | ||
56 | extern int num_hosts; | ||
57 | extern int apiHBAInstance; | ||
58 | |||
59 | extern struct _qla2x00stats qla2x00_stats; | ||
60 | extern int ql2xretrycount; | ||
61 | extern int ql2xlogintimeout; | 56 | extern int ql2xlogintimeout; |
62 | extern int qlport_down_retry; | 57 | extern int qlport_down_retry; |
63 | extern int ql2xmaxqdepth; | ||
64 | extern int displayConfig; | ||
65 | extern int ql2xplogiabsentdevice; | 58 | extern int ql2xplogiabsentdevice; |
66 | extern int ql2xenablezio; | 59 | extern int ql2xenablezio; |
67 | extern int ql2xintrdelaytimer; | 60 | extern int ql2xintrdelaytimer; |
68 | extern int ql2xloginretrycount; | 61 | extern int ql2xloginretrycount; |
69 | 62 | ||
70 | extern int ConfigRequired; | ||
71 | |||
72 | extern int Bind; | ||
73 | extern int ql2xsuspendcount; | ||
74 | #if defined(MODULE) | ||
75 | extern char *ql2xopts; | ||
76 | #endif | ||
77 | extern void qla2x00_sp_compl(scsi_qla_host_t *, srb_t *); | 63 | extern void qla2x00_sp_compl(scsi_qla_host_t *, srb_t *); |
78 | 64 | ||
79 | extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *); | 65 | extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *); |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 0387005fcb6d..7629558eba25 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -85,9 +85,7 @@ qla2x00_initialize_adapter(scsi_qla_host_t *ha) | |||
85 | atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); | 85 | atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); |
86 | atomic_set(&ha->loop_state, LOOP_DOWN); | 86 | atomic_set(&ha->loop_state, LOOP_DOWN); |
87 | ha->device_flags = 0; | 87 | ha->device_flags = 0; |
88 | ha->sns_retry_cnt = 0; | ||
89 | ha->dpc_flags = 0; | 88 | ha->dpc_flags = 0; |
90 | ha->failback_delay = 0; | ||
91 | ha->flags.management_server_logged_in = 0; | 89 | ha->flags.management_server_logged_in = 0; |
92 | ha->marker_needed = 0; | 90 | ha->marker_needed = 0; |
93 | ha->mbx_flags = 0; | 91 | ha->mbx_flags = 0; |
@@ -171,8 +169,6 @@ check_fw_ready_again: | |||
171 | 169 | ||
172 | if (wait_time == 0) | 170 | if (wait_time == 0) |
173 | rval = QLA_FUNCTION_FAILED; | 171 | rval = QLA_FUNCTION_FAILED; |
174 | if (ha->mem_err) | ||
175 | restart_risc = 1; | ||
176 | } else if (ha->device_flags & DFLG_NO_CABLE) | 172 | } else if (ha->device_flags & DFLG_NO_CABLE) |
177 | /* If no cable, then all is good. */ | 173 | /* If no cable, then all is good. */ |
178 | rval = QLA_SUCCESS; | 174 | rval = QLA_SUCCESS; |
@@ -1410,13 +1406,8 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) | |||
1410 | /* Set minimum RATOV to 200 tenths of a second. */ | 1406 | /* Set minimum RATOV to 200 tenths of a second. */ |
1411 | ha->r_a_tov = 200; | 1407 | ha->r_a_tov = 200; |
1412 | 1408 | ||
1413 | ha->minimum_timeout = | ||
1414 | (ha->login_timeout * ha->retry_count) + nv->port_down_retry_count; | ||
1415 | ha->loop_reset_delay = nv->reset_delay; | 1409 | ha->loop_reset_delay = nv->reset_delay; |
1416 | 1410 | ||
1417 | /* Will get the value from NVRAM. */ | ||
1418 | ha->loop_down_timeout = LOOP_DOWN_TIMEOUT; | ||
1419 | |||
1420 | /* Link Down Timeout = 0: | 1411 | /* Link Down Timeout = 0: |
1421 | * | 1412 | * |
1422 | * When Port Down timer expires we will start returning | 1413 | * When Port Down timer expires we will start returning |
@@ -1429,18 +1420,13 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) | |||
1429 | */ | 1420 | */ |
1430 | if (nv->link_down_timeout == 0) { | 1421 | if (nv->link_down_timeout == 0) { |
1431 | ha->loop_down_abort_time = | 1422 | ha->loop_down_abort_time = |
1432 | (LOOP_DOWN_TIME - ha->loop_down_timeout); | 1423 | (LOOP_DOWN_TIME - LOOP_DOWN_TIMEOUT); |
1433 | } else { | 1424 | } else { |
1434 | ha->link_down_timeout = nv->link_down_timeout; | 1425 | ha->link_down_timeout = nv->link_down_timeout; |
1435 | ha->loop_down_abort_time = | 1426 | ha->loop_down_abort_time = |
1436 | (LOOP_DOWN_TIME - ha->link_down_timeout); | 1427 | (LOOP_DOWN_TIME - ha->link_down_timeout); |
1437 | } | 1428 | } |
1438 | 1429 | ||
1439 | ha->max_luns = MAX_LUNS; | ||
1440 | ha->max_probe_luns = le16_to_cpu(nv->max_luns_per_target); | ||
1441 | if (ha->max_probe_luns == 0) | ||
1442 | ha->max_probe_luns = MIN_LUNS; | ||
1443 | |||
1444 | /* | 1430 | /* |
1445 | * Need enough time to try and get the port back. | 1431 | * Need enough time to try and get the port back. |
1446 | */ | 1432 | */ |
@@ -1457,16 +1443,6 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) | |||
1457 | if (ql2xloginretrycount) | 1443 | if (ql2xloginretrycount) |
1458 | ha->login_retry_count = ql2xloginretrycount; | 1444 | ha->login_retry_count = ql2xloginretrycount; |
1459 | 1445 | ||
1460 | ha->binding_type = Bind; | ||
1461 | if (ha->binding_type != BIND_BY_PORT_NAME && | ||
1462 | ha->binding_type != BIND_BY_PORT_ID) { | ||
1463 | qla_printk(KERN_WARNING, ha, | ||
1464 | "Invalid binding type specified (%d), " | ||
1465 | "defaulting to BIND_BY_PORT_NAME!!!\n", ha->binding_type); | ||
1466 | |||
1467 | ha->binding_type = BIND_BY_PORT_NAME; | ||
1468 | } | ||
1469 | |||
1470 | icb->lun_enables = __constant_cpu_to_le16(0); | 1446 | icb->lun_enables = __constant_cpu_to_le16(0); |
1471 | icb->command_resource_count = 0; | 1447 | icb->command_resource_count = 0; |
1472 | icb->immediate_notify_resource_count = 0; | 1448 | icb->immediate_notify_resource_count = 0; |
@@ -1578,7 +1554,6 @@ qla2x00_configure_loop(scsi_qla_host_t *ha) | |||
1578 | */ | 1554 | */ |
1579 | clear_bit(LOCAL_LOOP_UPDATE, &ha->dpc_flags); | 1555 | clear_bit(LOCAL_LOOP_UPDATE, &ha->dpc_flags); |
1580 | clear_bit(RSCN_UPDATE, &ha->dpc_flags); | 1556 | clear_bit(RSCN_UPDATE, &ha->dpc_flags); |
1581 | ha->mem_err = 0 ; | ||
1582 | 1557 | ||
1583 | /* Determine what we need to do */ | 1558 | /* Determine what we need to do */ |
1584 | if (ha->current_topology == ISP_CFG_FL && | 1559 | if (ha->current_topology == ISP_CFG_FL && |
@@ -2707,7 +2682,6 @@ qla2x00_loop_resync(scsi_qla_host_t *ha) | |||
2707 | rval = QLA_SUCCESS; | 2682 | rval = QLA_SUCCESS; |
2708 | 2683 | ||
2709 | atomic_set(&ha->loop_state, LOOP_UPDATE); | 2684 | atomic_set(&ha->loop_state, LOOP_UPDATE); |
2710 | qla2x00_stats.loop_resync++; | ||
2711 | clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags); | 2685 | clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags); |
2712 | if (ha->flags.online) { | 2686 | if (ha->flags.online) { |
2713 | if (!(rval = qla2x00_fw_ready(ha))) { | 2687 | if (!(rval = qla2x00_fw_ready(ha))) { |
@@ -2786,9 +2760,6 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
2786 | if (ha->flags.online) { | 2760 | if (ha->flags.online) { |
2787 | ha->flags.online = 0; | 2761 | ha->flags.online = 0; |
2788 | clear_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); | 2762 | clear_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); |
2789 | qla2x00_stats.ispAbort++; | ||
2790 | ha->total_isp_aborts++; /* used by ioctl */ | ||
2791 | ha->sns_retry_cnt = 0; | ||
2792 | 2763 | ||
2793 | qla_printk(KERN_INFO, ha, | 2764 | qla_printk(KERN_INFO, ha, |
2794 | "Performing ISP error recovery - ha= %p.\n", ha); | 2765 | "Performing ISP error recovery - ha= %p.\n", ha); |
@@ -2810,8 +2781,6 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
2810 | sp = ha->outstanding_cmds[cnt]; | 2781 | sp = ha->outstanding_cmds[cnt]; |
2811 | if (sp) { | 2782 | if (sp) { |
2812 | ha->outstanding_cmds[cnt] = NULL; | 2783 | ha->outstanding_cmds[cnt] = NULL; |
2813 | if (ha->actthreads) | ||
2814 | ha->actthreads--; | ||
2815 | sp->flags = 0; | 2784 | sp->flags = 0; |
2816 | sp->cmd->result = DID_RESET << 16; | 2785 | sp->cmd->result = DID_RESET << 16; |
2817 | sp->cmd->host_scribble = (unsigned char *)NULL; | 2786 | sp->cmd->host_scribble = (unsigned char *)NULL; |
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index af964bb3d870..ecaf9f83b2d4 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c | |||
@@ -433,11 +433,8 @@ qla2x00_start_scsi(srb_t *sp) | |||
433 | } else | 433 | } else |
434 | ha->request_ring_ptr++; | 434 | ha->request_ring_ptr++; |
435 | 435 | ||
436 | ha->actthreads++; | ||
437 | ha->total_ios++; | ||
438 | sp->flags |= SRB_DMA_VALID; | 436 | sp->flags |= SRB_DMA_VALID; |
439 | sp->state = SRB_ACTIVE_STATE; | 437 | sp->state = SRB_ACTIVE_STATE; |
440 | sp->u_start = jiffies; | ||
441 | 438 | ||
442 | /* Set chip new ring index. */ | 439 | /* Set chip new ring index. */ |
443 | WRT_REG_WORD(ISP_REQ_Q_IN(ha, reg), ha->req_ring_index); | 440 | WRT_REG_WORD(ISP_REQ_Q_IN(ha, reg), ha->req_ring_index); |
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 6792cfae56e2..e7a8b74157a5 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -91,9 +91,6 @@ qla2100_intr_handler(int irq, void *dev_id, struct pt_regs *regs) | |||
91 | } | 91 | } |
92 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 92 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
93 | 93 | ||
94 | ha->last_irq_cpu = _smp_processor_id(); | ||
95 | ha->total_isr_cnt++; | ||
96 | |||
97 | if (test_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags) && | 94 | if (test_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags) && |
98 | (status & MBX_INTERRUPT) && ha->flags.mbox_int) { | 95 | (status & MBX_INTERRUPT) && ha->flags.mbox_int) { |
99 | spin_lock_irqsave(&ha->mbx_reg_lock, flags); | 96 | spin_lock_irqsave(&ha->mbx_reg_lock, flags); |
@@ -200,9 +197,6 @@ qla2300_intr_handler(int irq, void *dev_id, struct pt_regs *regs) | |||
200 | } | 197 | } |
201 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 198 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
202 | 199 | ||
203 | ha->last_irq_cpu = _smp_processor_id(); | ||
204 | ha->total_isr_cnt++; | ||
205 | |||
206 | if (test_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags) && | 200 | if (test_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags) && |
207 | (status & MBX_INTERRUPT) && ha->flags.mbox_int) { | 201 | (status & MBX_INTERRUPT) && ha->flags.mbox_int) { |
208 | spin_lock_irqsave(&ha->mbx_reg_lock, flags); | 202 | spin_lock_irqsave(&ha->mbx_reg_lock, flags); |
@@ -417,7 +411,6 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint32_t mbx) | |||
417 | /* Update AEN queue. */ | 411 | /* Update AEN queue. */ |
418 | qla2x00_enqueue_aen(ha, MBA_LIP_OCCURRED, NULL); | 412 | qla2x00_enqueue_aen(ha, MBA_LIP_OCCURRED, NULL); |
419 | 413 | ||
420 | ha->total_lip_cnt++; | ||
421 | break; | 414 | break; |
422 | 415 | ||
423 | case MBA_LOOP_UP: /* Loop Up Event */ | 416 | case MBA_LOOP_UP: /* Loop Up Event */ |
@@ -485,7 +478,6 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint32_t mbx) | |||
485 | /* Update AEN queue. */ | 478 | /* Update AEN queue. */ |
486 | qla2x00_enqueue_aen(ha, MBA_LIP_RESET, NULL); | 479 | qla2x00_enqueue_aen(ha, MBA_LIP_RESET, NULL); |
487 | 480 | ||
488 | ha->total_lip_cnt++; | ||
489 | break; | 481 | break; |
490 | 482 | ||
491 | case MBA_POINT_TO_POINT: /* Point-to-Point */ | 483 | case MBA_POINT_TO_POINT: /* Point-to-Point */ |
@@ -695,14 +687,11 @@ qla2x00_process_completed_request(struct scsi_qla_host *ha, uint32_t index) | |||
695 | /* Free outstanding command slot. */ | 687 | /* Free outstanding command slot. */ |
696 | ha->outstanding_cmds[index] = NULL; | 688 | ha->outstanding_cmds[index] = NULL; |
697 | 689 | ||
698 | if (ha->actthreads) | ||
699 | ha->actthreads--; | ||
700 | CMD_COMPL_STATUS(sp->cmd) = 0L; | 690 | CMD_COMPL_STATUS(sp->cmd) = 0L; |
701 | CMD_SCSI_STATUS(sp->cmd) = 0L; | 691 | CMD_SCSI_STATUS(sp->cmd) = 0L; |
702 | 692 | ||
703 | /* Save ISP completion status */ | 693 | /* Save ISP completion status */ |
704 | sp->cmd->result = DID_OK << 16; | 694 | sp->cmd->result = DID_OK << 16; |
705 | sp->fo_retry_cnt = 0; | ||
706 | qla2x00_sp_compl(ha, sp); | 695 | qla2x00_sp_compl(ha, sp); |
707 | } else { | 696 | } else { |
708 | DEBUG2(printk("scsi(%ld): Invalid ISP SCSI completion handle\n", | 697 | DEBUG2(printk("scsi(%ld): Invalid ISP SCSI completion handle\n", |
@@ -865,9 +854,6 @@ qla2x00_status_entry(scsi_qla_host_t *ha, sts_entry_t *pkt) | |||
865 | return; | 854 | return; |
866 | } | 855 | } |
867 | 856 | ||
868 | if (ha->actthreads) | ||
869 | ha->actthreads--; | ||
870 | |||
871 | comp_status = le16_to_cpu(pkt->comp_status); | 857 | comp_status = le16_to_cpu(pkt->comp_status); |
872 | /* Mask of reserved bits 12-15, before we examine the scsi status */ | 858 | /* Mask of reserved bits 12-15, before we examine the scsi status */ |
873 | scsi_status = le16_to_cpu(pkt->scsi_status) & SS_MASK; | 859 | scsi_status = le16_to_cpu(pkt->scsi_status) & SS_MASK; |
@@ -1026,7 +1012,6 @@ qla2x00_status_entry(scsi_qla_host_t *ha, sts_entry_t *pkt) | |||
1026 | cp->request_bufflen)); | 1012 | cp->request_bufflen)); |
1027 | 1013 | ||
1028 | cp->result = DID_BUS_BUSY << 16; | 1014 | cp->result = DID_BUS_BUSY << 16; |
1029 | ha->dropped_frame_error_cnt++; | ||
1030 | break; | 1015 | break; |
1031 | } | 1016 | } |
1032 | 1017 | ||
@@ -1233,8 +1218,7 @@ qla2x00_error_entry(scsi_qla_host_t *ha, sts_entry_t *pkt) | |||
1233 | if (sp) { | 1218 | if (sp) { |
1234 | /* Free outstanding command slot. */ | 1219 | /* Free outstanding command slot. */ |
1235 | ha->outstanding_cmds[pkt->handle] = NULL; | 1220 | ha->outstanding_cmds[pkt->handle] = NULL; |
1236 | if (ha->actthreads) | 1221 | |
1237 | ha->actthreads--; | ||
1238 | /* Bad payload or header */ | 1222 | /* Bad payload or header */ |
1239 | if (pkt->entry_status & | 1223 | if (pkt->entry_status & |
1240 | (RF_INV_E_ORDER | RF_INV_E_COUNT | | 1224 | (RF_INV_E_ORDER | RF_INV_E_COUNT | |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 15f6acaca305..eeaec7c50e6a 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -219,10 +219,8 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) | |||
219 | ha->flags.mbox_int = 0; | 219 | ha->flags.mbox_int = 0; |
220 | clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); | 220 | clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); |
221 | 221 | ||
222 | if (ha->mailbox_out[0] != MBS_COMMAND_COMPLETE) { | 222 | if (ha->mailbox_out[0] != MBS_COMMAND_COMPLETE) |
223 | qla2x00_stats.mboxerr++; | ||
224 | rval = QLA_FUNCTION_FAILED; | 223 | rval = QLA_FUNCTION_FAILED; |
225 | } | ||
226 | 224 | ||
227 | /* Load return mailbox registers. */ | 225 | /* Load return mailbox registers. */ |
228 | iptr2 = mcp->mb; | 226 | iptr2 = mcp->mb; |
@@ -249,8 +247,6 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) | |||
249 | qla2x00_dump_regs(ha); | 247 | qla2x00_dump_regs(ha); |
250 | #endif | 248 | #endif |
251 | 249 | ||
252 | qla2x00_stats.mboxtout++; | ||
253 | ha->total_mbx_timeout++; | ||
254 | rval = QLA_FUNCTION_TIMEOUT; | 250 | rval = QLA_FUNCTION_TIMEOUT; |
255 | } | 251 | } |
256 | 252 | ||
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 579448222d69..7f8d747bd5e5 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -36,27 +36,12 @@ char qla2x00_version_str[40]; | |||
36 | /* | 36 | /* |
37 | * SRB allocation cache | 37 | * SRB allocation cache |
38 | */ | 38 | */ |
39 | char srb_cachep_name[16]; | 39 | static kmem_cache_t *srb_cachep; |
40 | kmem_cache_t *srb_cachep; | ||
41 | |||
42 | /* | ||
43 | * Stats for all adpaters. | ||
44 | */ | ||
45 | struct _qla2x00stats qla2x00_stats; | ||
46 | 40 | ||
47 | /* | 41 | /* |
48 | * Ioctl related information. | 42 | * Ioctl related information. |
49 | */ | 43 | */ |
50 | int num_hosts; | 44 | static int num_hosts; |
51 | int apiHBAInstance; | ||
52 | |||
53 | /* | ||
54 | * Module parameter information and variables | ||
55 | */ | ||
56 | int ql2xmaxqdepth; | ||
57 | module_param(ql2xmaxqdepth, int, S_IRUGO|S_IWUSR); | ||
58 | MODULE_PARM_DESC(ql2xmaxqdepth, | ||
59 | "Maximum queue depth to report for target devices."); | ||
60 | 45 | ||
61 | int ql2xlogintimeout = 20; | 46 | int ql2xlogintimeout = 20; |
62 | module_param(ql2xlogintimeout, int, S_IRUGO|S_IRUSR); | 47 | module_param(ql2xlogintimeout, int, S_IRUGO|S_IRUSR); |
@@ -69,12 +54,6 @@ MODULE_PARM_DESC(qlport_down_retry, | |||
69 | "Maximum number of command retries to a port that returns" | 54 | "Maximum number of command retries to a port that returns" |
70 | "a PORT-DOWN status."); | 55 | "a PORT-DOWN status."); |
71 | 56 | ||
72 | int ql2xretrycount = 20; | ||
73 | module_param(ql2xretrycount, int, S_IRUGO|S_IWUSR); | ||
74 | MODULE_PARM_DESC(ql2xretrycount, | ||
75 | "Maximum number of mid-layer retries allowed for a command. " | ||
76 | "Default value is 20, "); | ||
77 | |||
78 | int ql2xplogiabsentdevice; | 57 | int ql2xplogiabsentdevice; |
79 | module_param(ql2xplogiabsentdevice, int, S_IRUGO|S_IWUSR); | 58 | module_param(ql2xplogiabsentdevice, int, S_IRUGO|S_IWUSR); |
80 | MODULE_PARM_DESC(ql2xplogiabsentdevice, | 59 | MODULE_PARM_DESC(ql2xplogiabsentdevice, |
@@ -95,25 +74,6 @@ MODULE_PARM_DESC(ql2xintrdelaytimer, | |||
95 | "ZIO: Waiting time for Firmware before it generates an " | 74 | "ZIO: Waiting time for Firmware before it generates an " |
96 | "interrupt to the host to notify completion of request."); | 75 | "interrupt to the host to notify completion of request."); |
97 | 76 | ||
98 | int ConfigRequired; | ||
99 | module_param(ConfigRequired, int, S_IRUGO|S_IRUSR); | ||
100 | MODULE_PARM_DESC(ConfigRequired, | ||
101 | "If 1, then only configured devices passed in through the" | ||
102 | "ql2xopts parameter will be presented to the OS"); | ||
103 | |||
104 | int Bind = BIND_BY_PORT_NAME; | ||
105 | module_param(Bind, int, S_IRUGO|S_IRUSR); | ||
106 | MODULE_PARM_DESC(Bind, | ||
107 | "Target persistent binding method: " | ||
108 | "0 by Portname (default); 1 by PortID; 2 by Nodename. "); | ||
109 | |||
110 | int ql2xsuspendcount = SUSPEND_COUNT; | ||
111 | module_param(ql2xsuspendcount, int, S_IRUGO|S_IWUSR); | ||
112 | MODULE_PARM_DESC(ql2xsuspendcount, | ||
113 | "Number of 6-second suspend iterations to perform while a " | ||
114 | "target returns a <NOT READY> status. Default is 10 " | ||
115 | "iterations."); | ||
116 | |||
117 | int ql2xloginretrycount = 0; | 77 | int ql2xloginretrycount = 0; |
118 | module_param(ql2xloginretrycount, int, S_IRUGO|S_IRUSR); | 78 | module_param(ql2xloginretrycount, int, S_IRUGO|S_IRUSR); |
119 | MODULE_PARM_DESC(ql2xloginretrycount, | 79 | MODULE_PARM_DESC(ql2xloginretrycount, |
@@ -330,7 +290,6 @@ qla2x00_queuecommand(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) | |||
330 | sp->fcport = fcport; | 290 | sp->fcport = fcport; |
331 | sp->cmd = cmd; | 291 | sp->cmd = cmd; |
332 | sp->flags = 0; | 292 | sp->flags = 0; |
333 | sp->err_id = 0; | ||
334 | 293 | ||
335 | CMD_SP(cmd) = (void *)sp; | 294 | CMD_SP(cmd) = (void *)sp; |
336 | cmd->scsi_done = done; | 295 | cmd->scsi_done = done; |
@@ -474,7 +433,6 @@ qla2x00_wait_for_loop_ready(scsi_qla_host_t *ha) | |||
474 | 433 | ||
475 | while ((!atomic_read(&ha->loop_down_timer) && | 434 | while ((!atomic_read(&ha->loop_down_timer) && |
476 | atomic_read(&ha->loop_state) == LOOP_DOWN) || | 435 | atomic_read(&ha->loop_state) == LOOP_DOWN) || |
477 | test_bit(CFG_ACTIVE, &ha->cfg_flags) || | ||
478 | atomic_read(&ha->loop_state) != LOOP_READY) { | 436 | atomic_read(&ha->loop_state) != LOOP_READY) { |
479 | msleep(1000); | 437 | msleep(1000); |
480 | if (time_after_eq(jiffies, loop_timeout)) { | 438 | if (time_after_eq(jiffies, loop_timeout)) { |
@@ -1194,34 +1152,24 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info) | |||
1194 | 1152 | ||
1195 | spin_lock_init(&ha->hardware_lock); | 1153 | spin_lock_init(&ha->hardware_lock); |
1196 | 1154 | ||
1197 | /* 4.23 Initialize /proc/scsi/qla2x00 counters */ | ||
1198 | ha->actthreads = 0; | ||
1199 | ha->qthreads = 0; | ||
1200 | ha->total_isr_cnt = 0; | ||
1201 | ha->total_isp_aborts = 0; | ||
1202 | ha->total_lip_cnt = 0; | ||
1203 | ha->total_dev_errs = 0; | ||
1204 | ha->total_ios = 0; | ||
1205 | ha->total_bytes = 0; | ||
1206 | |||
1207 | ha->prev_topology = 0; | 1155 | ha->prev_topology = 0; |
1208 | ha->ports = MAX_BUSES; | 1156 | ha->ports = MAX_BUSES; |
1209 | 1157 | ||
1210 | if (IS_QLA2100(ha)) { | 1158 | if (IS_QLA2100(ha)) { |
1211 | ha->max_targets = MAX_TARGETS_2100; | 1159 | host->max_id = MAX_TARGETS_2100; |
1212 | ha->mbx_count = MAILBOX_REGISTER_COUNT_2100; | 1160 | ha->mbx_count = MAILBOX_REGISTER_COUNT_2100; |
1213 | ha->request_q_length = REQUEST_ENTRY_CNT_2100; | 1161 | ha->request_q_length = REQUEST_ENTRY_CNT_2100; |
1214 | ha->response_q_length = RESPONSE_ENTRY_CNT_2100; | 1162 | ha->response_q_length = RESPONSE_ENTRY_CNT_2100; |
1215 | ha->last_loop_id = SNS_LAST_LOOP_ID_2100; | 1163 | ha->last_loop_id = SNS_LAST_LOOP_ID_2100; |
1216 | host->sg_tablesize = 32; | 1164 | host->sg_tablesize = 32; |
1217 | } else if (IS_QLA2200(ha)) { | 1165 | } else if (IS_QLA2200(ha)) { |
1218 | ha->max_targets = MAX_TARGETS_2200; | 1166 | host->max_id = MAX_TARGETS_2200; |
1219 | ha->mbx_count = MAILBOX_REGISTER_COUNT; | 1167 | ha->mbx_count = MAILBOX_REGISTER_COUNT; |
1220 | ha->request_q_length = REQUEST_ENTRY_CNT_2200; | 1168 | ha->request_q_length = REQUEST_ENTRY_CNT_2200; |
1221 | ha->response_q_length = RESPONSE_ENTRY_CNT_2100; | 1169 | ha->response_q_length = RESPONSE_ENTRY_CNT_2100; |
1222 | ha->last_loop_id = SNS_LAST_LOOP_ID_2100; | 1170 | ha->last_loop_id = SNS_LAST_LOOP_ID_2100; |
1223 | } else /*if (IS_QLA2300(ha))*/ { | 1171 | } else /*if (IS_QLA2300(ha))*/ { |
1224 | ha->max_targets = MAX_TARGETS_2200; | 1172 | host->max_id = MAX_TARGETS_2200; |
1225 | ha->mbx_count = MAILBOX_REGISTER_COUNT; | 1173 | ha->mbx_count = MAILBOX_REGISTER_COUNT; |
1226 | ha->request_q_length = REQUEST_ENTRY_CNT_2200; | 1174 | ha->request_q_length = REQUEST_ENTRY_CNT_2200; |
1227 | ha->response_q_length = RESPONSE_ENTRY_CNT_2300; | 1175 | ha->response_q_length = RESPONSE_ENTRY_CNT_2300; |
@@ -1265,8 +1213,7 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info) | |||
1265 | host->unique_id = ha->instance; | 1213 | host->unique_id = ha->instance; |
1266 | host->max_cmd_len = MAX_CMDSZ; | 1214 | host->max_cmd_len = MAX_CMDSZ; |
1267 | host->max_channel = ha->ports - 1; | 1215 | host->max_channel = ha->ports - 1; |
1268 | host->max_id = ha->max_targets; | 1216 | host->max_lun = MAX_LUNS; |
1269 | host->max_lun = ha->max_luns; | ||
1270 | host->transportt = qla2xxx_transport_template; | 1217 | host->transportt = qla2xxx_transport_template; |
1271 | if (scsi_add_host(host, &pdev->dev)) | 1218 | if (scsi_add_host(host, &pdev->dev)) |
1272 | goto probe_alloc_failed; | 1219 | goto probe_alloc_failed; |
@@ -2336,8 +2283,7 @@ static int __init | |||
2336 | qla2x00_module_init(void) | 2283 | qla2x00_module_init(void) |
2337 | { | 2284 | { |
2338 | /* Allocate cache for SRBs. */ | 2285 | /* Allocate cache for SRBs. */ |
2339 | sprintf(srb_cachep_name, "qla2xxx_srbs"); | 2286 | srb_cachep = kmem_cache_create("qla2xxx_srbs", sizeof(srb_t), 0, |
2340 | srb_cachep = kmem_cache_create(srb_cachep_name, sizeof(srb_t), 0, | ||
2341 | SLAB_HWCACHE_ALIGN, NULL, NULL); | 2287 | SLAB_HWCACHE_ALIGN, NULL, NULL); |
2342 | if (srb_cachep == NULL) { | 2288 | if (srb_cachep == NULL) { |
2343 | printk(KERN_ERR | 2289 | printk(KERN_ERR |
@@ -2365,16 +2311,7 @@ qla2x00_module_init(void) | |||
2365 | static void __exit | 2311 | static void __exit |
2366 | qla2x00_module_exit(void) | 2312 | qla2x00_module_exit(void) |
2367 | { | 2313 | { |
2368 | /* Free SRBs cache. */ | 2314 | kmem_cache_destroy(srb_cachep); |
2369 | if (srb_cachep != NULL) { | ||
2370 | if (kmem_cache_destroy(srb_cachep) != 0) { | ||
2371 | printk(KERN_ERR | ||
2372 | "qla2xxx: Unable to free SRB cache...Memory pools " | ||
2373 | "still active?\n"); | ||
2374 | } | ||
2375 | srb_cachep = NULL; | ||
2376 | } | ||
2377 | |||
2378 | fc_release_transport(qla2xxx_transport_template); | 2315 | fc_release_transport(qla2xxx_transport_template); |
2379 | } | 2316 | } |
2380 | 2317 | ||