aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_error.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r--drivers/scsi/scsi_error.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 08ed506e6059..7ad53fa42766 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -16,6 +16,7 @@
16 16
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/sched.h> 18#include <linux/sched.h>
19#include <linux/gfp.h>
19#include <linux/timer.h> 20#include <linux/timer.h>
20#include <linux/string.h> 21#include <linux/string.h>
21#include <linux/kernel.h> 22#include <linux/kernel.h>
@@ -301,7 +302,20 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
301 if (scmd->device->allow_restart && 302 if (scmd->device->allow_restart &&
302 (sshdr.asc == 0x04) && (sshdr.ascq == 0x02)) 303 (sshdr.asc == 0x04) && (sshdr.ascq == 0x02))
303 return FAILED; 304 return FAILED;
304 return SUCCESS; 305
306 if (blk_barrier_rq(scmd->request))
307 /*
308 * barrier requests should always retry on UA
309 * otherwise block will get a spurious error
310 */
311 return NEEDS_RETRY;
312 else
313 /*
314 * for normal (non barrier) commands, pass the
315 * UA upwards for a determination in the
316 * completion functions
317 */
318 return SUCCESS;
305 319
306 /* these three are not supported */ 320 /* these three are not supported */
307 case COPY_ABORTED: 321 case COPY_ABORTED: