mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Faiz Abbas <faiz_abbas@ti.com>,
	linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org
Cc: ulf.hansson@linaro.org, asutoshd@codeaurora.org,
	riteshh@codeaurora.org, venkatg@codeaurora.org
Subject: Re: [RFC] mmc: cqhci: commit descriptors before setting the doorbell
Date: Tue, 15 Oct 2019 16:45:43 +0300	[thread overview]
Message-ID: <ca62cbaa-111c-4546-afd5-aad70eb98993@intel.com> (raw)
In-Reply-To: <fac9ad28-dbc3-3948-d99c-742420f3e651@ti.com>

On 15/10/19 10:55 AM, Faiz Abbas wrote:
> Hi,
> 
> On 15/10/19 12:08 AM, Faiz Abbas wrote:
>> Add a write memory barrier to make sure that descriptors are actually
>> written to memory before ringing the doorbell.
>>
>> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
>> ---
>>
>> This patch fixes a very infrequent ADMA error (1 out of 100 times) that
>> I have been seeing after enabling command queuing for J721e.
>> Also looking at memory-barriers.txt and this commit[1],
>> it looks like we should be doing this before any descriptor write
>> followed by a doorbell ring operation. It'll be nice if someone with more
>> expertise in memory barriers can comment.
>>
>> [1] ad1a1b9cd67a ("scsi: ufs: commit descriptors before setting the
>>     doorbell")
> 
> So I see that cqhci_readl/writel() use readl/writel_relaxed() which
> seems to be causing this issue. Should I just fix this by converting
> those to readl/writel with memory barriers instead?

Perhaps we could do both changes i.e. add wmb() and convert to non-relaxed
readl/writel

  reply	other threads:[~2019-10-15 13:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14 18:38 Faiz Abbas
2019-10-15  7:55 ` Faiz Abbas
2019-10-15 13:45   ` Adrian Hunter [this message]
2019-10-16 12:16     ` Faiz Abbas
2019-10-18  7:22       ` Faiz Abbas
2019-10-18  7:30         ` Adrian Hunter
2019-10-18 10:58 ` Ulf Hansson
2019-10-18 11:27   ` Faiz Abbas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca62cbaa-111c-4546-afd5-aad70eb98993@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=asutoshd@codeaurora.org \
    --cc=faiz_abbas@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=riteshh@codeaurora.org \
    --cc=ulf.hansson@linaro.org \
    --cc=venkatg@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®