linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: "Martin K . Petersen" <martin.petersen@oracle.com>,
	Sagar Biradar <sagar.biradar@microchip.com>
Cc: Konstantin Khorenko <khorenko@virtuozzo.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Subject: [PATCH v3 1/1] scsi: aacraid: resurrect correct arc ctrl checks for Series-6
Date: Mon, 19 Aug 2019 19:35:46 +0300	[thread overview]
Message-ID: <20190819163546.915-2-khorenko@virtuozzo.com> (raw)
In-Reply-To: <20190819163546.915-1-khorenko@virtuozzo.com>

The patch introduces another wrapper similar to aac_is_src()
which avoids checking for Series 6 devices.

Use this new wrapper in order to revert original arc ctrl checks for
Series-6 controllers which were occasionally changed by commit
395e5df79a95 ("scsi: aacraid: Remove reference to Series-9")

The patch above not only drops Series-9 cards checks but also
changes logic for Series-6 controllers which lead to controller
hungs/resets under high io load.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1777586

Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 drivers/scsi/aacraid/aacraid.h  | 11 +++++++++++
 drivers/scsi/aacraid/comminit.c |  5 ++---
 drivers/scsi/aacraid/linit.c    |  2 +-
 3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index 3fa03230f6ba..ddfa78c05728 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -2740,6 +2740,17 @@ static inline int aac_is_src(struct aac_dev *dev)
 	return 0;
 }
 
+static inline int aac_is_srcv(struct aac_dev *dev)
+{
+	u16 device = dev->pdev->device;
+
+	if (device == PMC_DEVICE_S7 ||
+	    device == PMC_DEVICE_S8)
+		return 1;
+
+	return 0;
+}
+
 static inline int aac_supports_2T(struct aac_dev *dev)
 {
 	return (dev->adapter_info.options & AAC_OPT_NEW_COMM_64);
diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c
index d4fcfa1e54e0..1918e46ae3ec 100644
--- a/drivers/scsi/aacraid/comminit.c
+++ b/drivers/scsi/aacraid/comminit.c
@@ -349,8 +349,7 @@ int aac_send_shutdown(struct aac_dev * dev)
 	/* FIB should be freed only after getting the response from the F/W */
 	if (status != -ERESTARTSYS)
 		aac_fib_free(fibctx);
-	if (aac_is_src(dev) &&
-	     dev->msi_enabled)
+	if (aac_is_srcv(dev) && dev->msi_enabled)
 		aac_set_intx_mode(dev);
 	return status;
 }
@@ -605,7 +604,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev)
 		dev->max_fib_size = status[1] & 0xFFE0;
 		host->sg_tablesize = status[2] >> 16;
 		dev->sg_tablesize = status[2] & 0xFFFF;
-		if (aac_is_src(dev)) {
+		if (aac_is_srcv(dev)) {
 			if (host->can_queue > (status[3] >> 16) -
 					AAC_NUM_MGT_FIB)
 				host->can_queue = (status[3] >> 16) -
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 644f7f5c61a2..c8badc9d9ae7 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -1835,7 +1835,7 @@ static int aac_acquire_resources(struct aac_dev *dev)
 	aac_adapter_enable_int(dev);
 
 
-	if (aac_is_src(dev))
+	if (aac_is_srcv(dev))
 		aac_define_int_mode(dev);
 
 	if (dev->msi_enabled)
-- 
2.15.1


  reply	other threads:[~2019-08-19 16:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-27 16:14 [PATCH 0/1] aacraid: Host adapter Adaptec 6405 constantly resets under high io load Konstantin Khorenko
2019-06-27 16:14 ` [PATCH 1/1] scsi: aacraid: resurrect correct arc ctrl checks for Series-6 Konstantin Khorenko
2019-07-07 10:09   ` Andrey Jr. Melnikov
2019-07-07 23:49     ` Finn Thain
2019-07-10  9:24       ` Konstantin Khorenko
2019-07-10  9:31         ` [PATCH v2 0/2] aacraid: Host adapter Adaptec 6405 constantly resets under high io load Konstantin Khorenko
2019-07-10  9:31           ` [PATCH v2 1/2] Revert "scsi: aacraid: Remove reference to Series-9" Konstantin Khorenko
2019-07-10  9:31           ` [PATCH v2 2/2] scsi: aacraid: Remove references to Series-9 (only) Konstantin Khorenko
2019-07-12  1:30             ` Martin K. Petersen
2019-08-19 16:35               ` [PATCH v3 0/1] aacraid: Host adapter Adaptec 6405 constantly resets under high io load Konstantin Khorenko
2019-08-19 16:35                 ` Konstantin Khorenko [this message]
2019-08-29 21:52                 ` Martin K. Petersen
2021-05-06 22:22                 ` James Hilliard
     [not found]                   ` <ffdb2223-eed3-75b4-a003-4e4c96b49947@grossegger.com>
2022-02-23  2:41                     ` Martin K. Petersen
2022-10-10 12:31                       ` James Hilliard
2022-10-19 18:00                         ` Konstantin Khorenko
2022-10-26 20:10                           ` James Hilliard
     [not found]                             ` <BYAPR11MB36066925274C38555F20FB17FA339@BYAPR11MB3606.namprd11.prod.outlook.com>
2022-11-13 18:42                               ` James Hilliard
2022-11-15 14:05                                 ` Sagar.Biradar
2022-11-16 21:55                                   ` James Hilliard
2022-11-18  3:36                                     ` Sagar.Biradar
2022-12-03 23:55                                       ` James Hilliard
2022-12-06  5:59                                         ` Sagar.Biradar
2022-12-16 20:44                                           ` Sagar.Biradar
2022-12-20  1:12                                             ` James Hilliard
2022-12-20 19:44                                             ` Konstantin Khorenko

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=20190819163546.915-2-khorenko@virtuozzo.com \
    --to=khorenko@virtuozzo.com \
    --cc=aacraid@microsemi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sagar.biradar@microchip.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).