Move source tree closer to the 2.6.32.17 mainline
/drivers/scsi/scsi_error.c
blob:1b0060b791e8dc6fe0b1dd4ace0a1e3f3ea96c7e -> blob:573921d00070d79f070bc9f3866f300839e4af98
--- drivers/scsi/scsi_error.c
+++ drivers/scsi/scsi_error.c
@@ -301,7 +301,20 @@ static int scsi_check_sense(struct scsi_
if (scmd->device->allow_restart &&
(sshdr.asc == 0x04) && (sshdr.ascq == 0x02))
return FAILED;
- return SUCCESS;
+
+ if (blk_barrier_rq(scmd->request))
+ /*
+ * barrier requests should always retry on UA
+ * otherwise block will get a spurious error
+ */
+ return NEEDS_RETRY;
+ else
+ /*
+ * for normal (non barrier) commands, pass the
+ * UA upwards for a determination in the
+ * completion functions
+ */
+ return SUCCESS;
/* these three are not supported */
case COPY_ABORTED: