scsi: ufs: add missing memory barriers
authorYaniv Gardi <ygardi@codeaurora.org>
Mon, 1 Feb 2016 13:02:48 +0000 (15:02 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Feb 2016 02:27:02 +0000 (21:27 -0500)
commit897efe628d7e0da76c7b20833a7efbd6a4f082d6
treef022ce3d4ff8ea18f1844989602a2ed12f3f7e76
parentd75f7fe495cf57501c83b8ea5d0d799d2c2ff841
scsi: ufs: add missing memory barriers

Performing several writes to UFS host controller registers has no
guarantee of ordering, so we must make sure register writes to setup
request list base address etc. are performed before the run/stop
register is enabled.  In addition, when setting up a task request, we
must make sure the updating of descriptors takes places before ringing
the doorbell, similarly to setting up a transfer request.

Reviewed-by: Dolev Raviv <draviv@codeaurora.org>
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c