diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2005-07-06 13:32:07 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-07-14 11:03:15 -0400 |
commit | fa2a1ce53d4b869b74da9a770770c79f9af64914 (patch) | |
tree | da350e79117d3177f51c2788c51aeba425afd4ca /drivers/scsi/qla2xxx/qla_init.c | |
parent | ba5140b48e35aa4e4b57eb6db5cface63d7bd712 (diff) |
[SCSI] qla2xxx: Code scrubbing.
Code scrubbing.
- Remove trailing whitespace from driver files.
- Remove unused #defines and inlines.
- Standardize on C comments (// -> /* */)
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 786f2648114d..d2a367882e8b 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -123,10 +123,10 @@ qla2x00_initialize_adapter(scsi_qla_host_t *ha) | |||
123 | (rval = qla2x00_init_rings(ha)) == QLA_SUCCESS) { | 123 | (rval = qla2x00_init_rings(ha)) == QLA_SUCCESS) { |
124 | check_fw_ready_again: | 124 | check_fw_ready_again: |
125 | /* | 125 | /* |
126 | * Wait for a successful LIP up to a maximum | 126 | * Wait for a successful LIP up to a maximum |
127 | * of (in seconds): RISC login timeout value, | 127 | * of (in seconds): RISC login timeout value, |
128 | * RISC retry count value, and port down retry | 128 | * RISC retry count value, and port down retry |
129 | * value OR a minimum of 4 seconds OR If no | 129 | * value OR a minimum of 4 seconds OR If no |
130 | * cable, only 5 seconds. | 130 | * cable, only 5 seconds. |
131 | */ | 131 | */ |
132 | rval = qla2x00_fw_ready(ha); | 132 | rval = qla2x00_fw_ready(ha); |
@@ -389,7 +389,7 @@ qla2x00_isp_firmware(scsi_qla_host_t *ha) | |||
389 | int rval; | 389 | int rval; |
390 | 390 | ||
391 | /* Assume loading risc code */ | 391 | /* Assume loading risc code */ |
392 | rval = QLA_FUNCTION_FAILED; | 392 | rval = QLA_FUNCTION_FAILED; |
393 | 393 | ||
394 | if (ha->flags.disable_risc_code_load) { | 394 | if (ha->flags.disable_risc_code_load) { |
395 | DEBUG2(printk("scsi(%ld): RISC CODE NOT loaded\n", | 395 | DEBUG2(printk("scsi(%ld): RISC CODE NOT loaded\n", |
@@ -417,7 +417,7 @@ qla2x00_isp_firmware(scsi_qla_host_t *ha) | |||
417 | * Returns 0 on success. | 417 | * Returns 0 on success. |
418 | */ | 418 | */ |
419 | void | 419 | void |
420 | qla2x00_reset_chip(scsi_qla_host_t *ha) | 420 | qla2x00_reset_chip(scsi_qla_host_t *ha) |
421 | { | 421 | { |
422 | unsigned long flags = 0; | 422 | unsigned long flags = 0; |
423 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; | 423 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
@@ -673,7 +673,7 @@ qla2x00_chip_diag(scsi_qla_host_t *ha) | |||
673 | for (cnt = 6000000; cnt && (data == MBS_BUSY); cnt--) { | 673 | for (cnt = 6000000; cnt && (data == MBS_BUSY); cnt--) { |
674 | udelay(5); | 674 | udelay(5); |
675 | data = RD_MAILBOX_REG(ha, reg, 0); | 675 | data = RD_MAILBOX_REG(ha, reg, 0); |
676 | barrier(); | 676 | barrier(); |
677 | } | 677 | } |
678 | } else | 678 | } else |
679 | udelay(10); | 679 | udelay(10); |
@@ -988,7 +988,7 @@ qla2x00_update_fw_options(scsi_qla_host_t *ha) | |||
988 | emphasis = (ha->fw_seriallink_options[2] & | 988 | emphasis = (ha->fw_seriallink_options[2] & |
989 | (BIT_4 | BIT_3)) >> 3; | 989 | (BIT_4 | BIT_3)) >> 3; |
990 | tx_sens = ha->fw_seriallink_options[0] & | 990 | tx_sens = ha->fw_seriallink_options[0] & |
991 | (BIT_3 | BIT_2 | BIT_1 | BIT_0); | 991 | (BIT_3 | BIT_2 | BIT_1 | BIT_0); |
992 | rx_sens = (ha->fw_seriallink_options[0] & | 992 | rx_sens = (ha->fw_seriallink_options[0] & |
993 | (BIT_7 | BIT_6 | BIT_5 | BIT_4)) >> 4; | 993 | (BIT_7 | BIT_6 | BIT_5 | BIT_4)) >> 4; |
994 | ha->fw_options[10] = (emphasis << 14) | (swing << 8); | 994 | ha->fw_options[10] = (emphasis << 14) | (swing << 8); |
@@ -1006,7 +1006,7 @@ qla2x00_update_fw_options(scsi_qla_host_t *ha) | |||
1006 | (BIT_7 | BIT_6 | BIT_5)) >> 5; | 1006 | (BIT_7 | BIT_6 | BIT_5)) >> 5; |
1007 | emphasis = ha->fw_seriallink_options[3] & (BIT_1 | BIT_0); | 1007 | emphasis = ha->fw_seriallink_options[3] & (BIT_1 | BIT_0); |
1008 | tx_sens = ha->fw_seriallink_options[1] & | 1008 | tx_sens = ha->fw_seriallink_options[1] & |
1009 | (BIT_3 | BIT_2 | BIT_1 | BIT_0); | 1009 | (BIT_3 | BIT_2 | BIT_1 | BIT_0); |
1010 | rx_sens = (ha->fw_seriallink_options[1] & | 1010 | rx_sens = (ha->fw_seriallink_options[1] & |
1011 | (BIT_7 | BIT_6 | BIT_5 | BIT_4)) >> 4; | 1011 | (BIT_7 | BIT_6 | BIT_5 | BIT_4)) >> 4; |
1012 | ha->fw_options[11] = (emphasis << 14) | (swing << 8); | 1012 | ha->fw_options[11] = (emphasis << 14) | (swing << 8); |
@@ -1171,7 +1171,7 @@ qla2x00_fw_ready(scsi_qla_host_t *ha) | |||
1171 | rval = QLA_SUCCESS; | 1171 | rval = QLA_SUCCESS; |
1172 | 1172 | ||
1173 | /* 20 seconds for loop down. */ | 1173 | /* 20 seconds for loop down. */ |
1174 | min_wait = 20; | 1174 | min_wait = 20; |
1175 | 1175 | ||
1176 | /* | 1176 | /* |
1177 | * Firmware should take at most one RATOV to login, plus 5 seconds for | 1177 | * Firmware should take at most one RATOV to login, plus 5 seconds for |
@@ -1217,8 +1217,8 @@ qla2x00_fw_ready(scsi_qla_host_t *ha) | |||
1217 | (fw_state >= FSTATE_LOSS_OF_SYNC || | 1217 | (fw_state >= FSTATE_LOSS_OF_SYNC || |
1218 | fw_state == FSTATE_WAIT_AL_PA)) { | 1218 | fw_state == FSTATE_WAIT_AL_PA)) { |
1219 | /* Loop down. Timeout on min_wait for states | 1219 | /* Loop down. Timeout on min_wait for states |
1220 | * other than Wait for Login. | 1220 | * other than Wait for Login. |
1221 | */ | 1221 | */ |
1222 | if (time_after_eq(jiffies, mtime)) { | 1222 | if (time_after_eq(jiffies, mtime)) { |
1223 | qla_printk(KERN_INFO, ha, | 1223 | qla_printk(KERN_INFO, ha, |
1224 | "Cable is unplugged...\n"); | 1224 | "Cable is unplugged...\n"); |
@@ -1620,7 +1620,7 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) | |||
1620 | * | 1620 | * |
1621 | * The driver waits for the link to come up after link down | 1621 | * The driver waits for the link to come up after link down |
1622 | * before returning I/Os to OS with "DID_NO_CONNECT". | 1622 | * before returning I/Os to OS with "DID_NO_CONNECT". |
1623 | */ | 1623 | */ |
1624 | if (nv->link_down_timeout == 0) { | 1624 | if (nv->link_down_timeout == 0) { |
1625 | ha->loop_down_abort_time = | 1625 | ha->loop_down_abort_time = |
1626 | (LOOP_DOWN_TIME - LOOP_DOWN_TIMEOUT); | 1626 | (LOOP_DOWN_TIME - LOOP_DOWN_TIMEOUT); |
@@ -1628,7 +1628,7 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) | |||
1628 | ha->link_down_timeout = nv->link_down_timeout; | 1628 | ha->link_down_timeout = nv->link_down_timeout; |
1629 | ha->loop_down_abort_time = | 1629 | ha->loop_down_abort_time = |
1630 | (LOOP_DOWN_TIME - ha->link_down_timeout); | 1630 | (LOOP_DOWN_TIME - ha->link_down_timeout); |
1631 | } | 1631 | } |
1632 | 1632 | ||
1633 | /* | 1633 | /* |
1634 | * Need enough time to try and get the port back. | 1634 | * Need enough time to try and get the port back. |
@@ -1730,7 +1730,7 @@ qla2x00_alloc_fcport(scsi_qla_host_t *ha, int flags) | |||
1730 | * 2 = database was full and device was not configured. | 1730 | * 2 = database was full and device was not configured. |
1731 | */ | 1731 | */ |
1732 | static int | 1732 | static int |
1733 | qla2x00_configure_loop(scsi_qla_host_t *ha) | 1733 | qla2x00_configure_loop(scsi_qla_host_t *ha) |
1734 | { | 1734 | { |
1735 | int rval; | 1735 | int rval; |
1736 | unsigned long flags, save_flags; | 1736 | unsigned long flags, save_flags; |
@@ -1838,7 +1838,7 @@ qla2x00_configure_loop(scsi_qla_host_t *ha) | |||
1838 | * 0 = success. | 1838 | * 0 = success. |
1839 | */ | 1839 | */ |
1840 | static int | 1840 | static int |
1841 | qla2x00_configure_local_loop(scsi_qla_host_t *ha) | 1841 | qla2x00_configure_local_loop(scsi_qla_host_t *ha) |
1842 | { | 1842 | { |
1843 | int rval, rval2; | 1843 | int rval, rval2; |
1844 | int found_devs; | 1844 | int found_devs; |
@@ -1993,16 +1993,16 @@ cleanup_allocation: | |||
1993 | } | 1993 | } |
1994 | 1994 | ||
1995 | static void | 1995 | static void |
1996 | qla2x00_probe_for_all_luns(scsi_qla_host_t *ha) | 1996 | qla2x00_probe_for_all_luns(scsi_qla_host_t *ha) |
1997 | { | 1997 | { |
1998 | fc_port_t *fcport; | 1998 | fc_port_t *fcport; |
1999 | 1999 | ||
2000 | qla2x00_mark_all_devices_lost(ha); | 2000 | qla2x00_mark_all_devices_lost(ha); |
2001 | list_for_each_entry(fcport, &ha->fcports, list) { | 2001 | list_for_each_entry(fcport, &ha->fcports, list) { |
2002 | if (fcport->port_type != FCT_TARGET) | 2002 | if (fcport->port_type != FCT_TARGET) |
2003 | continue; | 2003 | continue; |
2004 | 2004 | ||
2005 | qla2x00_update_fcport(ha, fcport); | 2005 | qla2x00_update_fcport(ha, fcport); |
2006 | } | 2006 | } |
2007 | } | 2007 | } |
2008 | 2008 | ||
@@ -2573,7 +2573,7 @@ qla2x00_find_new_loop_id(scsi_qla_host_t *ha, fc_port_t *dev) | |||
2573 | * Kernel context. | 2573 | * Kernel context. |
2574 | */ | 2574 | */ |
2575 | static int | 2575 | static int |
2576 | qla2x00_device_resync(scsi_qla_host_t *ha) | 2576 | qla2x00_device_resync(scsi_qla_host_t *ha) |
2577 | { | 2577 | { |
2578 | int rval; | 2578 | int rval; |
2579 | int rval2; | 2579 | int rval2; |
@@ -2837,8 +2837,8 @@ qla2x00_fabric_login(scsi_qla_host_t *ha, fc_port_t *fcport, | |||
2837 | * unrecoverable / not handled error | 2837 | * unrecoverable / not handled error |
2838 | */ | 2838 | */ |
2839 | DEBUG2(printk("%s(%ld): failed=%x port_id=%02x%02x%02x " | 2839 | DEBUG2(printk("%s(%ld): failed=%x port_id=%02x%02x%02x " |
2840 | "loop_id=%x jiffies=%lx.\n", | 2840 | "loop_id=%x jiffies=%lx.\n", |
2841 | __func__, ha->host_no, mb[0], | 2841 | __func__, ha->host_no, mb[0], |
2842 | fcport->d_id.b.domain, fcport->d_id.b.area, | 2842 | fcport->d_id.b.domain, fcport->d_id.b.area, |
2843 | fcport->d_id.b.al_pa, fcport->loop_id, jiffies)); | 2843 | fcport->d_id.b.al_pa, fcport->loop_id, jiffies)); |
2844 | 2844 | ||
@@ -2901,7 +2901,7 @@ qla2x00_local_device_login(scsi_qla_host_t *ha, uint16_t loop_id) | |||
2901 | * 0 = success | 2901 | * 0 = success |
2902 | */ | 2902 | */ |
2903 | int | 2903 | int |
2904 | qla2x00_loop_resync(scsi_qla_host_t *ha) | 2904 | qla2x00_loop_resync(scsi_qla_host_t *ha) |
2905 | { | 2905 | { |
2906 | int rval; | 2906 | int rval; |
2907 | uint32_t wait_time; | 2907 | uint32_t wait_time; |
@@ -2960,7 +2960,7 @@ qla2x00_rescan_fcports(scsi_qla_host_t *ha) | |||
2960 | 2960 | ||
2961 | rescan_done = 1; | 2961 | rescan_done = 1; |
2962 | } | 2962 | } |
2963 | qla2x00_probe_for_all_luns(ha); | 2963 | qla2x00_probe_for_all_luns(ha); |
2964 | } | 2964 | } |
2965 | 2965 | ||
2966 | /* | 2966 | /* |
@@ -3030,7 +3030,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3030 | 3030 | ||
3031 | ha->isp_ops.enable_intrs(ha); | 3031 | ha->isp_ops.enable_intrs(ha); |
3032 | 3032 | ||
3033 | ha->isp_abort_cnt = 0; | 3033 | ha->isp_abort_cnt = 0; |
3034 | clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags); | 3034 | clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags); |
3035 | } else { /* failed the ISP abort */ | 3035 | } else { /* failed the ISP abort */ |
3036 | ha->flags.online = 1; | 3036 | ha->flags.online = 1; |
@@ -3039,7 +3039,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3039 | qla_printk(KERN_WARNING, ha, | 3039 | qla_printk(KERN_WARNING, ha, |
3040 | "ISP error recovery failed - " | 3040 | "ISP error recovery failed - " |
3041 | "board disabled\n"); | 3041 | "board disabled\n"); |
3042 | /* | 3042 | /* |
3043 | * The next call disables the board | 3043 | * The next call disables the board |
3044 | * completely. | 3044 | * completely. |
3045 | */ | 3045 | */ |
@@ -3064,7 +3064,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3064 | status = 1; | 3064 | status = 1; |
3065 | } | 3065 | } |
3066 | } | 3066 | } |
3067 | 3067 | ||
3068 | } | 3068 | } |
3069 | 3069 | ||
3070 | if (status) { | 3070 | if (status) { |
@@ -3119,11 +3119,11 @@ qla2x00_restart_isp(scsi_qla_host_t *ha) | |||
3119 | } | 3119 | } |
3120 | 3120 | ||
3121 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 3121 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
3122 | 3122 | ||
3123 | status = qla2x00_setup_chip(ha); | 3123 | status = qla2x00_setup_chip(ha); |
3124 | 3124 | ||
3125 | spin_lock_irqsave(&ha->hardware_lock, flags); | 3125 | spin_lock_irqsave(&ha->hardware_lock, flags); |
3126 | 3126 | ||
3127 | if (!IS_QLA24XX(ha) && !IS_QLA25XX(ha)) { | 3127 | if (!IS_QLA24XX(ha) && !IS_QLA25XX(ha)) { |
3128 | /* Enable proper parity */ | 3128 | /* Enable proper parity */ |
3129 | if (IS_QLA2300(ha)) | 3129 | if (IS_QLA2300(ha)) |
@@ -3168,7 +3168,7 @@ qla2x00_restart_isp(scsi_qla_host_t *ha) | |||
3168 | } | 3168 | } |
3169 | 3169 | ||
3170 | /* if no cable then assume it's good */ | 3170 | /* if no cable then assume it's good */ |
3171 | if ((ha->device_flags & DFLG_NO_CABLE)) | 3171 | if ((ha->device_flags & DFLG_NO_CABLE)) |
3172 | status = 0; | 3172 | status = 0; |
3173 | 3173 | ||
3174 | DEBUG(printk("%s(): Configure loop done, status = 0x%x\n", | 3174 | DEBUG(printk("%s(): Configure loop done, status = 0x%x\n", |