diff options
author | James Bottomley <James.Bottomley@suse.de> | 2011-01-23 10:44:12 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2011-03-02 02:36:45 -0500 |
commit | 00dd4998a60599d98b4d6635820a1fbeafa5b021 (patch) | |
tree | 6a7ecd27007856691964399eec8882b8d8ca8560 /include/scsi | |
parent | 0e0b494ca8c54a7297d0cc549405091019b3b77e (diff) |
libsas: convert to libata new error handler
The conversion is quite complex given that the libata new error
handler has to be hooked into the current libsas timeout and error
handling. The way this is done is to process all the failed commands
via libsas first, but if they have no underlying sas task (and they're
on a sata device) assume they are destined for the libata error
handler and send them accordingly.
Finally, activate the port recovery of the libata error handler for
each port known to the host. This is somewhat suboptimal, since that
port may not need recovering, but given the current architecture of
the libata error handler, it's the only way; and the spurious
activation is harmless.
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/sas_ata.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h index c583193ae929..9c159f74c6d0 100644 --- a/include/scsi/sas_ata.h +++ b/include/scsi/sas_ata.h | |||
@@ -39,6 +39,11 @@ int sas_ata_init_host_and_port(struct domain_device *found_dev, | |||
39 | struct scsi_target *starget); | 39 | struct scsi_target *starget); |
40 | 40 | ||
41 | void sas_ata_task_abort(struct sas_task *task); | 41 | void sas_ata_task_abort(struct sas_task *task); |
42 | void sas_ata_strategy_handler(struct Scsi_Host *shost); | ||
43 | int sas_ata_timed_out(struct scsi_cmnd *cmd, struct sas_task *task, | ||
44 | enum blk_eh_timer_return *rtn); | ||
45 | int sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q, | ||
46 | struct list_head *done_q); | ||
42 | 47 | ||
43 | #else | 48 | #else |
44 | 49 | ||
@@ -55,6 +60,23 @@ static inline int sas_ata_init_host_and_port(struct domain_device *found_dev, | |||
55 | static inline void sas_ata_task_abort(struct sas_task *task) | 60 | static inline void sas_ata_task_abort(struct sas_task *task) |
56 | { | 61 | { |
57 | } | 62 | } |
63 | |||
64 | static inline void sas_ata_strategy_handler(struct Scsi_Host *shost) | ||
65 | { | ||
66 | } | ||
67 | |||
68 | static inline int sas_ata_timed_out(struct scsi_cmnd *cmd, | ||
69 | struct sas_task *task, | ||
70 | enum blk_eh_timer_return *rtn) | ||
71 | { | ||
72 | return 0; | ||
73 | } | ||
74 | static inline int sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q, | ||
75 | struct list_head *done_q) | ||
76 | { | ||
77 | return 0; | ||
78 | } | ||
79 | |||
58 | #endif | 80 | #endif |
59 | 81 | ||
60 | #endif /* _SAS_ATA_H_ */ | 82 | #endif /* _SAS_ATA_H_ */ |