diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2008-04-03 16:13:20 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-04-07 13:19:14 -0400 |
commit | 587f4cae4a8ce1315c3def2229c2a912637269b6 (patch) | |
tree | c2657826cd5be8f28dcdc5a3adbe60b1ccbbf149 /drivers/scsi/qla2xxx/qla_os.c | |
parent | cb8dacbf1110d8bd39413f3116ff1720f757854e (diff) |
[SCSI] qla2xxx: Cruft cleanup of functions and structures.
Strip unused (DEBUG-ONLY) enabled functions, inlines, useless
wrappers, and unused DPC flags from the code. Another step in
the migration towards a cleaner (less-crusty) driver.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 62 |
1 files changed, 2 insertions, 60 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 3d290417bfc6..c0f6f66c358f 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -26,9 +26,6 @@ char qla2x00_version_str[40]; | |||
26 | */ | 26 | */ |
27 | static struct kmem_cache *srb_cachep; | 27 | static struct kmem_cache *srb_cachep; |
28 | 28 | ||
29 | /* | ||
30 | * Ioctl related information. | ||
31 | */ | ||
32 | int num_hosts; | 29 | int num_hosts; |
33 | int ql2xlogintimeout = 20; | 30 | int ql2xlogintimeout = 20; |
34 | module_param(ql2xlogintimeout, int, S_IRUGO|S_IRUSR); | 31 | module_param(ql2xlogintimeout, int, S_IRUGO|S_IRUSR); |
@@ -105,7 +102,6 @@ static int qla2xxx_eh_abort(struct scsi_cmnd *); | |||
105 | static int qla2xxx_eh_device_reset(struct scsi_cmnd *); | 102 | static int qla2xxx_eh_device_reset(struct scsi_cmnd *); |
106 | static int qla2xxx_eh_bus_reset(struct scsi_cmnd *); | 103 | static int qla2xxx_eh_bus_reset(struct scsi_cmnd *); |
107 | static int qla2xxx_eh_host_reset(struct scsi_cmnd *); | 104 | static int qla2xxx_eh_host_reset(struct scsi_cmnd *); |
108 | static int qla2x00_device_reset(scsi_qla_host_t *, fc_port_t *); | ||
109 | 105 | ||
110 | static int qla2x00_change_queue_depth(struct scsi_device *, int); | 106 | static int qla2x00_change_queue_depth(struct scsi_device *, int); |
111 | static int qla2x00_change_queue_type(struct scsi_device *, int); | 107 | static int qla2x00_change_queue_type(struct scsi_device *, int); |
@@ -685,7 +681,6 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) | |||
685 | 681 | ||
686 | DEBUG2(printk("%s(%ld): aborting sp %p from RISC. pid=%ld.\n", | 682 | DEBUG2(printk("%s(%ld): aborting sp %p from RISC. pid=%ld.\n", |
687 | __func__, ha->host_no, sp, serial)); | 683 | __func__, ha->host_no, sp, serial)); |
688 | DEBUG3(qla2x00_print_scsi_cmd(cmd)); | ||
689 | 684 | ||
690 | spin_unlock_irqrestore(&pha->hardware_lock, flags); | 685 | spin_unlock_irqrestore(&pha->hardware_lock, flags); |
691 | if (ha->isp_ops->abort_command(ha, sp)) { | 686 | if (ha->isp_ops->abort_command(ha, sp)) { |
@@ -814,7 +809,7 @@ qla2xxx_eh_device_reset(struct scsi_cmnd *cmd) | |||
814 | goto eh_dev_reset_done; | 809 | goto eh_dev_reset_done; |
815 | 810 | ||
816 | if (qla2x00_wait_for_loop_ready(ha) == QLA_SUCCESS) { | 811 | if (qla2x00_wait_for_loop_ready(ha) == QLA_SUCCESS) { |
817 | if (qla2x00_device_reset(ha, fcport) == 0) | 812 | if (ha->isp_ops->abort_target(fcport) == 0) |
818 | ret = SUCCESS; | 813 | ret = SUCCESS; |
819 | } else { | 814 | } else { |
820 | DEBUG2(printk(KERN_INFO | 815 | DEBUG2(printk(KERN_INFO |
@@ -1071,7 +1066,7 @@ qla2x00_loop_reset(scsi_qla_host_t *ha) | |||
1071 | if (fcport->port_type != FCT_TARGET) | 1066 | if (fcport->port_type != FCT_TARGET) |
1072 | continue; | 1067 | continue; |
1073 | 1068 | ||
1074 | ret = qla2x00_device_reset(ha, fcport); | 1069 | ret = ha->isp_ops->abort_target(fcport); |
1075 | if (ret != QLA_SUCCESS) { | 1070 | if (ret != QLA_SUCCESS) { |
1076 | DEBUG2_3(printk("%s(%ld): bus_reset failed: " | 1071 | DEBUG2_3(printk("%s(%ld): bus_reset failed: " |
1077 | "target_reset=%d d_id=%x.\n", __func__, | 1072 | "target_reset=%d d_id=%x.\n", __func__, |
@@ -1086,26 +1081,6 @@ qla2x00_loop_reset(scsi_qla_host_t *ha) | |||
1086 | return QLA_SUCCESS; | 1081 | return QLA_SUCCESS; |
1087 | } | 1082 | } |
1088 | 1083 | ||
1089 | /* | ||
1090 | * qla2x00_device_reset | ||
1091 | * Issue bus device reset message to the target. | ||
1092 | * | ||
1093 | * Input: | ||
1094 | * ha = adapter block pointer. | ||
1095 | * t = SCSI ID. | ||
1096 | * TARGET_QUEUE_LOCK must be released. | ||
1097 | * ADAPTER_STATE_LOCK must be released. | ||
1098 | * | ||
1099 | * Context: | ||
1100 | * Kernel context. | ||
1101 | */ | ||
1102 | static int | ||
1103 | qla2x00_device_reset(scsi_qla_host_t *ha, fc_port_t *reset_fcport) | ||
1104 | { | ||
1105 | /* Abort Target command will clear Reservation */ | ||
1106 | return ha->isp_ops->abort_target(reset_fcport); | ||
1107 | } | ||
1108 | |||
1109 | void | 1084 | void |
1110 | qla2x00_abort_all_cmds(scsi_qla_host_t *ha, int res) | 1085 | qla2x00_abort_all_cmds(scsi_qla_host_t *ha, int res) |
1111 | { | 1086 | { |
@@ -2378,12 +2353,6 @@ qla2x00_do_dpc(void *data) | |||
2378 | if (test_and_clear_bit(FCPORT_UPDATE_NEEDED, &ha->dpc_flags)) | 2353 | if (test_and_clear_bit(FCPORT_UPDATE_NEEDED, &ha->dpc_flags)) |
2379 | qla2x00_update_fcports(ha); | 2354 | qla2x00_update_fcports(ha); |
2380 | 2355 | ||
2381 | if (test_and_clear_bit(LOOP_RESET_NEEDED, &ha->dpc_flags)) { | ||
2382 | DEBUG(printk("scsi(%ld): dpc: sched loop_reset()\n", | ||
2383 | ha->host_no)); | ||
2384 | qla2x00_loop_reset(ha); | ||
2385 | } | ||
2386 | |||
2387 | if (test_and_clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags) && | 2356 | if (test_and_clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags) && |
2388 | (!(test_and_set_bit(RESET_ACTIVE, &ha->dpc_flags)))) { | 2357 | (!(test_and_set_bit(RESET_ACTIVE, &ha->dpc_flags)))) { |
2389 | 2358 | ||
@@ -2454,19 +2423,6 @@ qla2x00_do_dpc(void *data) | |||
2454 | ha->host_no)); | 2423 | ha->host_no)); |
2455 | } | 2424 | } |
2456 | 2425 | ||
2457 | if ((test_bit(LOGIN_RETRY_NEEDED, &ha->dpc_flags)) && | ||
2458 | atomic_read(&ha->loop_state) != LOOP_DOWN) { | ||
2459 | |||
2460 | clear_bit(LOGIN_RETRY_NEEDED, &ha->dpc_flags); | ||
2461 | DEBUG(printk("scsi(%ld): qla2x00_login_retry()\n", | ||
2462 | ha->host_no)); | ||
2463 | |||
2464 | set_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags); | ||
2465 | |||
2466 | DEBUG(printk("scsi(%ld): qla2x00_login_retry - end\n", | ||
2467 | ha->host_no)); | ||
2468 | } | ||
2469 | |||
2470 | if (test_and_clear_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)) { | 2426 | if (test_and_clear_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)) { |
2471 | 2427 | ||
2472 | DEBUG(printk("scsi(%ld): qla2x00_loop_resync()\n", | 2428 | DEBUG(printk("scsi(%ld): qla2x00_loop_resync()\n", |
@@ -2484,18 +2440,6 @@ qla2x00_do_dpc(void *data) | |||
2484 | ha->host_no)); | 2440 | ha->host_no)); |
2485 | } | 2441 | } |
2486 | 2442 | ||
2487 | if (test_and_clear_bit(FCPORT_RESCAN_NEEDED, &ha->dpc_flags)) { | ||
2488 | |||
2489 | DEBUG(printk("scsi(%ld): Rescan flagged fcports...\n", | ||
2490 | ha->host_no)); | ||
2491 | |||
2492 | qla2x00_rescan_fcports(ha); | ||
2493 | |||
2494 | DEBUG(printk("scsi(%ld): Rescan flagged fcports..." | ||
2495 | "end.\n", | ||
2496 | ha->host_no)); | ||
2497 | } | ||
2498 | |||
2499 | if (!ha->interrupts_on) | 2443 | if (!ha->interrupts_on) |
2500 | ha->isp_ops->enable_intrs(ha); | 2444 | ha->isp_ops->enable_intrs(ha); |
2501 | 2445 | ||
@@ -2697,10 +2641,8 @@ qla2x00_timer(scsi_qla_host_t *ha) | |||
2697 | /* Schedule the DPC routine if needed */ | 2641 | /* Schedule the DPC routine if needed */ |
2698 | if ((test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || | 2642 | if ((test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || |
2699 | test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || | 2643 | test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || |
2700 | test_bit(LOOP_RESET_NEEDED, &ha->dpc_flags) || | ||
2701 | test_bit(FCPORT_UPDATE_NEEDED, &ha->dpc_flags) || | 2644 | test_bit(FCPORT_UPDATE_NEEDED, &ha->dpc_flags) || |
2702 | start_dpc || | 2645 | start_dpc || |
2703 | test_bit(LOGIN_RETRY_NEEDED, &ha->dpc_flags) || | ||
2704 | test_bit(RESET_MARKER_NEEDED, &ha->dpc_flags) || | 2646 | test_bit(RESET_MARKER_NEEDED, &ha->dpc_flags) || |
2705 | test_bit(BEACON_BLINK_NEEDED, &ha->dpc_flags) || | 2647 | test_bit(BEACON_BLINK_NEEDED, &ha->dpc_flags) || |
2706 | test_bit(VP_DPC_NEEDED, &ha->dpc_flags) || | 2648 | test_bit(VP_DPC_NEEDED, &ha->dpc_flags) || |