All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Don Brace <don.brace@microsemi.com>,
	jejb@linux.vnet.ibm.com, john.hall@microsemi.com,
	Kevin.Barnett@microsemi.com, Mahesh.Rajashekhara@microsemi.com,
	hch@infradead.org, scott.teel@microsemi.com,
	Viswas.G@microsemi.com, Justin.Lindley@microsemi.com,
	scott.benesh@microsemi.com, elliott@hpe.com, POSWALD@suse.com
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/4] hpsa: correct lockup detector pci_disable_device
Date: Thu, 27 Oct 2016 11:01:41 +0200	[thread overview]
Message-ID: <8a97e475-7ed5-d34b-3f5e-1cb60c6a0521@suse.de> (raw)
In-Reply-To: <147752050626.813.15549750881571218281.stgit@brunhilda>

On 10/27/2016 12:21 AM, Don Brace wrote:
> need to check if the device is already disabled first
> 
> Reviewed-by: Scott Benesh <scott.benesh@microsemi.com>
> Reviewed-by: Scott Teel <scott.teel@microsemi.com>
> Signed-off-by: Don Brace <don.brace@microsemi.com>
> ---
>  drivers/scsi/hpsa.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
> index d007ec1..798fb20 100644
> --- a/drivers/scsi/hpsa.c
> +++ b/drivers/scsi/hpsa.c
> @@ -8456,7 +8456,8 @@ static void controller_lockup_detected(struct ctlr_info *h)
>  	spin_unlock_irqrestore(&h->lock, flags);
>  	dev_warn(&h->pdev->dev, "Controller lockup detected: 0x%08x after %d\n",
>  			lockup_detected, h->heartbeat_sample_interval / HZ);
> -	pci_disable_device(h->pdev);
> +	if (pci_is_enabled(h->pdev))
> +		pci_disable_device(h->pdev);
>  	fail_all_outstanding_cmds(h);
>  }
>  
> 
Meh.
Why is pci_disable_device() not checking for it?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

  reply	other threads:[~2016-10-27  9:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26 22:21 [PATCH 0/4] hpsa updates Don Brace
2016-10-26 22:21 ` [PATCH 1/4] hpsa: correct lockup detector pci_disable_device Don Brace
2016-10-27  9:01   ` Hannes Reinecke [this message]
2016-10-27  9:25     ` Johannes Thumshirn
2016-10-27 15:19   ` Christoph Hellwig
2016-10-31 15:20     ` Don Brace
2016-10-26 22:21 ` [PATCH 2/4] hpsa: add generate controller NMI on lockup Don Brace
2016-10-27  9:02   ` Hannes Reinecke
2016-10-31 15:26     ` Don Brace
2016-11-11 16:09     ` Don Brace
2016-12-06 22:31       ` Don Brace
2016-10-26 22:21 ` [PATCH 3/4] hpsa: remove coalescing settings for ioaccel2 Don Brace
2016-10-27  9:03   ` Hannes Reinecke
2017-01-13 14:58     ` Don Brace
2017-01-16 20:50       ` Martin K. Petersen
2016-10-26 22:22 ` [PATCH 4/4] hpsa: bump driver version Don Brace
2016-10-27  9:03   ` Hannes Reinecke

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=8a97e475-7ed5-d34b-3f5e-1cb60c6a0521@suse.de \
    --to=hare@suse.de \
    --cc=Justin.Lindley@microsemi.com \
    --cc=Kevin.Barnett@microsemi.com \
    --cc=Mahesh.Rajashekhara@microsemi.com \
    --cc=POSWALD@suse.com \
    --cc=Viswas.G@microsemi.com \
    --cc=don.brace@microsemi.com \
    --cc=elliott@hpe.com \
    --cc=hch@infradead.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=john.hall@microsemi.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=scott.benesh@microsemi.com \
    --cc=scott.teel@microsemi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.