lkml.org 
[lkml]   [2023]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH RFC v3 10/11] scsi: ufs: core: Perform read back to commit doorbell
    From
    On 12/21/23 11:09, Andrew Halaney wrote:
    > diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
    > index 75a03ee9a1ba..caebd589e08c 100644
    > --- a/drivers/ufs/core/ufshcd.c
    > +++ b/drivers/ufs/core/ufshcd.c
    > @@ -7050,7 +7050,7 @@ static int __ufshcd_issue_tm_cmd(struct ufs_hba *hba,
    >
    > ufshcd_writel(hba, 1 << task_tag, REG_UTP_TASK_REQ_DOOR_BELL);
    > /* Make sure that doorbell is committed immediately */
    > - wmb();
    > + ufshcd_readl(hba, REG_UTP_TASK_REQ_DOOR_BELL);
    >
    > spin_unlock_irqrestore(host->host_lock, flags);

    There is a wait_for_completion_io_timeout() call later in this function and
    it is safe to write to the REG_UTP_TASK_REQ_DOOR_BELL register from multiple
    threads concurrently so I think the above wmb() call can be left out entirely.

    Thanks,

    Bart.

    \
     
     \ /
      Last update: 2023-12-21 20:30    [W:7.287 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site