linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Lawrence <joe.lawrence@stratus.com>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: linux-scsi@vger.kernel.org,
	Nagalakshmi Nandigama <nagalakshmi.nandigama@avagotech.com>,
	Praveen Krishnamoorthy <praveen.krishnamoorthy@avagotech.com>,
	Sreekanth Reddy <sreekanth.reddy@avagotech.com>,
	Abhijit Mahajan <abhijit.mahajan@avagotech.com>,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH 0/2] mpt2sas,mpt3sas - PCI master abort fixups
Date: Mon, 13 Apr 2015 10:06:15 -0400	[thread overview]
Message-ID: <552BCD57.6090509@stratus.com> (raw)
In-Reply-To: <1428886445.2196.43.camel@HansenPartnership.com>

On 04/12/2015 08:54 PM, James Bottomley wrote:
> On Sun, 2015-04-12 at 20:11 -0400, Joe Lawrence wrote:
>> On 12/30/2014 09:07 AM, Joe Lawrence wrote:
>>> A colleague noticed that the mpt2 and mpt3sas drivers do not correctly
>>> check the PCI master abort pattern in _base_wait_for_doorbell_ack.  This
>>> pattern should be checked *prior* to any valid bit patterns, which would
>>> always return true since a PCI read on master abort sets all bits high.
>>>
>>> The second patch adds similar checking to _base_wait_for_doorbell_int and
>>> _base_wait_for_doorbell_not_used to avoid potentially long loops around
>>> PCI reads.
>>>
>>> Joe Lawrence (2):
>>>   mpt2sas,mpt3sas: correct master-abort checking in doorbell ack
>>>   mpt2sas,mpt3sas: additional master abort checks
>>>
>>>  drivers/scsi/mpt2sas/mpt2sas_base.c |   17 ++++++++++++-----
>>>  drivers/scsi/mpt3sas/mpt3sas_base.c |   17 ++++++++++++-----
>>>  2 files changed, 24 insertions(+), 10 deletions(-)
>>>
>>
>> Avago ping?
>>
>> This one was pretty straightforward: check 0xFFFFFFFF *before* any
>> individual bit(s), i.e. before reading the doorbell register.
> 
> OK, Joe, explain why this patch is important: what problems could result
> from it not being present?  If you convince everyone then no more mpt2/3
> sas patches until this is at least commented on and a plan of action
> proposed.

Hi James,

As currently coded:  If the PCI read returns a master abort,
_base_wait_for_doorbell_ack will loop until it exhausts its timeout (up
to 15 seconds).  Other parts of the driver, like the periodic watchdog
or EEH, may detect a similar problem before such a long time and cleanup
the mess.  However, complete device removal may be stalled until whoever
called _base_wait_for_doorbell_ack is satisfied that it has finished.

This behavior is not really a bug, but feels like one in the making.
Should additional code be introduced, copy/pasted, etc. it may not do
what was intended.

For future reference, would a repost have been more appropriate?  This
changeset was so small that I figured a status ping would have sufficed.

Regards,

-- Joe

  reply	other threads:[~2015-04-13 14:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-30 14:07 [PATCH 0/2] mpt2sas,mpt3sas - PCI master abort fixups Joe Lawrence
2014-12-30 14:07 ` [PATCH 1/2] mpt2sas,mpt3sas: correct master-abort checking in doorbell ack Joe Lawrence
2014-12-30 14:07 ` [PATCH 2/2] mpt2sas,mpt3sas: additional master abort checks Joe Lawrence
2015-04-13  0:11 ` [PATCH 0/2] mpt2sas,mpt3sas - PCI master abort fixups Joe Lawrence
2015-04-13  0:54   ` James Bottomley
2015-04-13 14:06     ` Joe Lawrence [this message]
2015-04-13 14:38       ` James Bottomley
2015-04-13 15:44         ` Joe Lawrence

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=552BCD57.6090509@stratus.com \
    --to=joe.lawrence@stratus.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=abhijit.mahajan@avagotech.com \
    --cc=hch@infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nagalakshmi.nandigama@avagotech.com \
    --cc=praveen.krishnamoorthy@avagotech.com \
    --cc=sreekanth.reddy@avagotech.com \
    /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).