]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: sg: Enable runtime power management
authorBart Van Assche <bvanassche@acm.org>
Wed, 30 Oct 2024 22:03:10 +0000 (15:03 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 7 Nov 2024 01:52:28 +0000 (20:52 -0500)
commit4045de893f691f75193c606aec440c365cf7a7be
treeefee3ce54ac0073326d8846cc5b7dab332f04fe0
parent95bbdca4999bc59a72ebab01663d421d6ce5775d
scsi: sg: Enable runtime power management

In 2010, runtime power management support was implemented in the SCSI
core.  The description of patch "[SCSI] implement runtime Power
Management" mentions that the sg driver is skipped but not why. This
patch enables runtime power management even if an instance of the sg
driver is held open.  Enabling runtime PM for the sg driver is safe
because all interactions of the sg driver with the SCSI device pass
through the block layer (blk_execute_rq_nowait()) and the block layer
already supports runtime PM.

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Douglas Gilbert <dgilbert@interlog.com>
Fixes: bc4f24014de5 ("[SCSI] implement runtime Power Management")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20241030220310.1373569-1-bvanassche@acm.org
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/sg.c