From: Lalit Chandivade Date: Fri, 3 Dec 2010 06:12:36 +0000 (-0800) Subject: [SCSI] qla4xxx: put device in FAILED state for 82XX initialization failure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fe998527e3f1f5a6eeab5baa23ac2b60ae47e96b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [SCSI] qla4xxx: put device in FAILED state for 82XX initialization failure Signed-off-by: Vikas Chaudhary Signed-off-by: Lalit Chandivade Signed-off-by: Ravi Anand Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 0d48fb4d1044..fa5ddadf4869 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -1721,6 +1721,14 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev, if (!test_bit(AF_ONLINE, &ha->flags)) { ql4_printk(KERN_WARNING, ha, "Failed to initialize adapter\n"); + if (is_qla8022(ha) && ql4xdontresethba) { + /* Put the device in failed state. */ + DEBUG2(printk(KERN_ERR "HW STATE: FAILED\n")); + qla4_8xxx_idc_lock(ha); + qla4_8xxx_wr_32(ha, QLA82XX_CRB_DEV_STATE, + QLA82XX_DEV_FAILED); + qla4_8xxx_idc_unlock(ha); + } ret = -ENODEV; goto probe_failed; }