linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Don Brace <don.brace@microsemi.com>
To: joseph.szczypek@hpe.com, gerry.morong@microsemi.com,
	john.hall@microsemi.com, jejb@linux.vnet.ibm.com,
	Kevin.Barnett@microsemi.com, Mahesh.Rajashekhara@microsemi.com,
	bader.alisaleh@microsemi.com, hch@infradead.org,
	scott.teel@microsemi.com, Viswas.G@microsemi.com,
	Justin.Lindley@microsemi.com, scott.benesh@microsemi.com,
	POSWALD@suse.com
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH 5/7] smartpqi: update kexec and power down support
Date: Thu, 10 Aug 2017 13:47:03 -0500	[thread overview]
Message-ID: <150239082347.23771.3123846290283011411.stgit@brunhilda> (raw)
In-Reply-To: <150239072706.23771.1380444570336852695.stgit@brunhilda>

From: Kevin Barnett <kevin.barnett@microsemi.com>

add PQI reset to driver shutdown callback to
work around controller bug.

During an 1.) OS shutdown or 2.) kexec outside of a kdump,
the Linux kernel will clear BME on our controller.

If BME is cleared during a controller/host PCIe transfer,
the controller will lock up.

So we perform a PQI reset in the driver's shutdown callback
function to eliminate the possibility of a controller/host
PCIe transfer being active when the kernel clears BME immediately
after calling the driver's shutdown callback.

Reviewed-by: Scott Benesh <scott.benesh@microsemi.com>
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
---
 drivers/scsi/smartpqi/smartpqi_init.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index 70b1f97..afd3eed 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -6700,6 +6700,7 @@ static void pqi_shutdown(struct pci_dev *pci_dev)
 	 * storage.
 	 */
 	rc = pqi_flush_cache(ctrl_info, SHUTDOWN);
+	pqi_reset(ctrl_info);
 	if (rc == 0)
 		return;
 

  parent reply	other threads:[~2017-08-10 18:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10 18:46 [PATCH 0/7] smartpqi updates Don Brace
2017-08-10 18:46 ` [PATCH 1/7] smartpqi: add pqi reset quiesce support Don Brace
2017-08-17  3:44   ` James Bottomley
2017-08-17 15:15     ` Don Brace
2017-08-10 18:46 ` [PATCH 2/7] smartpqi: enhance BMIC cache flush Don Brace
2017-08-10 18:46 ` [PATCH 3/7] smartpqi: update pqi passthru ioctl Don Brace
2017-08-10 18:46 ` [PATCH 4/7] smartpqi: cleanup doorbell register usage Don Brace
2017-08-10 18:47 ` Don Brace [this message]
2017-08-10 18:47 ` [PATCH 6/7] smartpqi: add in new controller ids Don Brace
2017-08-10 18:47 ` [PATCH 7/7] smartpqi: change driver version to 1.1.2-125 Don Brace
2017-08-11  0:00 ` [PATCH 0/7] smartpqi updates 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=150239082347.23771.3123846290283011411.stgit@brunhilda \
    --to=don.brace@microsemi.com \
    --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=bader.alisaleh@microsemi.com \
    --cc=gerry.morong@microsemi.com \
    --cc=hch@infradead.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=john.hall@microsemi.com \
    --cc=joseph.szczypek@hpe.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 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).