Commit d2875b8
scsi: ufs: core: Fix a deadlock in the frequency scaling code
Commit 08b12cd ("scsi: ufs: core: Switch to scsi_get_internal_cmd()")
accidentally introduced a deadlock in the frequency scaling code.
ufshcd_clock_scaling_unprepare() may submit a device management command
while SCSI command processing is blocked. The deadlock was introduced by
using the SCSI core for submitting device management commands
(scsi_get_internal_cmd() + blk_execute_rq()). Fix this deadlock by calling
blk_mq_unquiesce_tagset() before any device management commands are
submitted by ufshcd_clock_scaling_unprepare().
Fixes: 08b12cd ("scsi: ufs: core: Switch to scsi_get_internal_cmd()")
Reported-by: Manivannan Sadhasivam <[email protected]>
Reported-by: Roger Shimizu <[email protected]>
Closes: https://lore.kernel.org/linux-scsi/ehorjaflathzab5oekx2nae2zss5vi2r36yqkqsfjb2fgsifz2@yk3us5g3igow/
Tested-by: Roger Shimizu <[email protected]>
Cc: Nitin Rawat <[email protected]>
Signed-off-by: Bart Van Assche <[email protected]>
Reviewed-by: Peter Wang <[email protected]>
Reviewed-by: Nitin Rawat <[email protected]>
Tested-by: Alexey Klimov <[email protected]> # RB5 board
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Martin K. Petersen <[email protected]>1 parent 14be351 commit d2875b8
1 file changed
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1455 | 1455 | | |
1456 | 1456 | | |
1457 | 1457 | | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
1458 | 1461 | | |
1459 | 1462 | | |
1460 | 1463 | | |
1461 | 1464 | | |
1462 | 1465 | | |
1463 | | - | |
1464 | | - | |
1465 | | - | |
1466 | | - | |
1467 | 1466 | | |
1468 | 1467 | | |
1469 | 1468 | | |
| |||
0 commit comments