Commit 14c801d
scsi: ufs: core: Don't perform UFS clkscaling during host async scan
BugLink: https://bugs.launchpad.net/bugs/2121266
[ Upstream commit e97633492f5a3eca7b3ff03b4ef6f993017f7955 ]
When preparing for UFS clock scaling, the UFS driver will quiesce all
sdevs queues in the UFS SCSI host tagset list and then unquiesce them in
ufshcd_clock_scaling_unprepare(). If the UFS SCSI host async scan is in
progress at this time, some LUs may be added to the tagset list between
UFS clkscale prepare and unprepare. This can cause two issues:
1. During clock scaling, there may be I/O requests issued through new
added queues that have not been quiesced, leading to task abort issue.
2. These new added queues that have not been quiesced will be unquiesced
as well when UFS clkscale is unprepared, resulting in warning prints.
Therefore, use the mutex lock scan_mutex in
ufshcd_clock_scaling_prepare() and ufshcd_clock_scaling_unprepare() to
protect it.
Co-developed-by: Can Guo <[email protected]>
Signed-off-by: Can Guo <[email protected]>
Signed-off-by: Ziqi Chen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Suggested-by: Bart Van Assche <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Noah Wager <[email protected]>
Signed-off-by: Stefan Bader <[email protected]>1 parent e1a2030 commit 14c801d
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1368 | 1368 | | |
1369 | 1369 | | |
1370 | 1370 | | |
| 1371 | + | |
1371 | 1372 | | |
1372 | 1373 | | |
1373 | 1374 | | |
| |||
1378 | 1379 | | |
1379 | 1380 | | |
1380 | 1381 | | |
| 1382 | + | |
1381 | 1383 | | |
1382 | 1384 | | |
1383 | 1385 | | |
| |||
1399 | 1401 | | |
1400 | 1402 | | |
1401 | 1403 | | |
| 1404 | + | |
1402 | 1405 | | |
1403 | 1406 | | |
1404 | 1407 | | |
| |||
0 commit comments