diff options
author | James Bottomley <JBottomley@Parallels.com> | 2012-10-02 07:55:12 (GMT) |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-10-02 07:55:12 (GMT) |
commit | fe709ed827d370e6b0c0a9f9456da1c22bdcd118 (patch) | |
tree | c5a7fd72a745a5f6656a58acc9a1d277e26f9595 /drivers/scsi/libsas/sas_phy.c | |
parent | 1c4cf1d5845b59cdcbfad8e67272cf5b219ab062 (diff) | |
parent | 0644f5393e915f13733bcc65f13195ff39aeb63e (diff) | |
download | linux-fsl-qoriq-fe709ed827d370e6b0c0a9f9456da1c22bdcd118.tar.xz |
Merge SCSI misc branch into isci-for-3.6 tag
Diffstat (limited to 'drivers/scsi/libsas/sas_phy.c')
-rw-r--r-- | drivers/scsi/libsas/sas_phy.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/scsi/libsas/sas_phy.c b/drivers/scsi/libsas/sas_phy.c index 521422e..cdee446c 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) i->dft->lldd_control_phy(phy, PHY_FUNC_RELEASE_SPINUP_HOLD, NULL); } +static void sas_phye_resume_timeout(struct work_struct *work) +{ + struct asd_sas_event *ev = to_asd_sas_event(work); + struct asd_sas_phy *phy = ev->phy; + + clear_bit(PHYE_RESUME_TIMEOUT, &phy->phy_events_pending); + + /* phew, lldd got the phy back in the nick of time */ + if (!phy->suspended) { + dev_info(&phy->phy->dev, "resume timeout cancelled\n"); + return; + } + + phy->error = 0; + phy->suspended = 0; + sas_deform_port(phy, 1); +} + + /* ---------- Phy class registration ---------- */ int sas_register_phys(struct sas_ha_struct *sas_ha) @@ -105,6 +124,8 @@ int sas_register_phys(struct sas_ha_struct *sas_ha) [PHYE_OOB_DONE] = sas_phye_oob_done, [PHYE_OOB_ERROR] = sas_phye_oob_error, [PHYE_SPINUP_HOLD] = sas_phye_spinup_hold, + [PHYE_RESUME_TIMEOUT] = sas_phye_resume_timeout, + }; static const work_func_t sas_port_event_fns[PORT_NUM_EVENTS] = { |