linux/drivers/scsi/ufs
Adrian Hunter 5cb37a2635 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/20211108064815.569494-3-adrian.hunter@intel.com
Fixes: f5ef336fd2 ("scsi: ufs: core: Fix task management completion")
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-11-16 19:42:32 -05:00
..
cdns-pltfrm.c scsi: ufs: Reduce power management code duplication 2021-08-02 21:43:57 -04:00
Kconfig scsi: ufs: core: SCSI_UFS_HWMON depends on HWMON=y 2021-09-28 23:24:10 -04:00
Makefile scsi: ufs: core: Probe for temperature notification support 2021-09-22 00:07:42 -04:00
tc-dwc-g210-pci.c scsi: ufs: Reduce power management code duplication 2021-08-02 21:43:57 -04:00
tc-dwc-g210-pltfrm.c scsi: ufs: Reduce power management code duplication 2021-08-02 21:43:57 -04:00
tc-dwc-g210.c
tc-dwc-g210.h
ti-j721e-ufs.c
ufs-debugfs.c scsi: ufs: core: Add debugfs attributes for triggering the UFS EH 2021-10-26 23:24:50 -04:00
ufs-debugfs.h scsi: ufs: core: Enable power management for wlun 2021-05-10 22:28:20 -04:00
ufs-exynos.c SCSI misc on 20211105 2021-11-05 08:42:02 -07:00
ufs-exynos.h scsi: ufs: ufs-exynos: Support ExynosAuto v9 UFS 2021-10-27 23:10:12 -04:00
ufs-fault-injection.c scsi: ufs: Add fault injection support 2021-08-03 07:27:42 -04:00
ufs-fault-injection.h scsi: ufs: Add fault injection support 2021-08-03 07:27:42 -04:00
ufs-hisi.c scsi: ufs: mediatek: Support vops pre suspend to disable auto-hibern8 2021-10-12 13:41:01 -04:00
ufs-hisi.h
ufs-hwmon.c scsi: ufs: core: Add temperature notification exception handling 2021-09-22 00:07:42 -04:00
ufs-mediatek-trace.h
ufs-mediatek.c scsi: ufs: mediatek: Avoid sched_clock() misuse 2021-10-20 23:09:58 -04:00
ufs-mediatek.h scsi: ufs: ufs-mediatek: Introduce default delay for reference clock 2021-10-18 22:38:35 -04:00
ufs-qcom-ice.c
ufs-qcom.c scsi: ufs: mediatek: Support vops pre suspend to disable auto-hibern8 2021-10-12 13:41:01 -04:00
ufs-qcom.h
ufs-sysfs.c scsi: ufs: core: Add lu_enable sysfs node 2021-08-05 23:21:13 -04:00
ufs-sysfs.h
ufs.h scsi: ufs: core: Probe for temperature notification support 2021-09-22 00:07:42 -04:00
ufs_bsg.c scsi: ufs: core: Enable power management for wlun 2021-05-10 22:28:20 -04:00
ufs_bsg.h
ufs_quirks.h scsi: ufs: core: Add L2P entry swap quirk for Micron UFS 2021-08-05 23:21:08 -04:00
ufshcd-crypto.c blk-crypto: rename blk_keyslot_manager to blk_crypto_profile 2021-10-21 10:49:32 -06:00
ufshcd-crypto.h blk-crypto: rename blk_keyslot_manager to blk_crypto_profile 2021-10-21 10:49:32 -06:00
ufshcd-dwc.c
ufshcd-dwc.h
ufshcd-pci.c scsi: ufs: ufs-pci: Force a full restore after suspend-to-disk 2021-10-18 23:19:44 -04:00
ufshcd-pltfrm.c scsi: ufs: ufshcd-pltfrm: Fix memory leak due to probe defer 2021-10-20 23:13:37 -04:00
ufshcd-pltfrm.h scsi: ufs: Reduce power management code duplication 2021-08-02 21:43:57 -04:00
ufshcd.c scsi: ufs: core: Fix another task management completion race 2021-11-16 19:42:32 -05:00
ufshcd.h SCSI misc on 20211112 2021-11-12 12:25:50 -08:00
ufshci-dwc.h
ufshci.h scsi: ufs: core: Micro-optimize ufshcd_map_sg() 2021-10-26 23:24:50 -04:00
ufshpb.c SCSI misc on 20211112 2021-11-12 12:25:50 -08:00
ufshpb.h scsi: ufs: ufshpb: Properly handle max-single-cmd 2021-11-03 21:51:56 -04:00
unipro.h