diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index 1825b33cc274..6988ef6b5c3c 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c @@ -74,6 +74,8 @@ static int ahci_probe(struct platform_device *pdev) if (rc) goto disable_resources; + device_init_wakeup(dev, true); + return 0; disable_resources: ahci_platform_disable_resources(hpriv); diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index f0c0935d7909..8cf5d7ef7cc5 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -3716,10 +3716,16 @@ static int sd_resume(struct device *dev) if (!sdkp->device->manage_start_stop) return 0; + /* The wake-up process cannot allow the PM to enter sleep */ + pm_stay_awake(dev); + sd_printk(KERN_NOTICE, sdkp, "Starting disk\n"); ret = sd_start_stop_device(sdkp, 1); if (!ret) opal_unlock_from_suspend(sdkp->opal_dev); + + pm_relax(dev); + return ret; }