提交 e3dfdc53 编写于 作者: Y Yaniv Gardi 提交者: Martin K. Petersen

scsi: ufs: commit descriptors before setting the doorbell

Add a write memory barrier to make sure descriptors prepared are
actually written to memory before ringing the doorbell. We have also
added the write memory barrier after ringing the doorbell register so
that controller sees the new request immediately.
Reviewed-by: NDolev Raviv <draviv@codeaurora.org>
Signed-off-by: NGilad Broner <gbroner@codeaurora.org>
Signed-off-by: NSubhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 897efe62
......@@ -1625,6 +1625,8 @@ static int ufshcd_exec_dev_cmd(struct ufs_hba *hba,
hba->dev_cmd.complete = &wait;
/* Make sure descriptors are ready before ringing the doorbell */
wmb();
spin_lock_irqsave(hba->host->host_lock, flags);
ufshcd_send_command(hba, tag);
spin_unlock_irqrestore(hba->host->host_lock, flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册