stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Christoph Hellwig <hch@infradead.org>,
	"Guilherme G. Piccoli" <gpiccoli@linux.vnet.ibm.com>
Cc: aacraid@microsemi.com, linux-scsi@vger.kernel.org,
	RaghavaAditya.Renukunta@microsemi.com,
	david.carroll@microsemi.com, brking@linux.vnet.ibm.com,
	dougmill@linux.vnet.ibm.com, stable@vger.kernel.org
Subject: Re: [PATCH] scsi: aacraid: Add a small delay after IOP reset
Date: Tue, 19 Sep 2017 10:05:36 -0700	[thread overview]
Message-ID: <1505840736.2971.12.camel@HansenPartnership.com> (raw)
In-Reply-To: <20170919155222.GA24688@infradead.org>

On Tue, 2017-09-19 at 08:52 -0700, Christoph Hellwig wrote:
> On Tue, Sep 19, 2017 at 12:49:21PM -0300, Guilherme G. Piccoli wrote:
> > 
> > On 09/19/2017 12:37 PM, Christoph Hellwig wrote:
> > > 
> > > On Tue, Sep 19, 2017 at 12:11:55PM -0300, Guilherme G. Piccoli
> > > wrote:
> > > > 
> > > >  	src_writel(dev, MUnit.IDR, IOP_SRC_RESET_MASK);
> > > > +
> > > > +	msleep(5000);
> > > 
> > > src_writel is a writel, and thus a posted MMIO write.  You'll
> > > need
> > > to have to a read first to make it a reliable timing base.
> > > 
> > 
> > Just for my full understanding - you're saying a readl BEFORE
> > src_writel() or AFTER src_writel() ?
> 
> AFTER.

Actually, the whole problem sounds like a posted write.  Likely the
write that causes the reset doesn't get flushed until the read checking
if the reset has succeeded, which might explain the 100% initial
failure.  Why not throw away that first value if it's a failure and
then do your polled wait and timeout on the reset success.  We should
anyway be waiting some time for a reset to be issued, so even on non-
posted write systems we could see this problem intermittently.

James

  parent reply	other threads:[~2017-09-19 17:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19 15:11 [PATCH] scsi: aacraid: Add a small delay after IOP reset Guilherme G. Piccoli
2017-09-19 15:37 ` Christoph Hellwig
2017-09-19 15:49   ` Guilherme G. Piccoli
2017-09-19 15:52     ` Christoph Hellwig
2017-09-19 15:58       ` Guilherme G. Piccoli
2017-09-19 17:05       ` James Bottomley [this message]
2017-09-19 19:15         ` Guilherme G. Piccoli
2017-09-21 16:19 ` Dave Carroll
2017-09-25 21:09   ` Guilherme G. Piccoli
2017-09-25 21:34     ` Martin K. Petersen
2017-09-27 19:26       ` Dave Carroll
2017-09-28  1:42         ` Martin K. Petersen

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=1505840736.2971.12.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=RaghavaAditya.Renukunta@microsemi.com \
    --cc=aacraid@microsemi.com \
    --cc=brking@linux.vnet.ibm.com \
    --cc=david.carroll@microsemi.com \
    --cc=dougmill@linux.vnet.ibm.com \
    --cc=gpiccoli@linux.vnet.ibm.com \
    --cc=hch@infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=stable@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).