From: "Guilherme G. Piccoli" <gpiccoli@linux.vnet.ibm.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>,
Christoph Hellwig <hch@infradead.org>
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 16:15:32 -0300 [thread overview]
Message-ID: <68bec00d-cdc6-3e3e-3f01-fa7c22d29fa2@linux.vnet.ibm.com> (raw)
In-Reply-To: <1505840736.2971.12.camel@HansenPartnership.com>
On 09/19/2017 02:05 PM, James Bottomley wrote:
> 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
>
Thanks for this suggestion James.
I tried to remove the sleep and did a dummy read to register using
readl() - issue reproduced.
I did expect that, since in aac_is_ctrl_up_and_running() we indeed read
a register and if it shows us reset is not complete, we wait and read it
again. So, we can think in this 1st read as a dummy one heheh
My theory here is that we're observing a failure similar to one we
already did in some specific NVMe adapters - the readl before some delay
(in nvme it was 2s) corrupts the adapter FW procedure. It's as if the
adapter doesn't like to deal with this read while the reset procedure is
ongoing. So, we wait a bit to issue a readl and everything goes fine.
Cheers,
Guilherme
next prev parent reply other threads:[~2017-09-19 19:15 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
2017-09-19 19:15 ` Guilherme G. Piccoli [this message]
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=68bec00d-cdc6-3e3e-3f01-fa7c22d29fa2@linux.vnet.ibm.com \
--to=gpiccoli@linux.vnet.ibm.com \
--cc=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=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