scsi: ufs: Remove locking from around single register writes
authorBart Van Assche <bvanassche@acm.org>
Tue, 19 Apr 2022 22:58:03 +0000 (15:58 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 26 Apr 2022 03:23:03 +0000 (23:23 -0400)
commit3fb20fcd93fe5a1580355f1ea73f6daed1712f06
tree2392adf19b7f2740688d7152b69dc8cf52ab83cb
parent21c2e3418d07955c7b87fc3f75688cb1c2b04a32
scsi: ufs: Remove locking from around single register writes

Single register writes are atomic and hence do not need to be surrounded by
locking. Additionally, MMIO writes are typically posted asynchronously.
Hence, there is no guarantee that these have finished by the time the
spin_unlock*() call has finished. See also the nonposted-mmio property of
the Open Firmware tree. See also pci_iomap().

Link: https://lore.kernel.org/r/20220419225811.4127248-21-bvanassche@acm.org
Tested-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufs-mediatek.c
drivers/scsi/ufs/ufshcd.c