]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
[SCSI] qla2xxx: Don't try to 'stop' firmware if already in ROM code.
authorAndrew Vasquez <andrew.vasquez@qlogic.com>
Tue, 7 Apr 2009 05:33:48 +0000 (22:33 -0700)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Wed, 20 May 2009 22:21:10 +0000 (17:21 -0500)
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_mbx.c

index a4a6a146fccdbc630bddb08297caf9339f1e6b43..138ae88e9e4df92a85f7f83bf32b5c58792e33be 100644 (file)
@@ -4153,7 +4153,7 @@ qla2x00_try_to_stop_firmware(scsi_qla_host_t *vha)
 
        ret = qla2x00_stop_firmware(vha);
        for (retries = 5; ret != QLA_SUCCESS && ret != QLA_FUNCTION_TIMEOUT &&
-           retries ; retries--) {
+           ret != QLA_INVALID_COMMAND && retries ; retries--) {
                ha->isp_ops->reset_chip(vha);
                if (ha->isp_ops->chip_diag(vha) != QLA_SUCCESS)
                        continue;
index 258c39d8f4488a033cd37057d8126a3d5f2be1e7..7d0eeec9ba57a7f3894a4a431f6e62e74c7c2066 100644 (file)
@@ -2477,6 +2477,8 @@ qla2x00_stop_firmware(scsi_qla_host_t *vha)
        if (rval != QLA_SUCCESS) {
                DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__,
                    vha->host_no, rval));
+               if (mcp->mb[0] == MBS_INVALID_COMMAND)
+                       rval = QLA_INVALID_COMMAND;
        } else {
                DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no));
        }