Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2940678ybl; Mon, 19 Aug 2019 09:38:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrkxd4o+U5Thi8Iiz+66QCMH/QjA19cNR4ZucAlxySvxv6CObHqE03wO1Ynhr9pm8jLy/5 X-Received: by 2002:a17:902:7441:: with SMTP id e1mr23325222plt.37.1566232695817; Mon, 19 Aug 2019 09:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566232695; cv=none; d=google.com; s=arc-20160816; b=LgZqKEIViA99gUV7F8ean9WMR49xnZfycbjmJhISBd4wy7a4nMdPb5GnjZ7dyNvwvs jnd6YFR+GNdgHfqiCX0a0IeuKcyP/vHU73WZW7oIAiC8wRv52P1PLkbT3tsWT6vgZqxP Ja3yINHrQEw+5lw49ttxIWj24yfJv3F6lSpHPIcsOoyyd0iGj9suYnXGtV6WEcUUMnsU y2LyyjEJtbk47yulAOu5kWhfLiAlQNugoOcDqGjZ1FQltnxgutgbQZ/dwg2uZ/PO1eQY FXah7XvkDbIbuR0CNTRDpR+fkLrvFNstWVU7zjYErTMOAU0mlHfUZVehfEIiYCVMjbSd v7oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=ictzo93my4h/TMva9gzFdxY15Oa+sdcub33ArNAgt18=; b=A9005ltEHFnBSZuz7fBhSgfx09ti61ukAxTccO6iTVcyEVLk/oolvG1kIz3PGMy9Sm wbS+rfhMVeE3gKgUh/w/AOE/vxCdLwP/9x+5PvxBHl3DMXwb8wmBoUGeBi7Quo/Y1NiC aDxh4oDGsXXA0hIzyi0W6kL7x2AcekmE3Z2gqi3Q15B+3oGjzSekfF+Yf7JUE2LNUMwD ZNsyqzMos8hSxyXvSvWm1jfNgUSDGYotyORIlhb9HHOOHIeB95xgMRydOIOdNAaW9ayQ Aa1dV7prjXKjMIGrgaALvvDRJ7zUnG9Csrp+0qSHkxZrQgq8weT1APM33dyo3s7OlNdp 4UVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p13si10156579plo.267.2019.08.19.09.37.59; Mon, 19 Aug 2019 09:38:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727971AbfHSQf7 (ORCPT + 99 others); Mon, 19 Aug 2019 12:35:59 -0400 Received: from relay.sw.ru ([185.231.240.75]:35498 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727540AbfHSQf6 (ORCPT ); Mon, 19 Aug 2019 12:35:58 -0400 Received: from [10.94.4.83] (helo=finist-ce7.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hzkdH-0001ug-Co; Mon, 19 Aug 2019 19:35:47 +0300 From: Konstantin Khorenko To: "Martin K . Petersen" , Sagar Biradar Cc: Konstantin Khorenko , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Adaptec OEM Raid Solutions Subject: [PATCH v3 1/1] scsi: aacraid: resurrect correct arc ctrl checks for Series-6 Date: Mon, 19 Aug 2019 19:35:46 +0300 Message-Id: <20190819163546.915-2-khorenko@virtuozzo.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20190819163546.915-1-khorenko@virtuozzo.com> References: <20190819163546.915-1-khorenko@virtuozzo.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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