diff options
author | Christoph Hellwig <hch@lst.de> | 2006-04-01 12:21:04 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-10 14:15:47 -0400 |
commit | 9227c33de80ac01f269ed33624990ce84358e419 (patch) | |
tree | 7678d342949db011d37e15516c3eaa22ec32ff2a /drivers/scsi/libata-scsi.c | |
parent | 676165a8af7167f488abdcce6851a9bc36e83254 (diff) |
[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: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r-- | drivers/scsi/libata-scsi.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 53f5b0d9161..a0289ec3e28 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c | |||
@@ -53,6 +53,7 @@ | |||
53 | typedef unsigned int (*ata_xlat_func_t)(struct ata_queued_cmd *qc, const u8 *scsicmd); | 53 | typedef unsigned int (*ata_xlat_func_t)(struct ata_queued_cmd *qc, const u8 *scsicmd); |
54 | static struct ata_device * | 54 | static struct ata_device * |
55 | ata_scsi_find_dev(struct ata_port *ap, const struct scsi_device *scsidev); | 55 | ata_scsi_find_dev(struct ata_port *ap, const struct scsi_device *scsidev); |
56 | static void ata_scsi_error(struct Scsi_Host *host); | ||
56 | enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd); | 57 | enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd); |
57 | 58 | ||
58 | #define RW_RECOVERY_MPAGE 0x1 | 59 | #define RW_RECOVERY_MPAGE 0x1 |
@@ -99,6 +100,7 @@ static const u8 def_control_mpage[CONTROL_MPAGE_LEN] = { | |||
99 | * It just needs the eh_timed_out hook. | 100 | * It just needs the eh_timed_out hook. |
100 | */ | 101 | */ |
101 | struct scsi_transport_template ata_scsi_transport_template = { | 102 | struct scsi_transport_template ata_scsi_transport_template = { |
103 | .eh_strategy_handler = ata_scsi_error, | ||
102 | .eh_timed_out = ata_scsi_timed_out, | 104 | .eh_timed_out = ata_scsi_timed_out, |
103 | }; | 105 | }; |
104 | 106 | ||
@@ -772,12 +774,9 @@ enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd) | |||
772 | * | 774 | * |
773 | * LOCKING: | 775 | * LOCKING: |
774 | * Inherited from SCSI layer (none, can sleep) | 776 | * Inherited from SCSI layer (none, can sleep) |
775 | * | ||
776 | * RETURNS: | ||
777 | * Zero. | ||
778 | */ | 777 | */ |
779 | 778 | ||
780 | int ata_scsi_error(struct Scsi_Host *host) | 779 | static void ata_scsi_error(struct Scsi_Host *host) |
781 | { | 780 | { |
782 | struct ata_port *ap; | 781 | struct ata_port *ap; |
783 | unsigned long flags; | 782 | unsigned long flags; |
@@ -805,7 +804,6 @@ int ata_scsi_error(struct Scsi_Host *host) | |||
805 | spin_unlock_irqrestore(&ap->host_set->lock, flags); | 804 | spin_unlock_irqrestore(&ap->host_set->lock, flags); |
806 | 805 | ||
807 | DPRINTK("EXIT\n"); | 806 | DPRINTK("EXIT\n"); |
808 | return 0; | ||
809 | } | 807 | } |
810 | 808 | ||
811 | static void ata_eh_scsidone(struct scsi_cmnd *scmd) | 809 | static void ata_eh_scsidone(struct scsi_cmnd *scmd) |