]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit12b6978a41e5553a63f517b0547d4dfa05793020
tree2392adf19b7f2740688d7152b69dc8cf52ab83cb
parentfe35a5270cff2bbce676cb717205f9483b981d26
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