Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3278064ima; Tue, 23 Oct 2018 03:23:59 -0700 (PDT) X-Google-Smtp-Source: ACcGV60f3UhsOkvO4CRmIRW+6lYGmSiVsmlRzdLPL8errQ/fpK/MH2U3PGzp/XkwFK1+aH8435zO X-Received: by 2002:a17:902:59d2:: with SMTP id d18-v6mr16028771plj.116.1540290239787; Tue, 23 Oct 2018 03:23:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540290239; cv=none; d=google.com; s=arc-20160816; b=SBM4nZ5dOIRfk1JqOP/AWhIcrN5qGTwf64VmexNLoANuQRHM+AO+LbwH5ervpHxeBX hJopMu+s8rWeNNdkll2+EXZeMm93HT+mdToZHLySFFz22a4+DOKP6vpcSd7gMPxcvJkE banJ+Nc9jKe5lVZk6vL/lRQARPQmzDPTW5hQ86OjocOagVbj2BqfWIvnerm699V3qEDZ NOVWoeyEqtuHU/vJBFY/4h8VPt9qkbO2Ac9QYQLbyo2It2WMDCcmdKgFDkDNmPkelyom wiJH5/Ihu6XawOmPB7nc+EcIBrGvLYdgwHwD7QWAeKZw+7hCeLNVFwCu6bPBBlAK9YyV 6XLA== 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=Ttv6KF4v6krmUYAxrGmgeNChrc5bO214oYIMPjiRLic=; b=T11DTBxziWSCBYYC3n+d/0vOey6wYC1IIHxoIp8ciVXaNwEeOqKg/MOB15lurONQMR PZxPbnQsNDZYt9sulmqhsZkUT2Iw45u65+EMlacw7hmL4dBWBdyc2Zc3RisliWQoy4MM xRN1DepY0urtAK/uNphwlddnRNbHv9At+Y7w2H0esJmtTB3sagKQiXsvtZJR/qV1ubuD rEyQkolfY5Lm6yaZWdnOhQsWUEYeG2GOBRcmAeIc1NXssByJb7FVaVCXRC83ZGxUxow6 qgNjwwcZ/Ek5biZiqnfmDtsHJKtPSvM6UkIzktIVwGvvk/g8yZwbHKC2A6ECl0mczotM Aegg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=d9Inlnvy; 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 b18-v6si843292pls.32.2018.10.23.03.23.44; Tue, 23 Oct 2018 03:23:59 -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=d9Inlnvy; 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 S1728004AbeJWSob (ORCPT + 99 others); Tue, 23 Oct 2018 14:44:31 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:37192 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727985AbeJWSob (ORCPT ); Tue, 23 Oct 2018 14:44:31 -0400 Received: by mail-pg1-f196.google.com with SMTP id c10-v6so421333pgq.4 for ; Tue, 23 Oct 2018 03:21:44 -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=Ttv6KF4v6krmUYAxrGmgeNChrc5bO214oYIMPjiRLic=; b=d9InlnvyB60YQyBIgv+jJWtFn2Fre7g3NyNZij5Y7UMbqeykO5I1C/YGChZyujoRc2 zT2xqG4ug0iUop3SnBASnURW230FavWiDMP8Ch5G7YaYLbCECB2bBergb4q2QzpiqVSV 2n4wkPp4hk40xTzMTcWIaxxm0F0UtQbpL0sZ0= 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=Ttv6KF4v6krmUYAxrGmgeNChrc5bO214oYIMPjiRLic=; b=HAitSe1qUPjPODTL0gtjrqwwnpjG56KhSPx01x0/bxPjo4er3F8AGZxX012YGEtSPS Awog10s+kVW01AqpgK72TskIX8lpPrFKCa4OhfXW5F9wc9W8l5V61/kVdbne2NMSEOGl DsXqGkLd10p5i3Ynttb3BaOlqrq3J+3RtYH3zzt+u9MpKethAgTlNF39FulhoirErAiz K9ke9zRMRBxrw1WFywJ/8e6VJ8FPuFMUc7BLCcQR/RbaKFNzLndHW/R7pRWukuHaTEA8 yQz5UONPE+zQJPI/+HVa8OLXEzc2a+HvIxeXcg3Mem7oDFOj+uWZmCfG//D9wvXZSqvy 4eig== X-Gm-Message-State: ABuFfojUggJfxXEsQgg/abtf1ZfG815MU/ThH13kQH+JhkA/WTTQF0/r oWSxqP9q7MTEEuzq7nP4KWrg4w== X-Received: by 2002:a63:1555:: with SMTP id 21-v6mr45815058pgv.383.1540290103670; Tue, 23 Oct 2018 03:21:43 -0700 (PDT) Received: from dhcp-10-123-74-106.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id m10-v6sm2918523pfg.180.2018.10.23.03.21.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Oct 2018 03:21:43 -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: [v6 3/4] mpt3sas:Fix driver modifying persistent data. Date: Tue, 23 Oct 2018 15:51:20 +0530 Message-Id: <1540290081-15827-4-git-send-email-suganath-prabu.subramani@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1540290081-15827-1-git-send-email-suganath-prabu.subramani@broadcom.com> References: <1540290081-15827-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 243bf32..2237681 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 88062d1..fe3da1c 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_config.c +++ b/drivers/scsi/mpt3sas/mpt3sas_config.c @@ -659,10 +659,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