From 9227c33de80ac01f269ed33624990ce84358e419 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sat, 1 Apr 2006 19:21:04 +0200 Subject: [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 Signed-off-by: Jeff Garzik --- drivers/scsi/libata-scsi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers/scsi/libata-scsi.c') 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 @@ typedef unsigned int (*ata_xlat_func_t)(struct ata_queued_cmd *qc, const u8 *scsicmd); static struct ata_device * ata_scsi_find_dev(struct ata_port *ap, const struct scsi_device *scsidev); +static void ata_scsi_error(struct Scsi_Host *host); enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd); #define RW_RECOVERY_MPAGE 0x1 @@ -99,6 +100,7 @@ static const u8 def_control_mpage[CONTROL_MPAGE_LEN] = { * It just needs the eh_timed_out hook. */ struct scsi_transport_template ata_scsi_transport_template = { + .eh_strategy_handler = ata_scsi_error, .eh_timed_out = ata_scsi_timed_out, }; @@ -772,12 +774,9 @@ enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd) * * LOCKING: * Inherited from SCSI layer (none, can sleep) - * - * RETURNS: - * Zero. */ -int ata_scsi_error(struct Scsi_Host *host) +static void ata_scsi_error(struct Scsi_Host *host) { struct ata_port *ap; unsigned long flags; @@ -805,7 +804,6 @@ int ata_scsi_error(struct Scsi_Host *host) spin_unlock_irqrestore(&ap->host_set->lock, flags); DPRINTK("EXIT\n"); - return 0; } static void ata_eh_scsidone(struct scsi_cmnd *scmd) -- cgit v1.2.3