All of lore.kernel.org
 help / color / mirror / Atom feed
From: <balsundar.p@microsemi.com>
To: <linux-scsi@vger.kernel.org>, <jejb@linux.vnet.ibm.com>
Cc: <aacraid@microsemi.com>
Subject: [PATCH 3/7] scsi: aacraid: fixed firmware assert issue
Date: Tue, 15 Oct 2019 11:52:00 +0530	[thread overview]
Message-ID: <1571120524-6037-4-git-send-email-balsundar.p@microsemi.com> (raw)
In-Reply-To: <1571120524-6037-1-git-send-email-balsundar.p@microsemi.com>

From: Balsundar P <balsundar.p@microsemi.com>

Before issuing IOP reset, INTX mode is selected. This is triggering
MSGU lockup and ended in basecode assert. Use DROP_IO command when
IOP reset is sent in preparation for interrupt mode switch

Signed-off-by: Balsundar P <balsundar.p@microsemi.com>
---
 drivers/scsi/aacraid/aacraid.h  |  1 +
 drivers/scsi/aacraid/comminit.c |  5 +++++
 drivers/scsi/aacraid/src.c      | 10 ++++++++++
 3 files changed, 16 insertions(+)

diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index 3fa03230f6ba..3fdd4583cbb5 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -1673,6 +1673,7 @@ struct aac_dev
 	u8			adapter_shutdown;
 	u32			handle_pci_error;
 	bool			init_reset;
+	u8			soft_reset_support;
 };
 
 #define aac_adapter_interrupt(dev) \
diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c
index d4fcfa1e54e0..f75878d773cf 100644
--- a/drivers/scsi/aacraid/comminit.c
+++ b/drivers/scsi/aacraid/comminit.c
@@ -571,6 +571,11 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev)
 		else
 			dev->sa_firmware = 0;
 
+		if (status[4] & le32_to_cpu(AAC_EXTOPT_SOFT_RESET))
+			dev->soft_reset_support = 1;
+		else
+			dev->soft_reset_support = 0;
+
 		if ((dev->comm_interface == AAC_COMM_MESSAGE) &&
 		    (status[2] > dev->base_size)) {
 			aac_adapter_ioremap(dev, 0);
diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c
index 3b66e06726c8..787ec9baebb0 100644
--- a/drivers/scsi/aacraid/src.c
+++ b/drivers/scsi/aacraid/src.c
@@ -733,10 +733,20 @@ static bool aac_is_ctrl_up_and_running(struct aac_dev *dev)
 	return ctrl_up;
 }
 
+static void aac_src_drop_io(struct aac_dev *dev)
+{
+	if (!dev->soft_reset_support)
+		return;
+
+	aac_adapter_sync_cmd(dev, DROP_IO,
+			0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL);
+}
+
 static void aac_notify_fw_of_iop_reset(struct aac_dev *dev)
 {
 	aac_adapter_sync_cmd(dev, IOP_RESET_ALWAYS, 0, 0, 0, 0, 0, 0, NULL,
 						NULL, NULL, NULL, NULL);
+	aac_src_drop_io(dev);
 }
 
 static void aac_send_iop_reset(struct aac_dev *dev)
-- 
2.18.1


  parent reply	other threads:[~2019-10-15  6:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15  6:21 [PATCH 0/7] scsi: aacraid updates balsundar.p
2019-10-15  6:21 ` [PATCH 1/7] scsi: aacraid: fix illegal IO beyond last LBA balsundar.p
2019-10-15  6:21 ` [PATCH 2/7] scsi: aacraid: fixed IO reporting error balsundar.p
2019-10-15  6:22 ` balsundar.p [this message]
2019-10-15  6:22 ` [PATCH 4/7] scsi: aacraid: setting different timeout for src and thor balsundar.p
2019-10-15  6:22 ` [PATCH 5/7] scsi: aacraid: check adapter health balsundar.p
2019-10-15  6:22 ` [PATCH 6/7] scsi: aacraid: send AIF request post IOP RESET balsundar.p
2019-10-15 18:58   ` kbuild test robot
2019-10-15 18:58     ` kbuild test robot
2019-10-15 18:58   ` [RFC PATCH] scsi: aacraid: aac_schedule_bus_scan() can be static kbuild test robot
2019-10-15 18:58     ` kbuild test robot
2019-10-18  7:26     ` Balsundar.P
2019-10-18  7:26       ` Balsundar.P
2019-10-15  6:22 ` [PATCH 7/7] scsi: aacraid: bump version balsundar.p
2019-10-18 23:35 ` [PATCH 0/7] scsi: aacraid 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=1571120524-6037-4-git-send-email-balsundar.p@microsemi.com \
    --to=balsundar.p@microsemi.com \
    --cc=aacraid@microsemi.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-scsi@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 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.