aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx
diff options
context:
space:
mode:
authorPrasanna Mumbai <prasanna.mumbai@qlogic.com>2011-03-21 06:34:26 -0400
committerJames Bottomley <James.Bottomley@suse.de>2011-03-23 13:48:33 -0400
commitf9880e76fd15795b5917b20f54eeca764b0f3ccb (patch)
tree1eca5131db426ddf6cbc06e29d4be8bf245d252e /drivers/scsi/qla4xxx
parent99b53bf50cc4711a3c82dfc704911ff738a41758 (diff)
[SCSI] qla4xxx: Do not retry ISP82XX initialization if H/W state is failed
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Prasanna Mumbai <prasanna.mumbai@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla4xxx')
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 967836ef5ab2..409b20d62ef5 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -1630,6 +1630,7 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev,
1630 uint8_t init_retry_count = 0; 1630 uint8_t init_retry_count = 0;
1631 char buf[34]; 1631 char buf[34];
1632 struct qla4_8xxx_legacy_intr_set *nx_legacy_intr; 1632 struct qla4_8xxx_legacy_intr_set *nx_legacy_intr;
1633 uint32_t dev_state;
1633 1634
1634 if (pci_enable_device(pdev)) 1635 if (pci_enable_device(pdev))
1635 return -1; 1636 return -1;
@@ -1713,6 +1714,18 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev,
1713 status = qla4xxx_initialize_adapter(ha, REBUILD_DDB_LIST); 1714 status = qla4xxx_initialize_adapter(ha, REBUILD_DDB_LIST);
1714 while ((!test_bit(AF_ONLINE, &ha->flags)) && 1715 while ((!test_bit(AF_ONLINE, &ha->flags)) &&
1715 init_retry_count++ < MAX_INIT_RETRIES) { 1716 init_retry_count++ < MAX_INIT_RETRIES) {
1717
1718 if (is_qla8022(ha)) {
1719 qla4_8xxx_idc_lock(ha);
1720 dev_state = qla4_8xxx_rd_32(ha, QLA82XX_CRB_DEV_STATE);
1721 qla4_8xxx_idc_unlock(ha);
1722 if (dev_state == QLA82XX_DEV_FAILED) {
1723 ql4_printk(KERN_WARNING, ha, "%s: don't retry "
1724 "initialize adapter. H/W is in failed state\n",
1725 __func__);
1726 break;
1727 }
1728 }
1716 DEBUG2(printk("scsi: %s: retrying adapter initialization " 1729 DEBUG2(printk("scsi: %s: retrying adapter initialization "
1717 "(%d)\n", __func__, init_retry_count)); 1730 "(%d)\n", __func__, init_retry_count));
1718 1731