public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
To: jejb@linux.vnet.ibm.com, martin.petersen@oracle.com,
	linux-scsi@vger.kernel.org
Cc: David.Carroll@microsemi.com, Gana.Sridaran@microsemi.com,
	Scott.Benesh@microsemi.com, jthumshirn@suse.de,
	dan.carpenter@oracle.com
Subject: [PATCH V2 09/15] aacraid: Reload offlined drives after controller reset
Date: Thu, 16 Feb 2017 12:51:18 -0800	[thread overview]
Message-ID: <20170216205124.20271-10-RaghavaAditya.Renukunta@microsemi.com> (raw)
In-Reply-To: <20170216205124.20271-1-RaghavaAditya.Renukunta@microsemi.com>

During the IOP reset stress testing, it was found that the drives can be
marked offline when the adapter controller crashes and IO's are running
in parallel. When the controller  does come back from the reset, the drive
that is marked offline is not exposed.

Fixed by removing and adding drives that are marked offline. In addition
invoke a scsi host bus rescan to capture any additional configuration
changes.

Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Reviewed-by: David Carroll <David.Carroll@microsemi.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

---
Changes in V2:
None

 drivers/scsi/aacraid/commsup.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index eb4d8cf..1f716c0 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -1637,11 +1637,29 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type)
 		command->SCp.phase = AAC_OWNER_ERROR_HANDLER;
 		command->scsi_done(command);
 	}
+	/*
+	 * Any Device that was already marked offline needs to be cleaned up
+	 */
+	__shost_for_each_device(dev, host) {
+		if (!scsi_device_online(dev)) {
+			sdev_printk(KERN_INFO, dev, "Removing offline device\n");
+			scsi_remove_device(dev);
+			scsi_device_put(dev);
+		}
+	}
 	retval = 0;
 
 out:
 	aac->in_reset = 0;
 	scsi_unblock_requests(host);
+	/*
+	 * Issue bus rescan to catch any configuration that might have
+	 * occurred
+	 */
+	if (!retval) {
+		dev_info(&aac->pdev->dev, "Issuing bus rescan\n");
+		scsi_scan_host(host);
+	}
 	if (jafo) {
 		spin_lock_irq(host->host_lock);
 	}
-- 
2.7.4

  parent reply	other threads:[~2017-02-17  3:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16 20:51 [PATCH V2 00/15] aacraid: Fixes and enhancements for arc family Raghava Aditya Renukunta
2017-02-16 20:51 ` [PATCH V2 01/15] aacraid: Fix camel case Raghava Aditya Renukunta
2017-02-16 20:51 ` [PATCH V2 02/15] aacraid: Use correct channel number for raw srb Raghava Aditya Renukunta
2017-02-16 20:51 ` [PATCH V2 03/15] aacraid: Fix for excessive prints on EEH Raghava Aditya Renukunta
2017-02-17  8:21   ` Johannes Thumshirn
2017-02-16 20:51 ` [PATCH V2 04/15] aacraid: Prevent E3 lockup when deleting units Raghava Aditya Renukunta
2017-02-16 20:51 ` [PATCH V2 05/15] aacraid: Fix memory leak in fib init path Raghava Aditya Renukunta
2017-02-17  8:22   ` Johannes Thumshirn
2017-02-16 20:51 ` [PATCH V2 06/15] aacraid: Added sysfs for driver version Raghava Aditya Renukunta
2017-02-17  8:22   ` Johannes Thumshirn
2017-02-16 20:51 ` [PATCH V2 07/15] aacraid: Fix sync fibs time out on controller reset Raghava Aditya Renukunta
2017-02-16 20:51 ` [PATCH V2 08/15] aacraid: Skip wellness sync on controller failure Raghava Aditya Renukunta
2017-02-16 20:51 ` Raghava Aditya Renukunta [this message]
2017-02-16 20:51 ` [PATCH V2 10/15] aacraid: Decrease adapter health check interval Raghava Aditya Renukunta
2017-02-16 20:51 ` [PATCH V2 11/15] aacraid: Skip IOP reset on controller panic(SMART Family) Raghava Aditya Renukunta
2017-02-16 20:51 ` [PATCH V2 12/15] aacraid: Reorder Adapter status check Raghava Aditya Renukunta
2017-02-16 20:51 ` [PATCH V2 13/15] aacraid: Save adapter fib log before an IOP reset Raghava Aditya Renukunta
2017-02-16 20:51 ` [PATCH V2 14/15] aacraid: Fix a potential spinlock double unlock bug Raghava Aditya Renukunta
2017-02-16 20:51 ` [PATCH V2 15/15] aacraid: Update driver version Raghava Aditya Renukunta
2017-02-21  2:53 ` [PATCH V2 00/15] aacraid: Fixes and enhancements for arc family 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=20170216205124.20271-10-RaghavaAditya.Renukunta@microsemi.com \
    --to=raghavaaditya.renukunta@microsemi.com \
    --cc=David.Carroll@microsemi.com \
    --cc=Gana.Sridaran@microsemi.com \
    --cc=Scott.Benesh@microsemi.com \
    --cc=dan.carpenter@oracle.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=jthumshirn@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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