From patchwork Thu Sep 20 11:04:09 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: 10607443 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 36AD5112B for ; Thu, 20 Sep 2018 11:04:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26A482CE9D for ; Thu, 20 Sep 2018 11:04:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1AECE2CF73; Thu, 20 Sep 2018 11:04:40 +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 BCC082CE9D for ; Thu, 20 Sep 2018 11:04:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732173AbeITQre (ORCPT ); Thu, 20 Sep 2018 12:47:34 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:35399 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731684AbeITQre (ORCPT ); Thu, 20 Sep 2018 12:47:34 -0400 Received: by mail-ed1-f67.google.com with SMTP id y20-v6so7511052edq.2 for ; Thu, 20 Sep 2018 04:04:38 -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=qx6Q88PX2VQIRh2uWr48NA4uAj6g1DI3jFo7hKfEgfE=; b=TjTuzCM2s1NUp9pan4aZT4xp9o89sViG8xL6tJZHbDYxCN6tARgEkc63dF3ajRcG3t GRShBdS6BbyGNJOQ+RExyheUrD5fu4Dy5AzX7c5735Qf8tXutGDhofltEuXZk81rmdEJ s3wv/SWnJuP8c1s7UbEZ7GSEk+TQyE4KmX4X4= 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=qx6Q88PX2VQIRh2uWr48NA4uAj6g1DI3jFo7hKfEgfE=; b=lpArYwZt7bXifMTk+qF9lwHIBtp8attPx5oEuYQRoWumhUK7fjtC6KRiGAYQteR6Ce IZdVTRjaYW3Mg4s8MnhjTuqWuE74fTgrz+zLH39FPwRpejufW6WxQgOyJ9gXoX8wqlFj 050f8U47y3/hfMq8FX+kgnbJK6rDZX1OBERYjdSSlDnDPyZnBU46dcxdEhCI60uJpTzT 4IWnoau89b4o8n9qFYVVHYNJzZ9Dux6QNek93VDG/x/F7r2KCLI9Vl3k+uzfwy7DTZGr 1DvYjxpFAcYmpLeGQ6NkB68M612rTWsCr2/lg0Wvt6Ts27Lys0NdtXfLzKpcZjxGmupT 6grw== X-Gm-Message-State: APzg51CwUd8JN9HsXbbx+wRTYEdVB/FCEDsTUUgo8H7c5dcVwz6VoAtK ZIoR08Gy58UNJDzPYlksE348LVGA1xQ= X-Google-Smtp-Source: ANB0VdY77/1uj1Zoy6q+A0TfbQmMj/UfbHvEpqw8jKKdnTMeatvFqe5EwD3goKie5HA0/nAQ9Ie1jw== X-Received: by 2002:aa7:d28c:: with SMTP id w12-v6mr3483415edq.113.1537441477263; Thu, 20 Sep 2018 04:04:37 -0700 (PDT) Received: from dhcp-10-123-74-106.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id s36-v6sm1232534edb.56.2018.09.20.04.04.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Sep 2018 04:04:36 -0700 (PDT) From: Suganath Prabu S To: linux-scsi@vger.kernel.org Cc: Sathya.Prakash@broadcom.com, sreekanth.reddy@broadcom.com, Suganath Prabu S Subject: [PATCH v2 5/6] mpt3sas: Fix driver modifying NVRAM/persistent data. Date: Thu, 20 Sep 2018 16:34:09 +0530 Message-Id: <1537441450-12434-6-git-send-email-suganath-prabu.subramani@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1537441450-12434-1-git-send-email-suganath-prabu.subramani@broadcom.com> References: <1537441450-12434-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 554de04..b221693 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -4125,7 +4125,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; }