aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>2010-10-07 01:47:48 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-10-25 15:46:35 -0400
commitf581a3f79cc7c00c1a416356011c2e274dbf6571 (patch)
tree59f8479f4e05c9c59cb006c288605b3ba4b2bef3 /drivers/scsi
parent986fe6c7f50974e871b8ab5a800f5310ea25b361 (diff)
[SCSI] qla4xxx: Trivial cleanup
* cleanup function qla4xxx_recovery_timeout - No need to wakeup dpc thread from function qla4xxx_recovery_timeout() as we are not doing anything in do_dpc() thread when wakeup from qla4xxx_recovery_timeout() * cleanup function qla4xxx_wait_for_hba_online - Remove hard coded value from qla4xxx_wait_for_hba_online(). * cleanup function qla4xxx_start_firmware_from_flash - display seconds * cleanup function qla4_8xxx_load_risc - Remove redundant code. * cleanup function qla4xxx_get_firmware_status - update debug statement * cleanup function qla4_8xxx_try_start_fw - update return status Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla4xxx/ql4_def.h1
-rw-r--r--drivers/scsi/qla4xxx/ql4_init.c4
-rw-r--r--drivers/scsi/qla4xxx/ql4_mbx.c2
-rw-r--r--drivers/scsi/qla4xxx/ql4_nx.c23
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c4
5 files changed, 12 insertions, 22 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
index 9dc0a6616ed..f595ab13c2e 100644
--- a/drivers/scsi/qla4xxx/ql4_def.h
+++ b/drivers/scsi/qla4xxx/ql4_def.h
@@ -179,6 +179,7 @@ static inline int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev)
179#define IOCB_TOV_MARGIN 10 179#define IOCB_TOV_MARGIN 10
180#define RELOGIN_TOV 18 180#define RELOGIN_TOV 18
181#define ISNS_DEREG_TOV 5 181#define ISNS_DEREG_TOV 5
182#define HBA_ONLINE_TOV 30
182 183
183#define MAX_RESET_HA_RETRIES 2 184#define MAX_RESET_HA_RETRIES 2
184 185
diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
index 4c9be77ee70..b6046afe370 100644
--- a/drivers/scsi/qla4xxx/ql4_init.c
+++ b/drivers/scsi/qla4xxx/ql4_init.c
@@ -1207,8 +1207,8 @@ static int qla4xxx_start_firmware_from_flash(struct scsi_qla_host *ha)
1207 break; 1207 break;
1208 1208
1209 DEBUG2(printk(KERN_INFO "scsi%ld: %s: Waiting for boot " 1209 DEBUG2(printk(KERN_INFO "scsi%ld: %s: Waiting for boot "
1210 "firmware to complete... ctrl_sts=0x%x\n", 1210 "firmware to complete... ctrl_sts=0x%x, remaining=%ld\n",
1211 ha->host_no, __func__, ctrl_status)); 1211 ha->host_no, __func__, ctrl_status, max_wait_time));
1212 1212
1213 msleep_interruptible(250); 1213 msleep_interruptible(250);
1214 } while (!time_after_eq(jiffies, max_wait_time)); 1214 } while (!time_after_eq(jiffies, max_wait_time));
diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c
index 90021704d8c..494a28f0dc1 100644
--- a/drivers/scsi/qla4xxx/ql4_mbx.c
+++ b/drivers/scsi/qla4xxx/ql4_mbx.c
@@ -592,7 +592,7 @@ int qla4xxx_get_firmware_status(struct scsi_qla_host * ha)
592 } 592 }
593 593
594 ql4_printk(KERN_INFO, ha, "%ld firmare IOCBs available (%d).\n", 594 ql4_printk(KERN_INFO, ha, "%ld firmare IOCBs available (%d).\n",
595 ha->host_no, mbox_cmd[2]); 595 ha->host_no, mbox_sts[2]);
596 596
597 return QLA_SUCCESS; 597 return QLA_SUCCESS;
598} 598}
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index 449256f2c5f..b311a96acf1 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.c
+++ b/drivers/scsi/qla4xxx/ql4_nx.c
@@ -1540,10 +1540,12 @@ qla4_8xxx_try_start_fw(struct scsi_qla_host *ha)
1540 ql4_printk(KERN_INFO, ha, 1540 ql4_printk(KERN_INFO, ha,
1541 "FW: Attempting to load firmware from flash...\n"); 1541 "FW: Attempting to load firmware from flash...\n");
1542 rval = qla4_8xxx_start_firmware(ha, ha->hw.flt_region_fw); 1542 rval = qla4_8xxx_start_firmware(ha, ha->hw.flt_region_fw);
1543 if (rval == QLA_SUCCESS)
1544 return rval;
1545 1543
1546 ql4_printk(KERN_ERR, ha, "FW: Load firmware from flash FAILED...\n"); 1544 if (rval != QLA_SUCCESS) {
1545 ql4_printk(KERN_ERR, ha, "FW: Load firmware from flash"
1546 " FAILED...\n");
1547 return rval;
1548 }
1547 1549
1548 return rval; 1550 return rval;
1549} 1551}
@@ -1764,20 +1766,9 @@ int qla4_8xxx_load_risc(struct scsi_qla_host *ha)
1764 int retval; 1766 int retval;
1765 retval = qla4_8xxx_device_state_handler(ha); 1767 retval = qla4_8xxx_device_state_handler(ha);
1766 1768
1767 if (retval == QLA_SUCCESS && 1769 if (retval == QLA_SUCCESS && !test_bit(AF_INIT_DONE, &ha->flags))
1768 !test_bit(AF_INIT_DONE, &ha->flags)) {
1769 retval = qla4xxx_request_irqs(ha); 1770 retval = qla4xxx_request_irqs(ha);
1770 if (retval != QLA_SUCCESS) { 1771
1771 ql4_printk(KERN_WARNING, ha,
1772 "Failed to reserve interrupt %d already in use.\n",
1773 ha->pdev->irq);
1774 } else {
1775 set_bit(AF_IRQ_ATTACHED, &ha->flags);
1776 ha->host->irq = ha->pdev->irq;
1777 ql4_printk(KERN_INFO, ha, "%s: irq %d attached\n",
1778 __func__, ha->pdev->irq);
1779 }
1780 }
1781 return retval; 1772 return retval;
1782} 1773}
1783 1774
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 370d40ff152..b24bf969b8a 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -167,8 +167,6 @@ static void qla4xxx_recovery_timedout(struct iscsi_cls_session *session)
167 "of (%d) secs exhausted, marking device DEAD.\n", 167 "of (%d) secs exhausted, marking device DEAD.\n",
168 ha->host_no, __func__, ddb_entry->fw_ddb_index, 168 ha->host_no, __func__, ddb_entry->fw_ddb_index,
169 QL4_SESS_RECOVERY_TMO)); 169 QL4_SESS_RECOVERY_TMO));
170
171 qla4xxx_wake_dpc(ha);
172 } 170 }
173} 171}
174 172
@@ -1960,7 +1958,7 @@ static int qla4xxx_wait_for_hba_online(struct scsi_qla_host *ha)
1960{ 1958{
1961 unsigned long wait_online; 1959 unsigned long wait_online;
1962 1960
1963 wait_online = jiffies + (30 * HZ); 1961 wait_online = jiffies + (HBA_ONLINE_TOV * HZ);
1964 while (time_before(jiffies, wait_online)) { 1962 while (time_before(jiffies, wait_online)) {
1965 1963
1966 if (adapter_up(ha)) 1964 if (adapter_up(ha))