]> err.no Git - linux-2.6/commitdiff
[SCSI] ipr: Handle check condition status from disk array device
authorBrian King <brking@linux.vnet.ibm.com>
Thu, 26 Apr 2007 21:00:10 +0000 (16:00 -0500)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sun, 6 May 2007 14:33:19 +0000 (09:33 -0500)
On newer levels of microcode for ipr RAID adapters supporting
multi-initiator configurations, the disk array, or VSET, resources
are capable of generating a check condition. This patch prevents
ipr from generating sense data in this scenario and retrieving it
from the logical device instead.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/ipr.c

index 0724b5810ee25d2986422c7491284eb5895c4874..d871dd37d22c6bf7d0b62db90d1cfc1eb46f4481 100644 (file)
@@ -4666,18 +4666,19 @@ static void ipr_erp_start(struct ipr_ioa_cfg *ioa_cfg,
        struct scsi_cmnd *scsi_cmd = ipr_cmd->scsi_cmd;
        struct ipr_resource_entry *res = scsi_cmd->device->hostdata;
        u32 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc);
+       u32 masked_ioasc = ioasc & IPR_IOASC_IOASC_MASK;
 
        if (!res) {
                ipr_scsi_eh_done(ipr_cmd);
                return;
        }
 
-       if (!ipr_is_gscsi(res))
+       if (!ipr_is_gscsi(res) && masked_ioasc != IPR_IOASC_HW_DEV_BUS_STATUS)
                ipr_gen_sense(ipr_cmd);
 
        ipr_dump_ioasa(ioa_cfg, ipr_cmd, res);
 
-       switch (ioasc & IPR_IOASC_IOASC_MASK) {
+       switch (masked_ioasc) {
        case IPR_IOASC_ABORTED_CMD_TERM_BY_HOST:
                if (ipr_is_naca_model(res))
                        scsi_cmd->result |= (DID_ABORT << 16);