From patchwork Wed Oct 17 06:37:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shivasharan Srikanteshwara X-Patchwork-Id: 10644655 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 C922F1508 for ; Wed, 17 Oct 2018 06:38:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA81A2999D for ; Wed, 17 Oct 2018 06:38:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AEDF529A95; Wed, 17 Oct 2018 06:38:36 +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 64E392999D for ; Wed, 17 Oct 2018 06:38:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727304AbeJQOcn (ORCPT ); Wed, 17 Oct 2018 10:32:43 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:33140 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727099AbeJQOcn (ORCPT ); Wed, 17 Oct 2018 10:32:43 -0400 Received: by mail-pg1-f196.google.com with SMTP id y18-v6so12047430pge.0 for ; Tue, 16 Oct 2018 23:38:35 -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=ot9buRE8ym1ABjYuM7xJ0SvVSH67LGwUJq4/PHqrveo=; b=SUE2SDl+U1LxgLxF9z2C0L4SSiJBuKa6LTFp1X4pgeAM2HD3VdVgZgPBxaOpN8U2XG qMGPT6R0tqcdQ/DdNWldcGJTND36KkHdJUWCOQSv9CdGk2NjQ1fYTtS2RY9v0FnGCH+m r2coqWYGeoJFcCxUYWvgaHdSD4X3fVAMMLjiU= 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=ot9buRE8ym1ABjYuM7xJ0SvVSH67LGwUJq4/PHqrveo=; b=NTt+kyLgL6HJviQ6dnf4V3K31HlMk2xmmnd20h44IUTh3Jl/JHdxQ31pnWlIbXD9XQ 5lY9G6dpLdb3GL3miZ8+ICiBk/vonl12pbY1RqB56o/9Hg3dFoo+bWix/22jgCqekojT h0o38KnA9uvczIkymauPyh1VEdytAgzBBt/8FHFEcwPJi2nBVCJi0x4T6TMKrTkwJesi GMLe7xDpRQh7vS+6aJ/K7H9RIVM40lWgIfN156Qx0EGvuGxm2v5vXyvzrObw8UNbtK67 KD/kjhOrx2MTzQdmu49HJ9YvheIqkIF0NnLbgD+KvBwoJsKrHbrkwVR6fVnlamnbU3rK Uqlw== X-Gm-Message-State: ABuFfogemLg00LZ8qIo4Moj3wgGekzwoQVheN967UU5t1g0i0OV/kPxf 43cuHDDP7EvEXOzWuiKh/V8LaoR4BuF8jw== X-Google-Smtp-Source: ACcGV60Jf0/H1AwltumQKd4FJVyXHwWJNz3gybEaVy4SoYpw4Oiz3lazfKWffKZwVzgJ2lx7zd/jkg== X-Received: by 2002:a62:8a91:: with SMTP id o17-v6mr25515083pfk.184.1539758314856; Tue, 16 Oct 2018 23:38:34 -0700 (PDT) Received: from dhcp-135-24-192-142.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id y131-v6sm19375425pfg.164.2018.10.16.23.38.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Oct 2018 23:38:33 -0700 (PDT) From: Shivasharan S To: linux-scsi@vger.kernel.org Cc: kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, Shivasharan S Subject: [PATCH V2 09/19] megaraid_sas: For SRIOV, do not set STOP_ADP bit Date: Tue, 16 Oct 2018 23:37:47 -0700 Message-Id: <1539758277-1882-10-git-send-email-shivasharan.srikanteshwara@broadcom.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1539758277-1882-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> References: <1539758277-1882-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 57899ff7ca0b..8a251d03be34 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 {