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 | |
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>
-rw-r--r-- | Documentation/DocBook/libata.tmpl | 2 | ||||
-rw-r--r-- | Documentation/scsi/scsi_eh.txt | 14 | ||||
-rw-r--r-- | Documentation/scsi/scsi_mid_low_api.txt | 19 | ||||
-rw-r--r-- | drivers/scsi/ahci.c | 1 | ||||
-rw-r--r-- | drivers/scsi/ata_piix.c | 1 | ||||
-rw-r--r-- | drivers/scsi/hosts.c | 12 | ||||
-rw-r--r-- | drivers/scsi/libata-core.c | 1 | ||||
-rw-r--r-- | drivers/scsi/libata-scsi.c | 8 | ||||
-rw-r--r-- | drivers/scsi/libata.h | 1 | ||||
-rw-r--r-- | drivers/scsi/pdc_adma.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_mv.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sata_nv.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_promise.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_qstor.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_sil.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_sil24.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_sis.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_svw.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_sx4.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_uli.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_via.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_vsc.c | 1 | ||||
-rw-r--r-- | drivers/scsi/scsi_error.c | 4 | ||||
-rw-r--r-- | include/linux/libata.h | 1 | ||||
-rw-r--r-- | include/scsi/scsi_host.h | 1 | ||||
-rw-r--r-- | include/scsi/scsi_transport.h | 5 |
26 files changed, 18 insertions, 66 deletions
diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl index 5bcbb6ee3bc0..f869b03929db 100644 --- a/Documentation/DocBook/libata.tmpl +++ b/Documentation/DocBook/libata.tmpl | |||
@@ -705,7 +705,7 @@ and other resources, etc. | |||
705 | 705 | ||
706 | <sect1><title>ata_scsi_error()</title> | 706 | <sect1><title>ata_scsi_error()</title> |
707 | <para> | 707 | <para> |
708 | ata_scsi_error() is the current hostt->eh_strategy_handler() | 708 | ata_scsi_error() is the current transportt->eh_strategy_handler() |
709 | for libata. As discussed above, this will be entered in two | 709 | for libata. As discussed above, this will be entered in two |
710 | cases - timeout and ATAPI error completion. This function | 710 | cases - timeout and ATAPI error completion. This function |
711 | calls low level libata driver's eng_timeout() callback, the | 711 | calls low level libata driver's eng_timeout() callback, the |
diff --git a/Documentation/scsi/scsi_eh.txt b/Documentation/scsi/scsi_eh.txt index 331afd791cbb..ce767b90bb0d 100644 --- a/Documentation/scsi/scsi_eh.txt +++ b/Documentation/scsi/scsi_eh.txt | |||
@@ -19,9 +19,9 @@ TABLE OF CONTENTS | |||
19 | [2-1-1] Overview | 19 | [2-1-1] Overview |
20 | [2-1-2] Flow of scmds through EH | 20 | [2-1-2] Flow of scmds through EH |
21 | [2-1-3] Flow of control | 21 | [2-1-3] Flow of control |
22 | [2-2] EH through hostt->eh_strategy_handler() | 22 | [2-2] EH through transportt->eh_strategy_handler() |
23 | [2-2-1] Pre hostt->eh_strategy_handler() SCSI midlayer conditions | 23 | [2-2-1] Pre transportt->eh_strategy_handler() SCSI midlayer conditions |
24 | [2-2-2] Post hostt->eh_strategy_handler() SCSI midlayer conditions | 24 | [2-2-2] Post transportt->eh_strategy_handler() SCSI midlayer conditions |
25 | [2-2-3] Things to consider | 25 | [2-2-3] Things to consider |
26 | 26 | ||
27 | 27 | ||
@@ -413,9 +413,9 @@ scmd->allowed. | |||
413 | layer of failure of the scmds. | 413 | layer of failure of the scmds. |
414 | 414 | ||
415 | 415 | ||
416 | [2-2] EH through hostt->eh_strategy_handler() | 416 | [2-2] EH through transportt->eh_strategy_handler() |
417 | 417 | ||
418 | hostt->eh_strategy_handler() is invoked in the place of | 418 | transportt->eh_strategy_handler() is invoked in the place of |
419 | scsi_unjam_host() and it is responsible for whole recovery process. | 419 | scsi_unjam_host() and it is responsible for whole recovery process. |
420 | On completion, the handler should have made lower layers forget about | 420 | On completion, the handler should have made lower layers forget about |
421 | all failed scmds and either ready for new commands or offline. Also, | 421 | 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 | |||
424 | except for #1 must be implemented by eh_strategy_handler(). | 424 | except for #1 must be implemented by eh_strategy_handler(). |
425 | 425 | ||
426 | 426 | ||
427 | [2-2-1] Pre hostt->eh_strategy_handler() SCSI midlayer conditions | 427 | [2-2-1] Pre transportt->eh_strategy_handler() SCSI midlayer conditions |
428 | 428 | ||
429 | The following conditions are true on entry to the handler. | 429 | The following conditions are true on entry to the handler. |
430 | 430 | ||
@@ -437,7 +437,7 @@ except for #1 must be implemented by eh_strategy_handler(). | |||
437 | - shost->host_failed == shost->host_busy | 437 | - shost->host_failed == shost->host_busy |
438 | 438 | ||
439 | 439 | ||
440 | [2-2-2] Post hostt->eh_strategy_handler() SCSI midlayer conditions | 440 | [2-2-2] Post transportt->eh_strategy_handler() SCSI midlayer conditions |
441 | 441 | ||
442 | The following conditions must be true on exit from the handler. | 442 | The following conditions must be true on exit from the handler. |
443 | 443 | ||
diff --git a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt index 8bbae3e1abdf..75a535a975c3 100644 --- a/Documentation/scsi/scsi_mid_low_api.txt +++ b/Documentation/scsi/scsi_mid_low_api.txt | |||
@@ -804,7 +804,6 @@ Summary: | |||
804 | eh_bus_reset_handler - issue SCSI bus reset | 804 | eh_bus_reset_handler - issue SCSI bus reset |
805 | eh_device_reset_handler - issue SCSI device reset | 805 | eh_device_reset_handler - issue SCSI device reset |
806 | eh_host_reset_handler - reset host (host bus adapter) | 806 | eh_host_reset_handler - reset host (host bus adapter) |
807 | eh_strategy_handler - driver supplied alternate to scsi_unjam_host() | ||
808 | info - supply information about given host | 807 | info - supply information about given host |
809 | ioctl - driver can respond to ioctls | 808 | ioctl - driver can respond to ioctls |
810 | proc_info - supports /proc/scsi/{driver_name}/{host_no} | 809 | proc_info - supports /proc/scsi/{driver_name}/{host_no} |
@@ -970,24 +969,6 @@ Details: | |||
970 | 969 | ||
971 | 970 | ||
972 | /** | 971 | /** |
973 | * eh_strategy_handler - driver supplied alternate to scsi_unjam_host() | ||
974 | * @shp: host on which error has occurred | ||
975 | * | ||
976 | * Returns TRUE if host unjammed, else FALSE. | ||
977 | * | ||
978 | * Locks: none | ||
979 | * | ||
980 | * Calling context: kernel thread | ||
981 | * | ||
982 | * Notes: Invoked from scsi_eh thread. LLD supplied alternate to | ||
983 | * scsi_unjam_host() found in scsi_error.c | ||
984 | * | ||
985 | * Optionally defined in: LLD | ||
986 | **/ | ||
987 | int eh_strategy_handler(struct Scsi_Host * shp) | ||
988 | |||
989 | |||
990 | /** | ||
991 | * info - supply information about given host: driver name plus data | 972 | * info - supply information about given host: driver name plus data |
992 | * to distinguish given host | 973 | * to distinguish given host |
993 | * @shp: host to supply information about | 974 | * @shp: host to supply information about |
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 1bd82c4e52a0..b4f8fb1d628b 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c | |||
@@ -207,7 +207,6 @@ static struct scsi_host_template ahci_sht = { | |||
207 | .name = DRV_NAME, | 207 | .name = DRV_NAME, |
208 | .ioctl = ata_scsi_ioctl, | 208 | .ioctl = ata_scsi_ioctl, |
209 | .queuecommand = ata_scsi_queuecmd, | 209 | .queuecommand = ata_scsi_queuecmd, |
210 | .eh_strategy_handler = ata_scsi_error, | ||
211 | .can_queue = ATA_DEF_QUEUE, | 210 | .can_queue = ATA_DEF_QUEUE, |
212 | .this_id = ATA_SHT_THIS_ID, | 211 | .this_id = ATA_SHT_THIS_ID, |
213 | .sg_tablesize = AHCI_MAX_SG, | 212 | .sg_tablesize = AHCI_MAX_SG, |
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index 24e71b555172..6dc88149f9f1 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c | |||
@@ -209,7 +209,6 @@ static struct scsi_host_template piix_sht = { | |||
209 | .name = DRV_NAME, | 209 | .name = DRV_NAME, |
210 | .ioctl = ata_scsi_ioctl, | 210 | .ioctl = ata_scsi_ioctl, |
211 | .queuecommand = ata_scsi_queuecmd, | 211 | .queuecommand = ata_scsi_queuecmd, |
212 | .eh_strategy_handler = ata_scsi_error, | ||
213 | .can_queue = ATA_DEF_QUEUE, | 212 | .can_queue = ATA_DEF_QUEUE, |
214 | .this_id = ATA_SHT_THIS_ID, | 213 | .this_id = ATA_SHT_THIS_ID, |
215 | .sg_tablesize = LIBATA_MAX_PRD, | 214 | .sg_tablesize = LIBATA_MAX_PRD, |
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index ef57f253031c..dfcb96f3e60c 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c | |||
@@ -294,18 +294,6 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) | |||
294 | if (sht->unchecked_isa_dma && privsize) | 294 | if (sht->unchecked_isa_dma && privsize) |
295 | gfp_mask |= __GFP_DMA; | 295 | gfp_mask |= __GFP_DMA; |
296 | 296 | ||
297 | /* Check to see if this host has any error handling facilities */ | ||
298 | if (!sht->eh_strategy_handler && !sht->eh_abort_handler && | ||
299 | !sht->eh_device_reset_handler && !sht->eh_bus_reset_handler && | ||
300 | !sht->eh_host_reset_handler) { | ||
301 | printk(KERN_ERR "ERROR: SCSI host `%s' has no error handling\n" | ||
302 | "ERROR: This is not a safe way to run your " | ||
303 | "SCSI host\n" | ||
304 | "ERROR: The error handling must be added to " | ||
305 | "this driver\n", sht->proc_name); | ||
306 | dump_stack(); | ||
307 | } | ||
308 | |||
309 | shost = kzalloc(sizeof(struct Scsi_Host) + privsize, gfp_mask); | 297 | shost = kzalloc(sizeof(struct Scsi_Host) + privsize, gfp_mask); |
310 | if (!shost) | 298 | if (!shost) |
311 | return NULL; | 299 | return NULL; |
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index e63c1ff1e102..bd147207f25d 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -4938,7 +4938,6 @@ EXPORT_SYMBOL_GPL(ata_busy_sleep); | |||
4938 | EXPORT_SYMBOL_GPL(ata_port_queue_task); | 4938 | EXPORT_SYMBOL_GPL(ata_port_queue_task); |
4939 | EXPORT_SYMBOL_GPL(ata_scsi_ioctl); | 4939 | EXPORT_SYMBOL_GPL(ata_scsi_ioctl); |
4940 | EXPORT_SYMBOL_GPL(ata_scsi_queuecmd); | 4940 | EXPORT_SYMBOL_GPL(ata_scsi_queuecmd); |
4941 | EXPORT_SYMBOL_GPL(ata_scsi_error); | ||
4942 | EXPORT_SYMBOL_GPL(ata_scsi_slave_config); | 4941 | EXPORT_SYMBOL_GPL(ata_scsi_slave_config); |
4943 | EXPORT_SYMBOL_GPL(ata_scsi_release); | 4942 | EXPORT_SYMBOL_GPL(ata_scsi_release); |
4944 | EXPORT_SYMBOL_GPL(ata_host_intr); | 4943 | EXPORT_SYMBOL_GPL(ata_host_intr); |
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 @@ | |||
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) |
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h index 1c755b14521a..bac8cbae06fe 100644 --- a/drivers/scsi/libata.h +++ b/drivers/scsi/libata.h | |||
@@ -60,7 +60,6 @@ extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg); | |||
60 | extern struct scsi_transport_template ata_scsi_transport_template; | 60 | extern struct scsi_transport_template ata_scsi_transport_template; |
61 | 61 | ||
62 | extern void ata_scsi_scan_host(struct ata_port *ap); | 62 | extern void ata_scsi_scan_host(struct ata_port *ap); |
63 | extern int ata_scsi_error(struct Scsi_Host *host); | ||
64 | extern unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf, | 63 | extern unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf, |
65 | unsigned int buflen); | 64 | unsigned int buflen); |
66 | 65 | ||
diff --git a/drivers/scsi/pdc_adma.c b/drivers/scsi/pdc_adma.c index 3c85c4b66e19..5cda16cfacb0 100644 --- a/drivers/scsi/pdc_adma.c +++ b/drivers/scsi/pdc_adma.c | |||
@@ -143,7 +143,6 @@ static struct scsi_host_template adma_ata_sht = { | |||
143 | .name = DRV_NAME, | 143 | .name = DRV_NAME, |
144 | .ioctl = ata_scsi_ioctl, | 144 | .ioctl = ata_scsi_ioctl, |
145 | .queuecommand = ata_scsi_queuecmd, | 145 | .queuecommand = ata_scsi_queuecmd, |
146 | .eh_strategy_handler = ata_scsi_error, | ||
147 | .can_queue = ATA_DEF_QUEUE, | 146 | .can_queue = ATA_DEF_QUEUE, |
148 | .this_id = ATA_SHT_THIS_ID, | 147 | .this_id = ATA_SHT_THIS_ID, |
149 | .sg_tablesize = LIBATA_MAX_PRD, | 148 | .sg_tablesize = LIBATA_MAX_PRD, |
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c index fa901fd65085..0ebf13668f51 100644 --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c | |||
@@ -378,8 +378,6 @@ static struct scsi_host_template mv_sht = { | |||
378 | .name = DRV_NAME, | 378 | .name = DRV_NAME, |
379 | .ioctl = ata_scsi_ioctl, | 379 | .ioctl = ata_scsi_ioctl, |
380 | .queuecommand = ata_scsi_queuecmd, | 380 | .queuecommand = ata_scsi_queuecmd, |
381 | .eh_strategy_handler = ata_scsi_error, | ||
382 | .can_queue = MV_USE_Q_DEPTH, | ||
383 | .this_id = ATA_SHT_THIS_ID, | 381 | .this_id = ATA_SHT_THIS_ID, |
384 | .sg_tablesize = MV_MAX_SG_CT / 2, | 382 | .sg_tablesize = MV_MAX_SG_CT / 2, |
385 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 383 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c index f77bf183dfab..9f553081b5e8 100644 --- a/drivers/scsi/sata_nv.c +++ b/drivers/scsi/sata_nv.c | |||
@@ -201,7 +201,6 @@ static struct scsi_host_template nv_sht = { | |||
201 | .name = DRV_NAME, | 201 | .name = DRV_NAME, |
202 | .ioctl = ata_scsi_ioctl, | 202 | .ioctl = ata_scsi_ioctl, |
203 | .queuecommand = ata_scsi_queuecmd, | 203 | .queuecommand = ata_scsi_queuecmd, |
204 | .eh_strategy_handler = ata_scsi_error, | ||
205 | .can_queue = ATA_DEF_QUEUE, | 204 | .can_queue = ATA_DEF_QUEUE, |
206 | .this_id = ATA_SHT_THIS_ID, | 205 | .this_id = ATA_SHT_THIS_ID, |
207 | .sg_tablesize = LIBATA_MAX_PRD, | 206 | .sg_tablesize = LIBATA_MAX_PRD, |
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index cc928c68a479..7eb67a6bdc64 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c | |||
@@ -111,7 +111,6 @@ static struct scsi_host_template pdc_ata_sht = { | |||
111 | .name = DRV_NAME, | 111 | .name = DRV_NAME, |
112 | .ioctl = ata_scsi_ioctl, | 112 | .ioctl = ata_scsi_ioctl, |
113 | .queuecommand = ata_scsi_queuecmd, | 113 | .queuecommand = ata_scsi_queuecmd, |
114 | .eh_strategy_handler = ata_scsi_error, | ||
115 | .can_queue = ATA_DEF_QUEUE, | 114 | .can_queue = ATA_DEF_QUEUE, |
116 | .this_id = ATA_SHT_THIS_ID, | 115 | .this_id = ATA_SHT_THIS_ID, |
117 | .sg_tablesize = LIBATA_MAX_PRD, | 116 | .sg_tablesize = LIBATA_MAX_PRD, |
diff --git a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c index 9ffe1ef0d205..886f3447dd48 100644 --- a/drivers/scsi/sata_qstor.c +++ b/drivers/scsi/sata_qstor.c | |||
@@ -132,7 +132,6 @@ static struct scsi_host_template qs_ata_sht = { | |||
132 | .name = DRV_NAME, | 132 | .name = DRV_NAME, |
133 | .ioctl = ata_scsi_ioctl, | 133 | .ioctl = ata_scsi_ioctl, |
134 | .queuecommand = ata_scsi_queuecmd, | 134 | .queuecommand = ata_scsi_queuecmd, |
135 | .eh_strategy_handler = ata_scsi_error, | ||
136 | .can_queue = ATA_DEF_QUEUE, | 135 | .can_queue = ATA_DEF_QUEUE, |
137 | .this_id = ATA_SHT_THIS_ID, | 136 | .this_id = ATA_SHT_THIS_ID, |
138 | .sg_tablesize = QS_MAX_PRD, | 137 | .sg_tablesize = QS_MAX_PRD, |
diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index 18c296c56899..106627299d55 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c | |||
@@ -146,7 +146,6 @@ static struct scsi_host_template sil_sht = { | |||
146 | .name = DRV_NAME, | 146 | .name = DRV_NAME, |
147 | .ioctl = ata_scsi_ioctl, | 147 | .ioctl = ata_scsi_ioctl, |
148 | .queuecommand = ata_scsi_queuecmd, | 148 | .queuecommand = ata_scsi_queuecmd, |
149 | .eh_strategy_handler = ata_scsi_error, | ||
150 | .can_queue = ATA_DEF_QUEUE, | 149 | .can_queue = ATA_DEF_QUEUE, |
151 | .this_id = ATA_SHT_THIS_ID, | 150 | .this_id = ATA_SHT_THIS_ID, |
152 | .sg_tablesize = LIBATA_MAX_PRD, | 151 | .sg_tablesize = LIBATA_MAX_PRD, |
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index 068c98a4111b..f7264fd611c2 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c | |||
@@ -281,7 +281,6 @@ static struct scsi_host_template sil24_sht = { | |||
281 | .name = DRV_NAME, | 281 | .name = DRV_NAME, |
282 | .ioctl = ata_scsi_ioctl, | 282 | .ioctl = ata_scsi_ioctl, |
283 | .queuecommand = ata_scsi_queuecmd, | 283 | .queuecommand = ata_scsi_queuecmd, |
284 | .eh_strategy_handler = ata_scsi_error, | ||
285 | .can_queue = ATA_DEF_QUEUE, | 284 | .can_queue = ATA_DEF_QUEUE, |
286 | .this_id = ATA_SHT_THIS_ID, | 285 | .this_id = ATA_SHT_THIS_ID, |
287 | .sg_tablesize = LIBATA_MAX_PRD, | 286 | .sg_tablesize = LIBATA_MAX_PRD, |
diff --git a/drivers/scsi/sata_sis.c b/drivers/scsi/sata_sis.c index acc8439dea23..728530df2e07 100644 --- a/drivers/scsi/sata_sis.c +++ b/drivers/scsi/sata_sis.c | |||
@@ -87,7 +87,6 @@ static struct scsi_host_template sis_sht = { | |||
87 | .name = DRV_NAME, | 87 | .name = DRV_NAME, |
88 | .ioctl = ata_scsi_ioctl, | 88 | .ioctl = ata_scsi_ioctl, |
89 | .queuecommand = ata_scsi_queuecmd, | 89 | .queuecommand = ata_scsi_queuecmd, |
90 | .eh_strategy_handler = ata_scsi_error, | ||
91 | .can_queue = ATA_DEF_QUEUE, | 90 | .can_queue = ATA_DEF_QUEUE, |
92 | .this_id = ATA_SHT_THIS_ID, | 91 | .this_id = ATA_SHT_THIS_ID, |
93 | .sg_tablesize = ATA_MAX_PRD, | 92 | .sg_tablesize = ATA_MAX_PRD, |
diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c index 724f0ed6a52d..53b0d5c0a61f 100644 --- a/drivers/scsi/sata_svw.c +++ b/drivers/scsi/sata_svw.c | |||
@@ -290,7 +290,6 @@ static struct scsi_host_template k2_sata_sht = { | |||
290 | .name = DRV_NAME, | 290 | .name = DRV_NAME, |
291 | .ioctl = ata_scsi_ioctl, | 291 | .ioctl = ata_scsi_ioctl, |
292 | .queuecommand = ata_scsi_queuecmd, | 292 | .queuecommand = ata_scsi_queuecmd, |
293 | .eh_strategy_handler = ata_scsi_error, | ||
294 | .can_queue = ATA_DEF_QUEUE, | 293 | .can_queue = ATA_DEF_QUEUE, |
295 | .this_id = ATA_SHT_THIS_ID, | 294 | .this_id = ATA_SHT_THIS_ID, |
296 | .sg_tablesize = LIBATA_MAX_PRD, | 295 | .sg_tablesize = LIBATA_MAX_PRD, |
diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c index ae70f60c7c0d..4139ad4b1df0 100644 --- a/drivers/scsi/sata_sx4.c +++ b/drivers/scsi/sata_sx4.c | |||
@@ -182,7 +182,6 @@ static struct scsi_host_template pdc_sata_sht = { | |||
182 | .name = DRV_NAME, | 182 | .name = DRV_NAME, |
183 | .ioctl = ata_scsi_ioctl, | 183 | .ioctl = ata_scsi_ioctl, |
184 | .queuecommand = ata_scsi_queuecmd, | 184 | .queuecommand = ata_scsi_queuecmd, |
185 | .eh_strategy_handler = ata_scsi_error, | ||
186 | .can_queue = ATA_DEF_QUEUE, | 185 | .can_queue = ATA_DEF_QUEUE, |
187 | .this_id = ATA_SHT_THIS_ID, | 186 | .this_id = ATA_SHT_THIS_ID, |
188 | .sg_tablesize = LIBATA_MAX_PRD, | 187 | .sg_tablesize = LIBATA_MAX_PRD, |
diff --git a/drivers/scsi/sata_uli.c b/drivers/scsi/sata_uli.c index 7ac5a5f5a905..38b52bd3fa3f 100644 --- a/drivers/scsi/sata_uli.c +++ b/drivers/scsi/sata_uli.c | |||
@@ -81,7 +81,6 @@ static struct scsi_host_template uli_sht = { | |||
81 | .name = DRV_NAME, | 81 | .name = DRV_NAME, |
82 | .ioctl = ata_scsi_ioctl, | 82 | .ioctl = ata_scsi_ioctl, |
83 | .queuecommand = ata_scsi_queuecmd, | 83 | .queuecommand = ata_scsi_queuecmd, |
84 | .eh_strategy_handler = ata_scsi_error, | ||
85 | .can_queue = ATA_DEF_QUEUE, | 84 | .can_queue = ATA_DEF_QUEUE, |
86 | .this_id = ATA_SHT_THIS_ID, | 85 | .this_id = ATA_SHT_THIS_ID, |
87 | .sg_tablesize = LIBATA_MAX_PRD, | 86 | .sg_tablesize = LIBATA_MAX_PRD, |
diff --git a/drivers/scsi/sata_via.c b/drivers/scsi/sata_via.c index 791bf652ba63..9e7ae4e0db32 100644 --- a/drivers/scsi/sata_via.c +++ b/drivers/scsi/sata_via.c | |||
@@ -94,7 +94,6 @@ static struct scsi_host_template svia_sht = { | |||
94 | .name = DRV_NAME, | 94 | .name = DRV_NAME, |
95 | .ioctl = ata_scsi_ioctl, | 95 | .ioctl = ata_scsi_ioctl, |
96 | .queuecommand = ata_scsi_queuecmd, | 96 | .queuecommand = ata_scsi_queuecmd, |
97 | .eh_strategy_handler = ata_scsi_error, | ||
98 | .can_queue = ATA_DEF_QUEUE, | 97 | .can_queue = ATA_DEF_QUEUE, |
99 | .this_id = ATA_SHT_THIS_ID, | 98 | .this_id = ATA_SHT_THIS_ID, |
100 | .sg_tablesize = LIBATA_MAX_PRD, | 99 | .sg_tablesize = LIBATA_MAX_PRD, |
diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c index 836bbbb26ff2..8a29ce340b47 100644 --- a/drivers/scsi/sata_vsc.c +++ b/drivers/scsi/sata_vsc.c | |||
@@ -263,7 +263,6 @@ static struct scsi_host_template vsc_sata_sht = { | |||
263 | .name = DRV_NAME, | 263 | .name = DRV_NAME, |
264 | .ioctl = ata_scsi_ioctl, | 264 | .ioctl = ata_scsi_ioctl, |
265 | .queuecommand = ata_scsi_queuecmd, | 265 | .queuecommand = ata_scsi_queuecmd, |
266 | .eh_strategy_handler = ata_scsi_error, | ||
267 | .can_queue = ATA_DEF_QUEUE, | 266 | .can_queue = ATA_DEF_QUEUE, |
268 | .this_id = ATA_SHT_THIS_ID, | 267 | .this_id = ATA_SHT_THIS_ID, |
269 | .sg_tablesize = LIBATA_MAX_PRD, | 268 | .sg_tablesize = LIBATA_MAX_PRD, |
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 5f0fdfb2618c..1c75646f9689 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -1537,8 +1537,8 @@ int scsi_error_handler(void *data) | |||
1537 | * what we need to do to get it up and online again (if we can). | 1537 | * what we need to do to get it up and online again (if we can). |
1538 | * If we fail, we end up taking the thing offline. | 1538 | * If we fail, we end up taking the thing offline. |
1539 | */ | 1539 | */ |
1540 | if (shost->hostt->eh_strategy_handler) | 1540 | if (shost->transportt->eh_strategy_handler) |
1541 | shost->hostt->eh_strategy_handler(shost); | 1541 | shost->transportt->eh_strategy_handler(shost); |
1542 | else | 1542 | else |
1543 | scsi_unjam_host(shost); | 1543 | scsi_unjam_host(shost); |
1544 | 1544 | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index 0d61357604d5..b80d2e7fa6d2 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -523,7 +523,6 @@ extern void ata_host_set_remove(struct ata_host_set *host_set); | |||
523 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 523 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
524 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 524 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
525 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 525 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
526 | extern int ata_scsi_error(struct Scsi_Host *host); | ||
527 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); | 526 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); |
528 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); | 527 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); |
529 | extern int ata_scsi_release(struct Scsi_Host *host); | 528 | extern int ata_scsi_release(struct Scsi_Host *host); |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index dc6862d09e53..de6ce541a046 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -140,7 +140,6 @@ struct scsi_host_template { | |||
140 | * | 140 | * |
141 | * Status: REQUIRED (at least one of them) | 141 | * Status: REQUIRED (at least one of them) |
142 | */ | 142 | */ |
143 | int (* eh_strategy_handler)(struct Scsi_Host *); | ||
144 | int (* eh_abort_handler)(struct scsi_cmnd *); | 143 | int (* eh_abort_handler)(struct scsi_cmnd *); |
145 | int (* eh_device_reset_handler)(struct scsi_cmnd *); | 144 | int (* eh_device_reset_handler)(struct scsi_cmnd *); |
146 | int (* eh_bus_reset_handler)(struct scsi_cmnd *); | 145 | int (* eh_bus_reset_handler)(struct scsi_cmnd *); |
diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h index b3657f111937..cca1d4926d2a 100644 --- a/include/scsi/scsi_transport.h +++ b/include/scsi/scsi_transport.h | |||
@@ -50,6 +50,11 @@ struct scsi_transport_template { | |||
50 | unsigned int create_work_queue : 1; | 50 | unsigned int create_work_queue : 1; |
51 | 51 | ||
52 | /* | 52 | /* |
53 | * Allows a transport to override the default error handler. | ||
54 | */ | ||
55 | void (* eh_strategy_handler)(struct Scsi_Host *); | ||
56 | |||
57 | /* | ||
53 | * This is an optional routine that allows the transport to become | 58 | * This is an optional routine that allows the transport to become |
54 | * involved when a scsi io timer fires. The return value tells the | 59 | * involved when a scsi io timer fires. The return value tells the |
55 | * timer routine how to finish the io timeout handling: | 60 | * timer routine how to finish the io timeout handling: |