WSL2-Linux-Kernel/drivers/scsi/ufs
Andrew Halaney f98c6fd4ec scsi: ufs: core: Perform read back after disabling UIC_COMMAND_COMPL
[ Upstream commit 4bf3855497b60765ca03b983d064b25e99b97657 ]

Currently, the UIC_COMMAND_COMPL interrupt is disabled and a wmb() is used
to complete the register write before any following writes.

wmb() ensures the writes complete in that order, but completion doesn't
mean that it isn't stored in a buffer somewhere. The recommendation for
ensuring this bit has taken effect on the device is to perform a read back
to force it to make it all the way to the device. This is documented in
device-io.rst and a talk by Will Deacon on this can be seen over here:

    https://youtu.be/i6DayghhA8Q?si=MiyxB5cKJXSaoc01&t=1678

Let's do that to ensure the bit hits the device. Because the wmb()'s
purpose wasn't to add extra ordering (on top of the ordering guaranteed by
writel()/readl()), it can safely be removed.

Fixes: d75f7fe495 ("scsi: ufs: reduce the interrupts for power mode change requests")
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Can Guo <quic_cang@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
Link: https://lore.kernel.org/r/20240329-ufs-reset-ensure-effect-before-delay-v5-9-181252004586@redhat.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-16 13:39:19 +02:00
..
Kconfig
Makefile
cdns-pltfrm.c scsi: ufs: cdns-pltfrm: Perform read back after writing HCLKDIV 2024-06-16 13:39:19 +02:00
tc-dwc-g210-pci.c
tc-dwc-g210-pltfrm.c
tc-dwc-g210.c
tc-dwc-g210.h
ti-j721e-ufs.c
ufs-debugfs.c
ufs-debugfs.h
ufs-exynos.c
ufs-exynos.h
ufs-fault-injection.c
ufs-fault-injection.h
ufs-hisi.c
ufs-hisi.h
ufs-mediatek-trace.h
ufs-mediatek.c
ufs-mediatek.h
ufs-qcom-ice.c
ufs-qcom.c scsi: ufs: qcom: Perform read back after writing CGC enable 2024-06-16 13:39:19 +02:00
ufs-qcom.h scsi: ufs: ufs-qcom: Clear qunipro_g4_sel for HW version major 5 2024-06-16 13:39:19 +02:00
ufs-sysfs.c
ufs-sysfs.h
ufs.h
ufs_bsg.c
ufs_bsg.h
ufs_quirks.h
ufshcd-crypto.c
ufshcd-crypto.h
ufshcd-dwc.c
ufshcd-dwc.h
ufshcd-pci.c
ufshcd-pltfrm.c
ufshcd-pltfrm.h
ufshcd.c scsi: ufs: core: Perform read back after disabling UIC_COMMAND_COMPL 2024-06-16 13:39:19 +02:00
ufshcd.h
ufshci-dwc.h
ufshci.h
ufshpb.c
ufshpb.h
unipro.h