Received: by 10.223.176.5 with SMTP id f5csp835165wra; Sat, 3 Feb 2018 11:21:22 -0800 (PST) X-Google-Smtp-Source: AH8x227LYXM5DkmW/7AnqmpiJhqw1th/Fl+r4yPRGGhhhzh8xrVL2FbxalepT1h+YCidRogjTqTX X-Received: by 2002:a17:902:67c5:: with SMTP id g5-v6mr35218621pln.106.1517685682498; Sat, 03 Feb 2018 11:21:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517685682; cv=none; d=google.com; s=arc-20160816; b=y9R3QJW5M3jLFHjO6ERSkvsCEymgzEh5ZeVYsC2gTojDL3omDg5iY/Muw+IElyhLsX 5GJJjZX+d//TID1tfPD7mVfSqHApGWtz68a0+NN6cJ7ZGa5vrVScbHxNhS/iQcjeQu0x 5opwDaMxEp0ibLMcMtXMZ1PVVpuUnWgcnNz82dN3lz+y24rQEIEjD7v+VsN60gT6zjut BA9mmuiHoSM8NZloWll8GIHHmiwW8XGKr6PRjZ7L4VD0BBmYBNXz0SLc94ID5tlsoBKl idudBTrJ8rMLerMY/dvc0/Knkb6cuZC+EBGD0Gokn2uSQweTsw/GzSnys//FUeLxQOoR HbTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Qnhhz6y25hK0K6fDiO+oSO9f0Qx0cR0povmGquvClZM=; b=EkfKzBicAnTh4Plxz0+qrZQKVSfJeQKcTkKx0jlPDh+v3UOVlyskgDivLrOULYr+38 Eop5IMCX3gOxdAKp9JKqP4wHPQ/qlNBcLsbLpvBWtuZiMAld1UchoIbiiYJFAolXU1Tc jO78vJvS8Y0IUIcrslbuE/Ta43IaAarqFdOtw3wT1sGXOniY8bF418zl9jTYbQxwRCoU gv3Yy2b7olOBWzaP4Z4cl/02Yzrl/5qIqnS9LxLZBrgltU19O1y15GxnnDKbWAmP3GO9 6tqyXqdTFM+JEdm52ROz4g0Nl9ZlzvJijtgn+2E433IIJR8Hp3fG1NRNNcAhN1NBb/fJ ZjKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=VSecHrGW; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q188si3293114pga.444.2018.02.03.11.21.07; Sat, 03 Feb 2018 11:21:22 -0800 (PST) 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=@microsoft.com header.s=selector1 header.b=VSecHrGW; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752797AbeBCSEj (ORCPT + 99 others); Sat, 3 Feb 2018 13:04:39 -0500 Received: from mail-by2nam03on0136.outbound.protection.outlook.com ([104.47.42.136]:45129 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753041AbeBCSCL (ORCPT ); Sat, 3 Feb 2018 13:02:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Qnhhz6y25hK0K6fDiO+oSO9f0Qx0cR0povmGquvClZM=; b=VSecHrGWGSfupwpf9uJKOvPP4mpUua+/ZGwcmAi4xRz5tN05m4fhlGRDRRY74Wykty7+lxnz1FQdoV4Q2Dr/glhNdRch6vNjamSyg5MrorvNybPGkQx356tlzykAxR+EOuNZqtSgoToDAVxnjX5ukVUKKMxqJL56ziVLu8zR3kw= Received: from BL0PR2101MB1027.namprd21.prod.outlook.com (52.132.20.161) by BL0PR2101MB1105.namprd21.prod.outlook.com (52.132.24.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.485.5; Sat, 3 Feb 2018 18:02:02 +0000 Received: from BL0PR2101MB1027.namprd21.prod.outlook.com ([fe80::a8da:b5d9:d710:9bf9]) by BL0PR2101MB1027.namprd21.prod.outlook.com ([fe80::a8da:b5d9:d710:9bf9%3]) with mapi id 15.20.0485.006; Sat, 3 Feb 2018 18:02:02 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Siva Reddy Kallam , Michael Chan , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 061/110] tg3: Add workaround to restrict 5762 MRRS to 2048 Thread-Topic: [PATCH AUTOSEL for 4.14 061/110] tg3: Add workaround to restrict 5762 MRRS to 2048 Thread-Index: AQHTnRjxMbiiowq7dkWLe6tLsHnXEA== Date: Sat, 3 Feb 2018 18:00:57 +0000 Message-ID: <20180203180015.29073-61-alexander.levin@microsoft.com> References: <20180203180015.29073-1-alexander.levin@microsoft.com> In-Reply-To: <20180203180015.29073-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BL0PR2101MB1105;7:8HlLkRrIBP5DhqPDLlHXqrNZH9b2Q6j3XLLlcUtcnIp0m+gGTVp7dDYR6ziy4lupJy/yawCD7AIZaWxTG/EWW+4g+CAKKvks076DjtAyTI2NyJKvn6k/ZTNlP/3pukoLuccSKvdetyzVj7BXmEUQhjEVFSOs2J0QKzq9HIqx9xsCnmb2Xo/0hJELoY3Tv/ZB/4+b3iT1eLcnEi6srw/4JZG5W12rBv3Nz/WGu4cOGMMwNpJiZpMkp1QOfxqXt90v x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 12f595bd-fe13-4987-ae58-08d56b303a80 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7193020);SRVR:BL0PR2101MB1105; x-ms-traffictypediagnostic: BL0PR2101MB1105: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(158342451672863)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231101)(2400082)(944501161)(93006095)(93001095)(6055026)(61426038)(61427038)(6041288)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:BL0PR2101MB1105;BCL:0;PCL:0;RULEID:;SRVR:BL0PR2101MB1105; x-forefront-prvs: 05724A8921 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(396003)(39380400002)(39860400002)(346002)(376002)(199004)(189003)(6346003)(97736004)(6512007)(7736002)(26005)(305945005)(102836004)(105586002)(68736007)(5250100002)(8936002)(59450400001)(6486002)(6436002)(106356001)(6506007)(81166006)(81156014)(2501003)(2906002)(10090500001)(99286004)(66066001)(54906003)(6116002)(3846002)(36756003)(1076002)(8676002)(110136005)(575784001)(107886003)(72206003)(2950100002)(478600001)(10290500003)(22452003)(6666003)(5660300001)(2900100001)(4326008)(25786009)(14454004)(316002)(86362001)(53936002)(3280700002)(186003)(3660700001)(76176011)(86612001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:BL0PR2101MB1105;H:BL0PR2101MB1027.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: 6u0JBIEA2qjmmT+ypJ68m0ms1VSybBvnkFxXkvyfXcJfDT2VB1HxwtwH6VFt6bxxG1wteXQBEfnmjs0tD4wn7Q== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 12f595bd-fe13-4987-ae58-08d56b303a80 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Feb 2018 18:00:57.8003 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR2101MB1105 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Siva Reddy Kallam [ Upstream commit 4419bb1cedcda0272e1dc410345c5a1d1da0e367 ] One of AMD based server with 5762 hangs with jumbo frame traffic. This AMD platform has southbridge limitation which is restricting MRRS to 4000. As a work around, driver to restricts the MRRS to 2048 for this particular 5762 NX1 card. Signed-off-by: Siva Reddy Kallam Signed-off-by: Michael Chan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/tg3.c | 10 ++++++++++ drivers/net/ethernet/broadcom/tg3.h | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/bro= adcom/tg3.c index aef3fcf2f5b9..69e1bd5497aa 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -10052,6 +10052,16 @@ static int tg3_reset_hw(struct tg3 *tp, bool reset= _phy) =20 tw32(GRC_MODE, tp->grc_mode | val); =20 + /* On one of the AMD platform, MRRS is restricted to 4000 because of + * south bridge limitation. As a workaround, Driver is setting MRRS + * to 2048 instead of default 4096. + */ + if (tp->pdev->subsystem_vendor =3D=3D PCI_VENDOR_ID_DELL && + tp->pdev->subsystem_device =3D=3D TG3PCI_SUBDEVICE_ID_DELL_5762) { + val =3D tr32(TG3PCI_DEV_STATUS_CTRL) & ~MAX_READ_REQ_MASK; + tw32(TG3PCI_DEV_STATUS_CTRL, val | MAX_READ_REQ_SIZE_2048); + } + /* Setup the timer prescalar register. Clock is always 66Mhz. */ val =3D tr32(GRC_MISC_CFG); val &=3D ~0xff; diff --git a/drivers/net/ethernet/broadcom/tg3.h b/drivers/net/ethernet/bro= adcom/tg3.h index c2d02d02d1e6..b057f71aed48 100644 --- a/drivers/net/ethernet/broadcom/tg3.h +++ b/drivers/net/ethernet/broadcom/tg3.h @@ -96,6 +96,7 @@ #define TG3PCI_SUBDEVICE_ID_DELL_JAGUAR 0x0106 #define TG3PCI_SUBDEVICE_ID_DELL_MERLOT 0x0109 #define TG3PCI_SUBDEVICE_ID_DELL_SLIM_MERLOT 0x010a +#define TG3PCI_SUBDEVICE_ID_DELL_5762 0x07f0 #define TG3PCI_SUBVENDOR_ID_COMPAQ PCI_VENDOR_ID_COMPAQ #define TG3PCI_SUBDEVICE_ID_COMPAQ_BANSHEE 0x007c #define TG3PCI_SUBDEVICE_ID_COMPAQ_BANSHEE_2 0x009a @@ -281,6 +282,9 @@ #define TG3PCI_STD_RING_PROD_IDX 0x00000098 /* 64-bit */ #define TG3PCI_RCV_RET_RING_CON_IDX 0x000000a0 /* 64-bit */ /* 0xa8 --> 0xb8 unused */ +#define TG3PCI_DEV_STATUS_CTRL 0x000000b4 +#define MAX_READ_REQ_SIZE_2048 0x00004000 +#define MAX_READ_REQ_MASK 0x00007000 #define TG3PCI_DUAL_MAC_CTRL 0x000000b8 #define DUAL_MAC_CTRL_CH_MASK 0x00000003 #define DUAL_MAC_CTRL_ID 0x00000004 --=20 2.11.0