[SCSI] FC transport : Avoid device offline cases by stalling aborts until device unblocked

This moves the eh_timed_out functionality from the scsi_host_template
to the transport_template. Given that this is now a transport function,
the EH_RESET_TIMER case no longer caps the timer reschedulings. The
transport guarantees that this is not an infinite condition.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
James Smart
2006-03-13 08:28:57 -05:00
committed by James Bottomley
parent ce313db240
commit c829c39416
4 changed files with 51 additions and 20 deletions

View File

@@ -29,6 +29,7 @@
#include <scsi/scsi_dbg.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_eh.h>
#include <scsi/scsi_transport.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_ioctl.h>
#include <scsi/scsi_request.h>
@@ -163,16 +164,12 @@ void scsi_times_out(struct scsi_cmnd *scmd)
{
scsi_log_completion(scmd, TIMEOUT_ERROR);
if (scmd->device->host->hostt->eh_timed_out)
switch (scmd->device->host->hostt->eh_timed_out(scmd)) {
if (scmd->device->host->transportt->eh_timed_out)
switch (scmd->device->host->transportt->eh_timed_out(scmd)) {
case EH_HANDLED:
__scsi_done(scmd);
return;
case EH_RESET_TIMER:
/* This allows a single retry even of a command
* with allowed == 0 */
if (scmd->retries++ > scmd->allowed)
break;
scsi_add_timer(scmd, scmd->timeout_per_command,
scsi_times_out);
return;