aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-12-02 19:07:01 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-02-19 15:13:51 -0500
commit81c757bc696284f39f07766f0c2ca67af64ce9bd (patch)
treea01a13219199520c7a992f90d54cc83513a5cdb0 /include
parent0b3e09da1350397f3f8b6fd839ab455b0b587451 (diff)
[SCSI] libsas: execute transport link resets with libata-eh via host workqueue
Link resets leave ata affiliations intact, so arrange for libsas to make an effort to avoid dropping the device due to a slow-to-recover link. Towards this end carry out reset in the host workqueue so that it can check for ata devices and kick the reset request to libata. Hard resets, in contrast, bypass libata since they are meant for associating an ata device with another initiator in the domain (tears down affiliations). Need to add a new transport_sas_phy_reset() since the current sas_phy_reset() is a utility function to libsas lldds. They are not prepared for it to loop back into eh. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/libata.h1
-rw-r--r--include/scsi/sas_ata.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index cafc09a64fe4..aa4270477563 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1147,6 +1147,7 @@ static inline int ata_acpi_cbl_80wire(struct ata_port *ap,
1147 * EH - drivers/ata/libata-eh.c 1147 * EH - drivers/ata/libata-eh.c
1148 */ 1148 */
1149extern void ata_port_schedule_eh(struct ata_port *ap); 1149extern void ata_port_schedule_eh(struct ata_port *ap);
1150extern void ata_port_wait_eh(struct ata_port *ap);
1150extern int ata_link_abort(struct ata_link *link); 1151extern int ata_link_abort(struct ata_link *link);
1151extern int ata_port_abort(struct ata_port *ap); 1152extern int ata_port_abort(struct ata_port *ap);
1152extern int ata_port_freeze(struct ata_port *ap); 1153extern int ata_port_freeze(struct ata_port *ap);
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h
index c0bcd30eec56..da3f37727387 100644
--- a/include/scsi/sas_ata.h
+++ b/include/scsi/sas_ata.h
@@ -45,6 +45,7 @@ int sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q,
45 struct list_head *done_q); 45 struct list_head *done_q);
46void sas_probe_sata(struct work_struct *work); 46void sas_probe_sata(struct work_struct *work);
47void sas_ata_schedule_reset(struct domain_device *dev); 47void sas_ata_schedule_reset(struct domain_device *dev);
48void sas_ata_wait_eh(struct domain_device *dev);
48#else 49#else
49 50
50 51
@@ -79,6 +80,9 @@ static inline void sas_ata_schedule_reset(struct domain_device *dev)
79{ 80{
80} 81}
81 82
83static inline void sas_ata_wait_eh(struct domain_device *dev)
84{
85}
82#endif 86#endif
83 87
84#endif /* _SAS_ATA_H_ */ 88#endif /* _SAS_ATA_H_ */