aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_error.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-10 18:22:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-10 18:22:42 -0400
commit2f9e825d3e0e2b407ae8f082de5c00afcf7378fb (patch)
treef8b3ee40674ce4acd5508a0a0bf52a30904caf6c /drivers/scsi/scsi_error.c
parent7ae0dea900b027cd90e8a3e14deca9a19e17638b (diff)
parentde75d60d5ea235e6e09f4962ab22541ce0fe176a (diff)
Merge branch 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block: (149 commits) block: make sure that REQ_* types are seen even with CONFIG_BLOCK=n xen-blkfront: fix missing out label blkdev: fix blkdev_issue_zeroout return value block: update request stacking methods to support discards block: fix missing export of blk_types.h writeback: fix bad _bh spinlock nesting drbd: revert "delay probes", feature is being re-implemented differently drbd: Initialize all members of sync_conf to their defaults [Bugz 315] drbd: Disable delay probes for the upcomming release writeback: cleanup bdi_register writeback: add new tracepoints writeback: remove unnecessary init_timer call writeback: optimize periodic bdi thread wakeups writeback: prevent unnecessary bdi threads wakeups writeback: move bdi threads exiting logic to the forker thread writeback: restructure bdi forker loop a little writeback: move last_active to bdi writeback: do not remove bdi from bdi_list writeback: simplify bdi code a little writeback: do not lose wake-ups in bdi threads ... Fixed up pretty trivial conflicts in drivers/block/virtio_blk.c and drivers/scsi/scsi_error.c as per Jens.
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r--drivers/scsi/scsi_error.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 2bf98469dc4c..bbbc186dbc1a 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -320,7 +320,7 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
320 "changed. The Linux SCSI layer does not " 320 "changed. The Linux SCSI layer does not "
321 "automatically adjust these parameters.\n"); 321 "automatically adjust these parameters.\n");
322 322
323 if (blk_barrier_rq(scmd->request)) 323 if (scmd->request->cmd_flags & REQ_HARDBARRIER)
324 /* 324 /*
325 * barrier requests should always retry on UA 325 * barrier requests should always retry on UA
326 * otherwise block will get a spurious error 326 * otherwise block will get a spurious error
@@ -1331,16 +1331,16 @@ int scsi_noretry_cmd(struct scsi_cmnd *scmd)
1331 case DID_OK: 1331 case DID_OK:
1332 break; 1332 break;
1333 case DID_BUS_BUSY: 1333 case DID_BUS_BUSY:
1334 return blk_failfast_transport(scmd->request); 1334 return (scmd->request->cmd_flags & REQ_FAILFAST_TRANSPORT);
1335 case DID_PARITY: 1335 case DID_PARITY:
1336 return blk_failfast_dev(scmd->request); 1336 return (scmd->request->cmd_flags & REQ_FAILFAST_DEV);
1337 case DID_ERROR: 1337 case DID_ERROR:
1338 if (msg_byte(scmd->result) == COMMAND_COMPLETE && 1338 if (msg_byte(scmd->result) == COMMAND_COMPLETE &&
1339 status_byte(scmd->result) == RESERVATION_CONFLICT) 1339 status_byte(scmd->result) == RESERVATION_CONFLICT)
1340 return 0; 1340 return 0;
1341 /* fall through */ 1341 /* fall through */
1342 case DID_SOFT_ERROR: 1342 case DID_SOFT_ERROR:
1343 return blk_failfast_driver(scmd->request); 1343 return (scmd->request->cmd_flags & REQ_FAILFAST_DRIVER);
1344 } 1344 }
1345 1345
1346 switch (status_byte(scmd->result)) { 1346 switch (status_byte(scmd->result)) {
@@ -1349,7 +1349,9 @@ int scsi_noretry_cmd(struct scsi_cmnd *scmd)
1349 * assume caller has checked sense and determinted 1349 * assume caller has checked sense and determinted
1350 * the check condition was retryable. 1350 * the check condition was retryable.
1351 */ 1351 */
1352 return blk_failfast_dev(scmd->request); 1352 if (scmd->request->cmd_flags & REQ_FAILFAST_DEV ||
1353 scmd->request->cmd_type == REQ_TYPE_BLOCK_PC)
1354 return 1;
1353 } 1355 }
1354 1356
1355 return 0; 1357 return 0;