• Dan Williams's avatar
    [SCSI] libsas: suspend / resume support · 303694ee
    Dan Williams authored
    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: default avatarDan Williams <dan.j.williams@intel.com>
    Reviewed-by: default avatarJacek Danecki <jacek.danecki@intel.com>
    Tested-by: default avatarMaciej Patelczyk <maciej.patelczyk@intel.com>
    Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
    303694ee
sas_init.c 15.4 KB