summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_sysfs.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2021-10-06 14:54:51 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2021-10-16 21:08:39 -0400
commita19a93e4c6a98c9c0f2f5a6db76846f10d7d1f85 (patch)
tree49b351875df809b8a6d9267a58ef728d8f16eb58 /drivers/scsi/scsi_sysfs.c
parenta4bcbf71914b0cc44151a5238e4a8afa8e3319cd (diff)
downloadlinux-stable-a19a93e4c6a98c9c0f2f5a6db76846f10d7d1f85.tar.gz
linux-stable-a19a93e4c6a98c9c0f2f5a6db76846f10d7d1f85.tar.bz2
linux-stable-a19a93e4c6a98c9c0f2f5a6db76846f10d7d1f85.zip
scsi: core: pm: Rely on the device driver core for async power management
Instead of implementing asynchronous resume support in the SCSI core, rely on the device driver core for resuming SCSI devices asynchronously. Instead of only supporting asynchronous resumes, also support asynchronous suspends. Link: https://lore.kernel.org/r/20211006215453.3318929-2-bvanassche@acm.org Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Hannes Reinecke <hare@suse.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Martin Kepplinger <martin.kepplinger@puri.sm> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_sysfs.c')
-rw-r--r--drivers/scsi/scsi_sysfs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 86793259e541..b598dfcbb67d 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -1616,6 +1616,7 @@ void scsi_sysfs_device_initialize(struct scsi_device *sdev)
device_initialize(&sdev->sdev_gendev);
sdev->sdev_gendev.bus = &scsi_bus_type;
sdev->sdev_gendev.type = &scsi_dev_type;
+ scsi_enable_async_suspend(&sdev->sdev_gendev);
dev_set_name(&sdev->sdev_gendev, "%d:%d:%d:%llu",
sdev->host->host_no, sdev->channel, sdev->id, sdev->lun);