aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas/sas_phy.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libsas/sas_phy.c')
-rw-r--r--drivers/scsi/libsas/sas_phy.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/scsi/libsas/sas_phy.c b/drivers/scsi/libsas/sas_phy.c
index 521422e857ab..cdee446c29e1 100644
--- a/drivers/scsi/libsas/sas_phy.c
+++ b/drivers/scsi/libsas/sas_phy.c
@@ -94,6 +94,25 @@ static void sas_phye_spinup_hold(struct work_struct *work)
94 i->dft->lldd_control_phy(phy, PHY_FUNC_RELEASE_SPINUP_HOLD, NULL); 94 i->dft->lldd_control_phy(phy, PHY_FUNC_RELEASE_SPINUP_HOLD, NULL);
95} 95}
96 96
97static void sas_phye_resume_timeout(struct work_struct *work)
98{
99 struct asd_sas_event *ev = to_asd_sas_event(work);
100 struct asd_sas_phy *phy = ev->phy;
101
102 clear_bit(PHYE_RESUME_TIMEOUT, &phy->phy_events_pending);
103
104 /* phew, lldd got the phy back in the nick of time */
105 if (!phy->suspended) {
106 dev_info(&phy->phy->dev, "resume timeout cancelled\n");
107 return;
108 }
109
110 phy->error = 0;
111 phy->suspended = 0;
112 sas_deform_port(phy, 1);
113}
114
115
97/* ---------- Phy class registration ---------- */ 116/* ---------- Phy class registration ---------- */
98 117
99int sas_register_phys(struct sas_ha_struct *sas_ha) 118int sas_register_phys(struct sas_ha_struct *sas_ha)
@@ -105,6 +124,8 @@ int sas_register_phys(struct sas_ha_struct *sas_ha)
105 [PHYE_OOB_DONE] = sas_phye_oob_done, 124 [PHYE_OOB_DONE] = sas_phye_oob_done,
106 [PHYE_OOB_ERROR] = sas_phye_oob_error, 125 [PHYE_OOB_ERROR] = sas_phye_oob_error,
107 [PHYE_SPINUP_HOLD] = sas_phye_spinup_hold, 126 [PHYE_SPINUP_HOLD] = sas_phye_spinup_hold,
127 [PHYE_RESUME_TIMEOUT] = sas_phye_resume_timeout,
128
108 }; 129 };
109 130
110 static const work_func_t sas_port_event_fns[PORT_NUM_EVENTS] = { 131 static const work_func_t sas_port_event_fns[PORT_NUM_EVENTS] = {