Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127873
b: refs/heads/master
c: fa99078
h: refs/heads/master
i:
  127871: 262e8f9
v: v3
  • Loading branch information
Christoph Hellwig authored and James Bottomley committed Jan 2, 2009
1 parent 55a055f commit 20cf230
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 327d0c7d89319a8ee8e946b90cb94c08daadb723
refs/heads/master: fa9907810bf733ef48b0cd50023b03b78f983434
24 changes: 6 additions & 18 deletions trunk/drivers/scsi/scsi_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,34 +124,22 @@ int scsi_eh_scmd_add(struct scsi_cmnd *scmd, int eh_flag)
enum blk_eh_timer_return scsi_times_out(struct request *req)
{
struct scsi_cmnd *scmd = req->special;
enum blk_eh_timer_return (*eh_timed_out)(struct scsi_cmnd *);
enum blk_eh_timer_return rtn = BLK_EH_NOT_HANDLED;

scsi_log_completion(scmd, TIMEOUT_ERROR);

if (scmd->device->host->transportt->eh_timed_out)
eh_timed_out = scmd->device->host->transportt->eh_timed_out;
rtn = scmd->device->host->transportt->eh_timed_out(scmd);
else if (scmd->device->host->hostt->eh_timed_out)
eh_timed_out = scmd->device->host->hostt->eh_timed_out;
else
eh_timed_out = NULL;
rtn = scmd->device->host->hostt->eh_timed_out(scmd);

if (eh_timed_out) {
rtn = eh_timed_out(scmd);
switch (rtn) {
case BLK_EH_NOT_HANDLED:
break;
default:
return rtn;
}
}

if (unlikely(!scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD))) {
if (unlikely(rtn == BLK_EH_NOT_HANDLED &&
!scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD))) {
scmd->result |= DID_TIME_OUT << 16;
return BLK_EH_HANDLED;
rtn = BLK_EH_HANDLED;
}

return BLK_EH_NOT_HANDLED;
return rtn;
}

/**
Expand Down

0 comments on commit 20cf230

Please sign in to comment.