diff options
author | Dave Airlie <airlied@redhat.com> | 2009-03-28 20:22:18 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-03-28 20:22:18 -0400 |
commit | 90f959bcb386da2c71613dcefc6a285e054a539e (patch) | |
tree | ee3e9dd4111d4aad12e579cb0c2c159114dff263 /drivers/scsi/device_handler/scsi_dh_rdac.c | |
parent | 41f13fe81dd1b08723ab9f3fc3c7f29cfa81f1a5 (diff) | |
parent | 07d43ba98621f08e252a48c96b258b4d572b0257 (diff) |
drm: merge Linux master into HEAD
Conflicts:
drivers/gpu/drm/drm_info.c
drivers/gpu/drm/drm_proc.c
drivers/gpu/drm/i915/i915_gem_debugfs.c
Diffstat (limited to 'drivers/scsi/device_handler/scsi_dh_rdac.c')
-rw-r--r-- | drivers/scsi/device_handler/scsi_dh_rdac.c | 49 |
1 files changed, 36 insertions, 13 deletions
diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c index 53664765570..43b8c51e98d 100644 --- a/drivers/scsi/device_handler/scsi_dh_rdac.c +++ b/drivers/scsi/device_handler/scsi_dh_rdac.c @@ -449,28 +449,40 @@ static int mode_select_handle_sense(struct scsi_device *sdev, unsigned char *sensebuf) { struct scsi_sense_hdr sense_hdr; - int sense, err = SCSI_DH_IO, ret; + int err = SCSI_DH_IO, ret; ret = scsi_normalize_sense(sensebuf, SCSI_SENSE_BUFFERSIZE, &sense_hdr); if (!ret) goto done; err = SCSI_DH_OK; - sense = (sense_hdr.sense_key << 16) | (sense_hdr.asc << 8) | - sense_hdr.ascq; - /* If it is retryable failure, submit the c9 inquiry again */ - if (sense == 0x59136 || sense == 0x68b02 || sense == 0xb8b02 || - sense == 0x62900) { - /* 0x59136 - Command lock contention - * 0x[6b]8b02 - Quiesense in progress or achieved - * 0x62900 - Power On, Reset, or Bus Device Reset - */ + + switch (sense_hdr.sense_key) { + case NO_SENSE: + case ABORTED_COMMAND: + case UNIT_ATTENTION: err = SCSI_DH_RETRY; + break; + case NOT_READY: + if (sense_hdr.asc == 0x04 && sense_hdr.ascq == 0x01) + /* LUN Not Ready and is in the Process of Becoming + * Ready + */ + err = SCSI_DH_RETRY; + break; + case ILLEGAL_REQUEST: + if (sense_hdr.asc == 0x91 && sense_hdr.ascq == 0x36) + /* + * Command Lock contention + */ + err = SCSI_DH_RETRY; + break; + default: + sdev_printk(KERN_INFO, sdev, + "MODE_SELECT failed with sense %02x/%02x/%02x.\n", + sense_hdr.sense_key, sense_hdr.asc, sense_hdr.ascq); } - if (sense) - sdev_printk(KERN_INFO, sdev, - "MODE_SELECT failed with sense 0x%x.\n", sense); done: return err; } @@ -562,6 +574,12 @@ static int rdac_check_sense(struct scsi_device *sdev, * Just retry and wait. */ return ADD_TO_MLQUEUE; + if (sense_hdr->asc == 0xA1 && sense_hdr->ascq == 0x02) + /* LUN Not Ready - Quiescense in progress + * or has been achieved + * Just retry. + */ + return ADD_TO_MLQUEUE; break; case ILLEGAL_REQUEST: if (sense_hdr->asc == 0x94 && sense_hdr->ascq == 0x01) { @@ -579,6 +597,11 @@ static int rdac_check_sense(struct scsi_device *sdev, * Power On, Reset, or Bus Device Reset, just retry. */ return ADD_TO_MLQUEUE; + if (sense_hdr->asc == 0x8b && sense_hdr->ascq == 0x02) + /* + * Quiescence in progress , just retry. + */ + return ADD_TO_MLQUEUE; break; } /* success just means we do not care what scsi-ml does */ |