]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: ufs-bsg: Wake the device before sending raw upiu commands
authorAvri Altman <avri.altman@wdc.com>
Thu, 10 Oct 2019 08:31:07 +0000 (11:31 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Nov 2019 18:27:42 +0000 (19:27 +0100)
commit24665ff0d06a6bdf3e9abe1b558d1efb38c38c33
treee8ca2848f8798db86c0d1866c18ea4a167c20d1d
parent7153621da5cd0dc1be00fb5caa63e24d18782914
scsi: ufs-bsg: Wake the device before sending raw upiu commands

[ Upstream commit 74e5e468b664d3739b2872d54764af97ac38e795 ]

The scsi async probe process is calling blk_pm_runtime_init for each lun,
and then those request queues are monitored by the block layer pm
engine (blk-pm.c).  This is however, not the case for scsi-passthrough
queues, created by bsg_setup_queue().

So the ufs-bsg driver might send various commands, disregarding the pm
status of the device. This is wrong, regardless if its request queue is
pm-aware or not.

Fixes: df032bf27a41 (scsi: ufs: Add a bsg endpoint that supports UPIUs)
Link: https://lore.kernel.org/r/1570696267-8487-1-git-send-email-avri.altman@wdc.com
Reported-by: Yuliy Izrailov <yuliy.izrailov@wdc.com>
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/ufs/ufs_bsg.c