• Tejun Heo's avatar
    [PATCH] libata: reimplement per-dev PM · d6f26d1f
    Tejun Heo authored
    Reimplement per-dev PM.  The original implementation directly put the
    device into suspended mode and didn't synchronize w/ EH operations
    including hotplug.  This patch reimplements ata_scsi_device_suspend()
    and ata_scsi_device_resume() such that they request EH to perform the
    respective operations.  Both functions synchronize with hotplug such
    that it doesn't operate on detached devices.
    
    Suspend waits for completion but resume just issues request and
    returns.  This allows parallel wake up of devices and thus speeds up
    system resume.
    
    Due to sdev detach synchronization, it's not feasible to separate out
    EH requesting from sdev handling; thus, ata_device_suspend/resume()
    are removed and everything is implemented in the respective
    libata-scsi functions.
    Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
    Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
    d6f26d1f
libata-scsi.c 79 KB