aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_error.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-08 19:27:31 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-08 19:27:31 -0500
commitcd764695b67386a81964f68e9c66efd9f13f4d29 (patch)
tree504e961ab6bad164c41f4b9c1ff00c0ce7f645ee /drivers/scsi/scsi_error.c
parent97d61b8e3aef163a75f80f4762794c154572293d (diff)
parentffda8c7dc492e2170bb263f7c56f286992ceb54b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (45 commits) [SCSI] qla2xxx: Update version number to 8.03.00-k1. [SCSI] qla2xxx: Add ISP81XX support. [SCSI] qla2xxx: Use proper request/response queues with MQ instantiations. [SCSI] qla2xxx: Correct MQ-chain information retrieval during a firmware dump. [SCSI] qla2xxx: Collapse EFT/FCE copy procedures during a firmware dump. [SCSI] qla2xxx: Don't pollute kernel logs with ZIO/RIO status messages. [SCSI] qla2xxx: Don't fallback to interrupt-polling during re-initialization with MSI-X enabled. [SCSI] qla2xxx: Remove support for reading/writing HW-event-log. [SCSI] cxgb3i: add missing include [SCSI] scsi_lib: fix DID_RESET status problems [SCSI] fc transport: restore missing dev_loss_tmo callback to LLDD [SCSI] aha152x_cs: Fix regression that keeps driver from using shared interrupts [SCSI] sd: Correctly handle 6-byte commands with DIX [SCSI] sd: DIF: Fix tagging on platforms with signed char [SCSI] sd: DIF: Show app tag on error [SCSI] Fix error handling for DIF/DIX [SCSI] scsi_lib: don't decrement busy counters when inserting commands [SCSI] libsas: fix test for negative unsigned and typos [SCSI] a2091, gvp11: kill warn_unused_result warnings [SCSI] fusion: Move a dereference below a NULL test ... Fixed up trivial conflict due to moving the async part of sd_probe around in the async probes vs using dev_set_name() in naming.
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r--drivers/scsi/scsi_error.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index d86ebea9350a..ad6a1370761e 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -124,34 +124,22 @@ int scsi_eh_scmd_add(struct scsi_cmnd *scmd, int eh_flag)
124enum blk_eh_timer_return scsi_times_out(struct request *req) 124enum blk_eh_timer_return scsi_times_out(struct request *req)
125{ 125{
126 struct scsi_cmnd *scmd = req->special; 126 struct scsi_cmnd *scmd = req->special;
127 enum blk_eh_timer_return (*eh_timed_out)(struct scsi_cmnd *);
128 enum blk_eh_timer_return rtn = BLK_EH_NOT_HANDLED; 127 enum blk_eh_timer_return rtn = BLK_EH_NOT_HANDLED;
129 128
130 scsi_log_completion(scmd, TIMEOUT_ERROR); 129 scsi_log_completion(scmd, TIMEOUT_ERROR);
131 130
132 if (scmd->device->host->transportt->eh_timed_out) 131 if (scmd->device->host->transportt->eh_timed_out)
133 eh_timed_out = scmd->device->host->transportt->eh_timed_out; 132 rtn = scmd->device->host->transportt->eh_timed_out(scmd);
134 else if (scmd->device->host->hostt->eh_timed_out) 133 else if (scmd->device->host->hostt->eh_timed_out)
135 eh_timed_out = scmd->device->host->hostt->eh_timed_out; 134 rtn = scmd->device->host->hostt->eh_timed_out(scmd);
136 else
137 eh_timed_out = NULL;
138 135
139 if (eh_timed_out) { 136 if (unlikely(rtn == BLK_EH_NOT_HANDLED &&
140 rtn = eh_timed_out(scmd); 137 !scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD))) {
141 switch (rtn) {
142 case BLK_EH_NOT_HANDLED:
143 break;
144 default:
145 return rtn;
146 }
147 }
148
149 if (unlikely(!scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD))) {
150 scmd->result |= DID_TIME_OUT << 16; 138 scmd->result |= DID_TIME_OUT << 16;
151 return BLK_EH_HANDLED; 139 rtn = BLK_EH_HANDLED;
152 } 140 }
153 141
154 return BLK_EH_NOT_HANDLED; 142 return rtn;
155} 143}
156 144
157/** 145/**