From patchwork Fri Oct 12 10:57:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shivasharan Srikanteshwara X-Patchwork-Id: 10638497 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5F9D0933 for ; Fri, 12 Oct 2018 10:58:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F21A2B478 for ; Fri, 12 Oct 2018 10:58:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41AF92B480; Fri, 12 Oct 2018 10:58:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED5A52B478 for ; Fri, 12 Oct 2018 10:58:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728157AbeJLSaS (ORCPT ); Fri, 12 Oct 2018 14:30:18 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:45935 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727652AbeJLSaS (ORCPT ); Fri, 12 Oct 2018 14:30:18 -0400 Received: by mail-ed1-f65.google.com with SMTP id v18-v6so11074170edq.12 for ; Fri, 12 Oct 2018 03:58:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yrSkOKHYHT/0+Mrw/tqFPYrhzbO+OrHdesdw5W9tp9M=; b=SS1WW2wC13+GGaS3k7Z1AAFg8aou5QT6ntu+HTiORKMrR5Q5CEPt28zgsBcsHOjkZE 9mK6YNcqToC5lZlVzPpMfR17NiLKEt6b8dJO1ZQqQnN+3jAJMqIeqio2MfVWqXoVXaVX N+OMTVXdXG6fxEEJhUsWetoWJvYzkppqSvzYw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=yrSkOKHYHT/0+Mrw/tqFPYrhzbO+OrHdesdw5W9tp9M=; b=HPn9h9p+ieEVchikqA04zU3TUJPsvOJ7MLvFp6u+Vr1bOXtiecrQvPMMvR5Esvadye lh5R3rDcS23SM8dbTeBP5JR17EWOnjd/h/zGbJsakXxePyR3FIEWbrar7IAxZGEAtLRw iB3n2zFDEVFweafTrLZXW+G+AcE6chhHolIhtly09G4Y1bjclumGaQebxJjqDqZN7Hc2 t3KtpU3pD2dSK4v3W6I41fGhVBvhHLxMjCSp13FYCyEiaQPaNdjylyuAYDZNJLXEPCk3 Jux1bXcL0iAERhs8t484a4SwzXcTabsyDrdKCBhy9E5jFUBj0opsTA4PcsllAcJBb3oL MFKQ== X-Gm-Message-State: ABuFfohldk4DW1Zr1ICoH+3CotEK1To06PZ54V3e1ezpronchykmz/gG m4+C6oQyzmYzpUiZH+MZlWWtSxwOjfQesg== X-Google-Smtp-Source: ACcGV619xmxnyVg4WBeX1i5+0WZYm+AfQ9b5rX4skQIHHhxaZdxqspr3dX6qLE9H3CZzXwJMekLklg== X-Received: by 2002:a50:8d86:: with SMTP id r6-v6mr7845128edh.125.1539341904209; Fri, 12 Oct 2018 03:58:24 -0700 (PDT) Received: from dhcp-135-24-192-142.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id m25-v6sm451198edc.86.2018.10.12.03.58.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Oct 2018 03:58:23 -0700 (PDT) From: Shivasharan S To: linux-scsi@vger.kernel.org Cc: kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, Shivasharan S Subject: [PATCH 09/19] megaraid_sas: For SRIOV, do not set STOP_ADP bit Date: Fri, 12 Oct 2018 03:57:23 -0700 Message-Id: <1539341853-26814-10-git-send-email-shivasharan.srikanteshwara@broadcom.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1539341853-26814-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> References: <1539341853-26814-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix - For SRIOV based adapters, driver should not set the STOP_ADP bit as part of kill adapter. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 93d7ce8b3657..8de845f675b4 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -2076,9 +2076,11 @@ void megaraid_sas_kill_hba(struct megasas_instance *instance) if ((instance->pdev->device == PCI_DEVICE_ID_LSI_SAS0073SKINNY) || (instance->pdev->device == PCI_DEVICE_ID_LSI_SAS0071SKINNY) || (instance->adapter_type != MFI_SERIES)) { - writel(MFI_STOP_ADP, &instance->reg_set->doorbell); - /* Flush */ - readl(&instance->reg_set->doorbell); + if (!instance->requestorId) { + writel(MFI_STOP_ADP, &instance->reg_set->doorbell); + /* Flush */ + readl(&instance->reg_set->doorbell); + } if (instance->requestorId && instance->peerIsPresent) memset(instance->ld_ids, 0xff, MEGASAS_MAX_LD_IDS); } else {