From patchwork Wed Sep 26 04:22:38 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: 10615263 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 BEACA3CF1 for ; Wed, 26 Sep 2018 04:23:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B23ED285CB for ; Wed, 26 Sep 2018 04:23:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6C3928668; Wed, 26 Sep 2018 04:23:24 +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 5EFD9285CB for ; Wed, 26 Sep 2018 04:23:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726593AbeIZKeU (ORCPT ); Wed, 26 Sep 2018 06:34:20 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:43308 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726520AbeIZKeT (ORCPT ); Wed, 26 Sep 2018 06:34:19 -0400 Received: by mail-qt1-f196.google.com with SMTP id l16-v6so15393501qtq.10 for ; Tue, 25 Sep 2018 21:23:22 -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=LqRL8dNwARUvs/LP09w4PZ2Y7NLe5A6pIZX8pDBAg9I=; b=XVyjO5aqFxjEwqurKzk5kBrar+HuxBtb9Z/44eBoxeoiTwAOYQya0N1gfr4C5hSnX5 gUyfLuC3HdHYpUUaGbrSJxokFI+vp5IsdnGmQwnryYm4QTHUozWCx8F1NvAmKqMABBFY /8C9vMclA1SccyNDl4RcIi8d0qgARq0DpjsH8= 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=LqRL8dNwARUvs/LP09w4PZ2Y7NLe5A6pIZX8pDBAg9I=; b=F0EeQih3bZZnsaGoeD4D902X15irmRNgkobfIvqMOHAOPoE74VIbsv3aI9qHBog4E+ 9tdr4KCfcAjzagnNfWsQjqTl49UPZW2ZCqYUGgSvKAP4aAeCZRLCxxRjRyVJXSh20YmA wjVjexvtnQSowYxcNnTcupahT7lfj/bEhJjM503Rin7sn4TwD20HuO1P0DdZgK3QyfZk 5ILkHcbqcmc7lGXhyCg1dfgEB1se918teOIuDWIE5Vk8NXrn/NuNX7ZyTuGoDwxpPq8Z CVUj0x6whT59JwW3TnPVBqE0HAPxxbMCVEDepwS5wkqh/u2QydDUwY1LjYfjmiJIRX0B hbZw== X-Gm-Message-State: ABuFfogAPJrwcpRk1djo3vVKlvC5S1ovuzYXyPDWBEvTykqAjJeWL84+ hGF8/MTU80EzXdI/xmJlmDqkJCf3L1M= X-Google-Smtp-Source: ACcGV60xUGZVJfbFIBcEIVULPhoedJixZ5VvHQuDnlQR6UZnMQ5faXrBG3agsv3C2wgOh1uZ1ukvuQ== X-Received: by 2002:a0c:e9ce:: with SMTP id q14-v6mr3044310qvo.144.1537935802043; Tue, 25 Sep 2018 21:23:22 -0700 (PDT) Received: from dhcp-10-123-74-106.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id a17-v6sm2375260qkb.62.2018.09.25.21.23.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Sep 2018 21:23:21 -0700 (PDT) From: Suganath Prabu S To: linux-scsi@vger.kernel.org, linux-pci@vger.kernel.org Cc: lukas@wunner.de, andy.shevchenko@gmail.com, Sathya.Prakash@broadcom.com, sreekanth.reddy@broadcom.com, Suganath Prabu S Subject: [PATCH v4 5/6] mpt3sas: Fix driver modifying NVRAM/persistent data. Date: Wed, 26 Sep 2018 09:52:38 +0530 Message-Id: <1537935759-14754-6-git-send-email-suganath-prabu.subramani@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1537935759-14754-1-git-send-email-suganath-prabu.subramani@broadcom.com> References: <1537935759-14754-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 S --- 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 9f1d8fb..a43579e 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -4122,7 +4122,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 5713a2d..f2a326a 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_config.c +++ b/drivers/scsi/mpt3sas/mpt3sas_config.c @@ -676,10 +676,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; }