diff options
author | Andrew Halaney <ahalaney@redhat.com> | 2024-03-29 23:46:43 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2024-04-06 04:06:28 +0300 |
commit | c4d28e06b0c94636f6e35d003fa9ebac0a94e1ae (patch) | |
tree | 9d5adc96d63d9b111d0ad779ac85d61264b616d8 /drivers/ufs/host/tc-dwc-g210.c | |
parent | 4cece764965020c22cff7665b18a012006359095 (diff) | |
download | linux-c4d28e06b0c94636f6e35d003fa9ebac0a94e1ae.tar.xz |
scsi: ufs: qcom: Perform read back after writing reset bit
Currently, the reset bit for the UFS provided reset controller (used by its
phy) is written to, and then a mb() happens to try and ensure that hit the
device. Immediately afterwards a usleep_range() occurs.
mb() ensures that the write completes, 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. By doing so and
guaranteeing the ordering against the immediately following usleep_range(),
the mb() can safely be removed.
Fixes: 81c0fc51b7a7 ("ufs-qcom: add support for Qualcomm Technologies Inc platforms")
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Can Guo <quic_cang@quicinc.com>
Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
Link: https://lore.kernel.org/r/20240329-ufs-reset-ensure-effect-before-delay-v5-1-181252004586@redhat.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/ufs/host/tc-dwc-g210.c')
0 files changed, 0 insertions, 0 deletions