diff options
author | Dan Williams <dan.j.williams@intel.com> | 2012-06-22 10:41:51 +0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-08-24 13:10:23 +0400 |
commit | 303694eeee5eacad5b84105a15afd9e351e1891b (patch) | |
tree | ba8e16274ffbde39b21100ced62b5b11e8c926d6 /drivers/scsi/libsas/sas_event.c | |
parent | 2fcbdcb4c802fe40d6827dbc365dac90cfe8c0a3 (diff) | |
download | linux-303694eeee5eacad5b84105a15afd9e351e1891b.tar.xz |
[SCSI] libsas: suspend / resume support
libsas power management routines to suspend and recover the sas domain
based on a model where the lldd is allowed and expected to be
"forgetful".
sas_suspend_ha - disable event processing allowing the lldd to take down
links without concern for causing hotplug events.
Regardless of whether the lldd actually posts link down
messages libsas notifies the lldd that all
domain_devices are gone.
sas_prep_resume_ha - on the way back up before the lldd starts link
training clean out any spurious events that were
generated on the way down, and re-enable event
processing
sas_resume_ha - after the lldd has started and decided that all phys
have posted link-up events this routine is called to let
libsas start it's own timeout of any phys that did not
resume. After the timeout an lldd can cancel the
phy teardown by posting a link-up event.
Storage for ex_change_count (u16) and phy_change_count (u8) are changed
to int so they can be set to -1 to indicate 'invalidated'.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Jacek Danecki <jacek.danecki@intel.com>
Tested-by: Maciej Patelczyk <maciej.patelczyk@intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/libsas/sas_event.c')
-rw-r--r-- | drivers/scsi/libsas/sas_event.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/libsas/sas_event.c b/drivers/scsi/libsas/sas_event.c index 789c4d8bb7a7..aadbd5314c5c 100644 --- a/drivers/scsi/libsas/sas_event.c +++ b/drivers/scsi/libsas/sas_event.c @@ -134,7 +134,7 @@ static void notify_port_event(struct asd_sas_phy *phy, enum port_event event) &phy->port_events[event].work, ha); } -static void notify_phy_event(struct asd_sas_phy *phy, enum phy_event event) +void sas_notify_phy_event(struct asd_sas_phy *phy, enum phy_event event) { struct sas_ha_struct *ha = phy->ha; @@ -159,7 +159,7 @@ int sas_init_events(struct sas_ha_struct *sas_ha) sas_ha->notify_ha_event = notify_ha_event; sas_ha->notify_port_event = notify_port_event; - sas_ha->notify_phy_event = notify_phy_event; + sas_ha->notify_phy_event = sas_notify_phy_event; return 0; } |