aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas/sas_init.c
diff options
context:
space:
mode:
authorQi Liu <[email protected]>2021-12-15 14:37:39 +0000
committerMartin K. Petersen <[email protected]>2021-12-17 03:59:58 +0000
commit16775db613c2bdea09705dcb876942c0641a1098 (patch)
tree0d24de7b4ed590a6cda00cd736be6208663b7983 /drivers/scsi/libsas/sas_init.c
parentscsi: hisi_sas: Prevent parallel controller reset and control phy command (diff)
downloadkernel-16775db613c2bdea09705dcb876942c0641a1098.tar.gz
kernel-16775db613c2bdea09705dcb876942c0641a1098.zip
scsi: hisi_sas: Prevent parallel FLR and controller reset
If we issue a controller reset command during executing a FLR a hung task may be found: Call trace: __switch_to+0x158/0x1cc __schedule+0x2e8/0x85c schedule+0x7c/0x110 schedule_timeout+0x190/0x1cc __down+0x7c/0xd4 down+0x5c/0x7c hisi_sas_task_exec+0x510/0x680 [hisi_sas_main] hisi_sas_queue_command+0x24/0x30 [hisi_sas_main] smp_execute_task_sg+0xf4/0x23c [libsas] sas_smp_phy_control+0x110/0x1e0 [libsas] transport_sas_phy_reset+0xc8/0x190 [libsas] phy_reset_work+0x2c/0x40 [libsas] process_one_work+0x1dc/0x48c worker_thread+0x15c/0x464 kthread+0x160/0x170 ret_from_fork+0x10/0x18 This is a race condition which occurs when the FLR completes first. Here the host HISI_SAS_RESETTING_BIT flag out gets of sync as HISI_SAS_RESETTING_BIT is not always cleared with the hisi_hba.sem held, so now only set/unset HISI_SAS_RESETTING_BIT under hisi_hba.sem . Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Qi Liu <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'drivers/scsi/libsas/sas_init.c')
0 files changed, 0 insertions, 0 deletions