Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp267477imm; Tue, 16 Oct 2018 23:01:07 -0700 (PDT) X-Google-Smtp-Source: ACcGV61g1nAb3HQqTvYJKDyI/oa5TBoLleFhSFG//TtWA/SjB0CyCHUJ3zL0s4xHz3MIC7Z1C/70 X-Received: by 2002:a17:902:263:: with SMTP id 90-v6mr24457275plc.190.1539756067452; Tue, 16 Oct 2018 23:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539756067; cv=none; d=google.com; s=arc-20160816; b=KmSg+tRI6gkGcUKSytXX6bvSKJlZNaG/5eNAudBqRSEIFzodaLLnHJR/cM0OGEhITd y+Q2kk9IYgCLj4GbNmDRBuMZsX8vXicRV2LT8CjkZ02ZA+Wj8ZXCoVF3NWW8ctDmeoVy pJOTZDyfDOp9SeOf0GZgiaJ4LBkP5zL4uK4SJoS/GzSm+vWLcJDYEO37pHowtfnkXFLU b0fDcTCdotKY6NEWVty1nsIGtj6+I8s74ojlvq5uPdh3HM9to0MD35kHnem/Etz4x0k7 SUg1AOOOQt6I1T5d6gHaOZRbacE6/vsRL9bGVxrrjXsvqzC47ifzBis81zPO3O2Ydvzu jetA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=PkfXlMZupblJe1vzCW6LkLbmNH7XcD5/rnzvalEdrPs=; b=lxKkMkSZFIMlK7DdukAIldW44TBsz5Xc9uuFCiO3zfZ9c8746hjqwf87XcJPQ6Nwit YqPXV6SXqWpu+1UQ2p1v25P+9EW9isNsjwZfu8uQJlhMp3kYZnL8JKm538tcZxPh2KuC 7kMuPg0rXwl7aLKFlFtctT0hjm2nQo41rBrFachOFO8PzcJNvtTT+ZgFeghZ1ruc4+ys aBmLuh50YQxwRF1RhXf9kdx6YLhWR79SN0bRv0iPMgc+R/vFdGEs570c+rvdPMfHc5yd Sft8qLbltiERA2JKWXwPZgNyo/s+SPZy0SgPS1LT1RjDyJm02d1eTHFfGy0HSpG2PP8E c6qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=C5hM8wTQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f65-v6si17071795pff.276.2018.10.16.23.00.18; Tue, 16 Oct 2018 23:01:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=C5hM8wTQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727280AbeJQNxf (ORCPT + 99 others); Wed, 17 Oct 2018 09:53:35 -0400 Received: from mail-yb1-f194.google.com ([209.85.219.194]:46371 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727193AbeJQNxe (ORCPT ); Wed, 17 Oct 2018 09:53:34 -0400 Received: by mail-yb1-f194.google.com with SMTP id o8-v6so9877632ybk.13 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=MHymyi0YTlMIxw6T2wXBEl9HRCj3y1nJECnx5FadaCFZ4AIV7DcIpwKiJIpFQtj+8X PPHdW5CyQdnaFYfkE1F+9gYqk+9MOTiCnQDJ/g60RToAoB3qK+gNtpnOLHDmxNYsXKik 0mc5fbhXIkkPzqGu/q5UOnWuJbzeR/yJTmcwEGJN6k29x8vIPYjTMKW0wwhbytRqFlpN tMzSRIqsWkQf48ffaQLjE8y/g+pLvkz6ImzNzntceMs3b3BrQFw5W8AxYizenOX1VFN2 wsZ5CGAnrg1aXSZfg6q32b4GoqoEhN5uWCd7ITSijD3A1mElYn5FhUfRtX5I/Br1B2EM P8VQ== X-Gm-Message-State: ABuFfoiVEbh1AlZMG65PLTgL14Bk7SHQ7N0/zbQnzWGBeu20aC4l0Eo0 V8W87MHf3NmgO4SUQzqvOSMz8gjIJD4= 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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; } -- 1.8.3.1