aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-sub-ui.c
diff options
context:
space:
mode:
authorAdrian Hunter <[email protected]>2021-11-08 08:48:15 +0200
committerMartin K. Petersen <[email protected]>2021-11-16 19:42:32 -0500
commit5cb37a26355d79ab290220677b1b57d28e99a895 (patch)
tree7b722eff8ccd14e96733c06e36404d012f99568e /lib/mpi/mpi-sub-ui.c
parent886fe2915cce6658b0fc19e64b82879325de61ea (diff)
scsi: ufs: core: Fix another task management completion race
hba->outstanding_tasks, which is read under host_lock spinlock, tells the interrupt handler what task management tags are in use by the driver. The doorbell register bits indicate which tags are in use by the hardware. A doorbell bit that is 0 is because the bit has yet to be set by the driver, or because the task is complete. It is only possible to disambiguate the 2 cases, if reading/writing the doorbell register is synchronized with reading/writing hba->outstanding_tasks. For that reason, reading REG_UTP_TASK_REQ_DOOR_BELL must be done under spinlock. Link: https://lore.kernel.org/r/[email protected] Fixes: f5ef336fd2e4 ("scsi: ufs: core: Fix task management completion") Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions