From patchwork Wed Oct 17 05:59:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suganath Prabu S X-Patchwork-Id: 10644563 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 D088D17D4 for ; Wed, 17 Oct 2018 05:59:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1A2E2A2A5 for ; Wed, 17 Oct 2018 05:59:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3B2C2A4D3; Wed, 17 Oct 2018 05:59:49 +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=unavailable 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 669FE2A52B for ; Wed, 17 Oct 2018 05:59:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727265AbeJQNxf (ORCPT ); Wed, 17 Oct 2018 09:53:35 -0400 Received: from mail-yb1-f195.google.com ([209.85.219.195]:35531 "EHLO mail-yb1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727263AbeJQNxe (ORCPT ); Wed, 17 Oct 2018 09:53:34 -0400 Received: by mail-yb1-f195.google.com with SMTP id o63-v6so9887148yba.2 for ; Tue, 16 Oct 2018 22:59: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=PkfXlMZupblJe1vzCW6LkLbmNH7XcD5/rnzvalEdrPs=; b=C5hM8wTQfQ0iKNgAEtDRnTrUUgXgugDdBnjLKV5JC6viEbW1SfMbVzS9faAT+T2RhY TRXNTo7TiNHDgbFQ8UAvVrJkJVTzXOJ36bkk0u0iQU2P7BPjRaEK5oKp31NXY8GL1HWy o5nzH6OLMyYJg1cqHp7yIjslMrxPxwrIcFDH0= 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=PkfXlMZupblJe1vzCW6LkLbmNH7XcD5/rnzvalEdrPs=; b=i3aQVA9R0jMvlw69tfU9wN3aYgegTb1UrlVGHJefBQnfmZLRFA6NxaC3XGT2TvSQG6 RldFpLY596C9uTmcxwjeD4+8S0KSf8iifd2IC7fw7bqcXR4dYX+zZFUPcD+dEgsu5A78 qs0iBjWfv7uFcy1XDvaXY+ShyIfaElonCNEkMoUMSS2SWNotG7DugHrT1X+a7YiartpA iZBromJrEp4TaKoncqtTuiBUNo8cz3tup66WJczj+IRhlR3Erp9JGzRI1sO/J3Os7+kk OVzraOpg+/vqidJG4qtvURa0rur9qpyhUyO+vDwXI6YjqH6aIN5arJUCM+/okc0dmeiX k1kQ== X-Gm-Message-State: ABuFfojMrpKKbEUJL8AURV8XBUA3ua+EFGniSwDM9sCU1dSeJkUfH+8r FPrK2OiIeDVPrsfaaveaLLnNdA== X-Google-Smtp-Source: ACcGV62xhmptM5KLCZuaa7HJcBiE75CyMSXbGl754fV9kZvfIMxXN6oBBkPePrqHwwAjWNZnzBNdJg== X-Received: by 2002:a25:8745:: with SMTP id e5-v6mr5177694ybn.119.1539755975409; Tue, 16 Oct 2018 22:59:35 -0700 (PDT) Received: from dhcp-10-123-74-106.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id y1-v6sm3930329ywf.34.2018.10.16.22.59.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Oct 2018 22:59:34 -0700 (PDT) From: Suganath Prabu To: helgaas@kernel.org, lukas@wunner.de, linux-scsi@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: benh@kernel.crashing.org, ruscur@russell.cc, sbobroff@linux.ibm.com, oohall@gmail.com, andy.shevchenko@gmail.com, Sathya.Prakash@broadcom.com, sreekanth.reddy@broadcom.com, Suganath Prabu Subject: [v5 3/4] mpt3sas:Fix driver modifying persistent data. Date: Wed, 17 Oct 2018 11:29:06 +0530 Message-Id: <1539755947-27014-4-git-send-email-suganath-prabu.subramani@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1539755947-27014-1-git-send-email-suganath-prabu.subramani@broadcom.com> References: <1539755947-27014-1-git-send-email-suganath-prabu.subramani@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 * If EEDPTagMode field in manufacturing page11 is set, unset it. This is needed to fix a hardware bug in SAS3/SAS2 cards, So, skipping EEDPTagMode changes in Manufacturing page11 for SAS35 controllers. * Fix driver modifying NVRAM/persistent data in Manufacturing page11 along with current copy. Driver should change only current copy of Manufacturing page11. Signed-off-by: Suganath Prabu --- drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +- drivers/scsi/mpt3sas/mpt3sas_config.c | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index a6c217c..770f52b 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -4062,7 +4062,7 @@ _base_static_config_pages(struct MPT3SAS_ADAPTER *ioc) * flag unset in NVDATA. */ mpt3sas_config_get_manufacturing_pg11(ioc, &mpi_reply, &ioc->manu_pg11); - if (ioc->manu_pg11.EEDPTagMode == 0) { + if ((!ioc->is_gen35_ioc) && (ioc->manu_pg11.EEDPTagMode == 0)) { pr_err("%s: overriding NVDATA EEDPTagMode setting\n", ioc->name); ioc->manu_pg11.EEDPTagMode &= ~0x3; diff --git a/drivers/scsi/mpt3sas/mpt3sas_config.c b/drivers/scsi/mpt3sas/mpt3sas_config.c index 14a195c..aa41cb9 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_config.c +++ b/drivers/scsi/mpt3sas/mpt3sas_config.c @@ -660,10 +660,6 @@ mpt3sas_config_set_manufacturing_pg11(struct MPT3SAS_ADAPTER *ioc, r = _config_request(ioc, &mpi_request, mpi_reply, MPT3_CONFIG_PAGE_DEFAULT_TIMEOUT, config_page, sizeof(*config_page)); - mpi_request.Action = MPI2_CONFIG_ACTION_PAGE_WRITE_NVRAM; - r = _config_request(ioc, &mpi_request, mpi_reply, - MPT3_CONFIG_PAGE_DEFAULT_TIMEOUT, config_page, - sizeof(*config_page)); out: return r; }