[SCSI] qla2xxx: Prevent sending mbx commands from sysfs during isp reset.
authorSantosh Vernekar <santosh.vernekar@qlogic.com>
Fri, 19 Mar 2010 23:59:20 +0000 (16:59 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Sat, 27 Mar 2010 19:11:37 +0000 (15:11 -0400)
The fix prevents application path from sending get-firmware-state mbx command
during as isp reset.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/qla2xxx/qla_attr.c

index 90d1e062ec4f13461bc428d41c17f4e03e007932..35a325266afaecd0f82a9c75e52bb40ec48ddd17 100644 (file)
@@ -1274,7 +1274,11 @@ qla2x00_fw_state_show(struct device *dev, struct device_attribute *attr,
        int rval = QLA_FUNCTION_FAILED;
        uint16_t state[5];
 
-       if (!vha->hw->flags.eeh_busy)
+       if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) ||
+               test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags))
+               DEBUG2_3_11(printk("%s(%ld): isp reset in progress.\n",
+                       __func__, vha->host_no));
+       else if (!vha->hw->flags.eeh_busy)
                rval = qla2x00_get_firmware_state(vha, state);
        if (rval != QLA_SUCCESS)
                memset(state, -1, sizeof(state));