]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[SCSI] improved eh timeout handler
authorHannes Reinecke <hare@suse.de>
Mon, 11 Nov 2013 12:44:54 +0000 (13:44 +0100)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 17 Dec 2013 14:11:20 +0000 (06:11 -0800)
commit534b27fdf8745cfa20ae4839fe961309919e653c
tree96b7acb38605c8671babf0c21b3f9f779f5d18f6
parentec8a7d0b44013db32b076061b38ed5bfbe79fd16
[SCSI] improved eh timeout handler

When a command runs into a timeout we need to send an 'ABORT TASK'
TMF. This is typically done by the 'eh_abort_handler' LLDD callback.

Conceptually, however, this function is a normal SCSI command, so
there is no need to enter the error handler.

This patch implements a new scsi_abort_command() function which
invokes an asynchronous function scsi_eh_abort_handler() to
abort the commands via the usual 'eh_abort_handler'.

If abort succeeds the command is either retried or terminated,
depending on the number of allowed retries. However, 'eh_eflags'
records the abort, so if the retry would fail again the
command is pushed onto the error handler without trying to
abort it (again); it'll be cleared up from SCSI EH.

[hare: smatch detected stray switch fixed]
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/hosts.c
drivers/scsi/scsi.c
drivers/scsi/scsi_error.c
drivers/scsi/scsi_priv.h
include/scsi/scsi_cmnd.h
include/scsi/scsi_host.h