Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9227c33d authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jeff Garzik
Browse files

[PATCH] move ->eh_strategy_handler to the transport class



Overriding the whole EH code is a per-transport, not per-host thing.
Move ->eh_strategy_handler to the transport class, same as
->eh_timed_out.

Downside is that scsi_host_alloc can't check for the total lack of EH
anymore, but the transition period from old EH where we needed it is
long gone already.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 676165a8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -705,7 +705,7 @@ and other resources, etc.

	<sect1><title>ata_scsi_error()</title>
	<para>
	ata_scsi_error() is the current hostt->eh_strategy_handler()
	ata_scsi_error() is the current transportt->eh_strategy_handler()
	for libata.  As discussed above, this will be entered in two
	cases - timeout and ATAPI error completion.  This function
	calls low level libata driver's eng_timeout() callback, the
+7 −7
Original line number Diff line number Diff line
@@ -19,9 +19,9 @@ TABLE OF CONTENTS
	[2-1-1] Overview
	[2-1-2] Flow of scmds through EH
	[2-1-3] Flow of control
    [2-2] EH through hostt->eh_strategy_handler()
	[2-2-1] Pre hostt->eh_strategy_handler() SCSI midlayer conditions
	[2-2-2] Post hostt->eh_strategy_handler() SCSI midlayer conditions
    [2-2] EH through transportt->eh_strategy_handler()
	[2-2-1] Pre transportt->eh_strategy_handler() SCSI midlayer conditions
	[2-2-2] Post transportt->eh_strategy_handler() SCSI midlayer conditions
	[2-2-3] Things to consider


@@ -413,9 +413,9 @@ scmd->allowed.
	    layer of failure of the scmds.


[2-2] EH through hostt->eh_strategy_handler()
[2-2] EH through transportt->eh_strategy_handler()

 hostt->eh_strategy_handler() is invoked in the place of
 transportt->eh_strategy_handler() is invoked in the place of
scsi_unjam_host() and it is responsible for whole recovery process.
On completion, the handler should have made lower layers forget about
all failed scmds and either ready for new commands or offline.  Also,
@@ -424,7 +424,7 @@ SCSI midlayer. IOW, of the steps described in [2-1-2], all steps
except for #1 must be implemented by eh_strategy_handler().


[2-2-1] Pre hostt->eh_strategy_handler() SCSI midlayer conditions
[2-2-1] Pre transportt->eh_strategy_handler() SCSI midlayer conditions

 The following conditions are true on entry to the handler.

@@ -437,7 +437,7 @@ except for #1 must be implemented by eh_strategy_handler().
 - shost->host_failed == shost->host_busy


[2-2-2] Post hostt->eh_strategy_handler() SCSI midlayer conditions
[2-2-2] Post transportt->eh_strategy_handler() SCSI midlayer conditions

 The following conditions must be true on exit from the handler.

+0 −19
Original line number Diff line number Diff line
@@ -804,7 +804,6 @@ Summary:
   eh_bus_reset_handler - issue SCSI bus reset
   eh_device_reset_handler - issue SCSI device reset
   eh_host_reset_handler - reset host (host bus adapter)
   eh_strategy_handler - driver supplied alternate to scsi_unjam_host()
   info - supply information about given host
   ioctl - driver can respond to ioctls
   proc_info - supports /proc/scsi/{driver_name}/{host_no}
@@ -969,24 +968,6 @@ Details:
     int eh_host_reset_handler(struct scsi_cmnd * scp)


/**
 *      eh_strategy_handler - driver supplied alternate to scsi_unjam_host()
 *      @shp: host on which error has occurred
 *
 *      Returns TRUE if host unjammed, else FALSE.
 *
 *      Locks: none
 *
 *      Calling context: kernel thread
 *
 *      Notes: Invoked from scsi_eh thread. LLD supplied alternate to 
 *      scsi_unjam_host() found in scsi_error.c
 *
 *      Optionally defined in: LLD
 **/
     int eh_strategy_handler(struct Scsi_Host * shp)


/**
 *      info - supply information about given host: driver name plus data
 *             to distinguish given host
+0 −1
Original line number Diff line number Diff line
@@ -207,7 +207,6 @@ static struct scsi_host_template ahci_sht = {
	.name			= DRV_NAME,
	.ioctl			= ata_scsi_ioctl,
	.queuecommand		= ata_scsi_queuecmd,
	.eh_strategy_handler	= ata_scsi_error,
	.can_queue		= ATA_DEF_QUEUE,
	.this_id		= ATA_SHT_THIS_ID,
	.sg_tablesize		= AHCI_MAX_SG,
+0 −1
Original line number Diff line number Diff line
@@ -209,7 +209,6 @@ static struct scsi_host_template piix_sht = {
	.name			= DRV_NAME,
	.ioctl			= ata_scsi_ioctl,
	.queuecommand		= ata_scsi_queuecmd,
	.eh_strategy_handler	= ata_scsi_error,
	.can_queue		= ATA_DEF_QUEUE,
	.this_id		= ATA_SHT_THIS_ID,
	.sg_tablesize		= LIBATA_MAX_PRD,
Loading