Received: by 10.223.185.116 with SMTP id b49csp8732976wrg; Fri, 2 Mar 2018 07:04:18 -0800 (PST) X-Google-Smtp-Source: AG47ELvx0ZaYKy5j1yptAhe6MJ6OqJ5BLswEWSPkRVsj0LuzzC/IJz3wRNiiyOMk8mEE8ja/zfYL X-Received: by 10.99.114.70 with SMTP id c6mr4749658pgn.337.1520003058800; Fri, 02 Mar 2018 07:04:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520003058; cv=none; d=google.com; s=arc-20160816; b=h+h1QPTFHIlZSBvMoX0cKsmfzt/Ov+6GptGNfIwfunzzfyo3IkqniNTRyyuLXqfWjY OhRuFHdsxjRJAAMOwr0TM/rnsVGykB8q9nuEFIHZiRekkIi3frFMqAsNmPEi1hfMOmdw S15svNFcZr4Rw4itNIBNO7zc0iv/sGAP9DJlwXos0zQTqHZ+qZ8Ioou+TLlMIYXt39dx QdT121cLBxW9ACwwPV4rkaBJyZYHFuf7XKG08XJ9wngTJyLMCj8Z2FOcMglxf/3505B6 IXHuq+ij6IHWtMP0/3VrjhvnjoWxLrZ7+dnRrwaVwv2bB4KO+slkIz4T7UJnBJUKDj0d /c6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=WqFsMfd90Wv73V/lc37WK3Tp+oth+pqmURuQk6xnW7g=; b=JILorepV7AOh5x1upHShR4EoKWyzlTKNhBQR57Uxt6IgdvgPcFiHWwr/tvLNTFGhNZ F57RrpLKoYtW+1iF7hiS2ON6Rh89jcEb/rtASnLMsk05xMk7aYJp8pdAuMhvq3ScxlcB /ixwegy9JTxrwxiGxgxRiIlWCE4y5jtzuHFERgIeIFv7OolrbhjS9101BlItkfll0v5G wunTFFw8HmMQLN70F8he1pX6FKXQMl0bebkWd6v8uVPoUcVPAzOrj61jrJBP8tEOEGCq eusJFBYVfk/PhqhrCWXqQnIjsgW8/A1wEycYpA2UDkhw1B3XVU40A9DjK4PJojWKAmNO M78Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12-v6si479702plr.334.2018.03.02.07.04.04; Fri, 02 Mar 2018 07:04:18 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426939AbeCBLKq (ORCPT + 99 others); Fri, 2 Mar 2018 06:10:46 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:50398 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423134AbeCBIyS (ORCPT ); Fri, 2 Mar 2018 03:54:18 -0500 Received: from localhost (clnet-b04-243.ikbnet.co.at [83.175.124.243]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 377DE1205; Fri, 2 Mar 2018 08:54:17 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Siva Reddy Kallam , Michael Chan , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 13/34] tg3: Add workaround to restrict 5762 MRRS to 2048 Date: Fri, 2 Mar 2018 09:51:09 +0100 Message-Id: <20180302084436.814040006@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180302084435.842679610@linuxfoundation.org> References: <20180302084435.842679610@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ 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 Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/broadcom/tg3.c | 10 ++++++++++ drivers/net/ethernet/broadcom/tg3.h | 4 ++++ 2 files changed, 14 insertions(+) --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -10051,6 +10051,16 @@ static int tg3_reset_hw(struct tg3 *tp, tw32(GRC_MODE, tp->grc_mode | val); + /* 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 == PCI_VENDOR_ID_DELL && + tp->pdev->subsystem_device == TG3PCI_SUBDEVICE_ID_DELL_5762) { + val = 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 = tr32(GRC_MISC_CFG); val &= ~0xff; --- a/drivers/net/ethernet/broadcom/tg3.h +++ b/drivers/net/ethernet/broadcom/tg3.h @@ -95,6 +95,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 @@ -280,6 +281,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