aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-scsi.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-04-01 12:21:04 -0500
committerJeff Garzik <jeff@garzik.org>2006-04-10 14:15:47 -0400
commit9227c33de80ac01f269ed33624990ce84358e419 (patch)
tree7678d342949db011d37e15516c3eaa22ec32ff2a /drivers/scsi/libata-scsi.c
parent676165a8af7167f488abdcce6851a9bc36e83254 (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.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index 53f5b0d9161c..a0289ec3e283 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -53,6 +53,7 @@
53typedef unsigned int (*ata_xlat_func_t)(struct ata_queued_cmd *qc, const u8 *scsicmd); 53typedef unsigned int (*ata_xlat_func_t)(struct ata_queued_cmd *qc, const u8 *scsicmd);
54static struct ata_device * 54static struct ata_device *
55ata_scsi_find_dev(struct ata_port *ap, const struct scsi_device *scsidev); 55ata_scsi_find_dev(struct ata_port *ap, const struct scsi_device *scsidev);
56static void ata_scsi_error(struct Scsi_Host *host);
56enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd); 57enum 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 */
101struct scsi_transport_template ata_scsi_transport_template = { 102struct 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
780int ata_scsi_error(struct Scsi_Host *host) 779static 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
811static void ata_eh_scsidone(struct scsi_cmnd *scmd) 809static void ata_eh_scsidone(struct scsi_cmnd *scmd)