From patchwork Mon Nov 27 12:53:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 119698 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp239963qgn; Mon, 27 Nov 2017 05:07:31 -0800 (PST) X-Google-Smtp-Source: AGs4zMZmgLocO2WHLwletx7tF6AajjLRWtJtdjwNuP2EwqZ5iLiNgYY/63Zl1rTx7xEpJfq5lAo6 X-Received: by 10.98.163.200 with SMTP id q69mr36080532pfl.21.1511788051733; Mon, 27 Nov 2017 05:07:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511788051; cv=none; d=google.com; s=arc-20160816; b=v9V1UpO+75Hpe5m5H8NzYco/0PO+nc7nHvIUhla6CiNVlN8AXIRrE9K4gzhcI6wNC1 czonKsC0Bri8oDtb5+EBWdpSias9Zt9p9Lu8KHvUSKhDMDiY9mXatfh6YFAJb/laN4Al VPkCeqx7JwStyfwZIQMKiDEmFhcSpZ3Abcn8xEEr/txQUY0N+iiFaXmAH/lSiKAXFNA2 4RFd9pNq1MWmueYpDxeRB23EXgyiffCMeW60oArQFXUIjD+8fZK053jy5SDJ2NE5p3ui lwYdop5gIDqxKf5ytTE4q3H96VjSg3pyu+6QqGbz6YhJJmYxAU6dYK7Oi9lY7ijKgQ42 CU4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=awdt1DfVn1228U/ID9G4pbA6CYN/RYjmEjQrRqsAyVM=; b=k2ebFYk35/Zz0vZoFaM81ugZWBZTvilpG3zFwRUq33O3XjV3mgVqzgj0q29MHljkJ5 mmMNd8VqK8T7Irmun6L6bXjuMXFvQNusbhe9OpH43t8G+114U9ZeumCDDn3E8+ZlRSoQ DNNWG4TEN9Mb2uxcArKtPK4IMszu7PEidH1FQx3h0QUnWIUNEV6ktbPvLPVS6P5wnOHM 9xpkQDXnS1LqGJfk7YkWEr63YrUDAzfE2FvC40KfCz4DOBrmmZwjBuCQBA9p4QrhGGzN +nTXIkch8fC26NYQQEAYQ9opvozGcstcOa0CzukimZM4ecG0mnTC9Vd2ZYyDTwNCidhN lxXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N9wVNSsX; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 67si6826703pla.648.2017.11.27.05.07.31; Mon, 27 Nov 2017 05:07:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.s=google header.b=N9wVNSsX; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752541AbdK0NH3 (ORCPT + 9 others); Mon, 27 Nov 2017 08:07:29 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:41618 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752383AbdK0Mx6 (ORCPT ); Mon, 27 Nov 2017 07:53:58 -0500 Received: by mail-pg0-f66.google.com with SMTP id q7so6050748pgr.8 for ; Mon, 27 Nov 2017 04:53:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=awdt1DfVn1228U/ID9G4pbA6CYN/RYjmEjQrRqsAyVM=; b=N9wVNSsXI050RwXp7l0q2Ejce8d9WKfQeFfAuxsS8IAA/vmKuB8vcE5AvVu5agfniV qkHbm2MHm2terScn1YAufSsIy83hzZRTET7rt53DOJgi3PukiZjmwDJie4j3nlThapXx 8fCM//A6WCCqoS6jkD7UZpTPx9At+eeuH96b4= 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:mime-version:content-transfer-encoding; bh=awdt1DfVn1228U/ID9G4pbA6CYN/RYjmEjQrRqsAyVM=; b=Br2zDOMHrEjkSBjCIsUS5D4UhVk7DVTelnYkWa7HyPhHmsA2W+xgjFVDCTLiKSRgtd 0QxlHbqG/Qcl1gQ0RNDMMvmBEoIkeNBW1pVpX2TITOfxb/8TsQTYuzpgHy1wQA1GOsgh MF2smLEFxqv+bzPwDwpv7AwRpIn0cM8g8BBuNH21Wp/87cdEynczH3IH+jqsAY6k1x9K EhxUcy67Bb81221do5WlYZ39mohRwegG2P/+0bWcftl6VQH/63wDsMITX55LQT1EBeWC RISkSDZ97IxoD2pPGZogbW1yZQtVlLjV8zHy0isQKNiaSjohTnEkWDCf0L1h7V8oU767 YmtQ== X-Gm-Message-State: AJaThX5UN3jruDYxUuhlLKuTC+SmSpkGw9PvWGmk0vXUZyFihzYdl1jZ RWqI0UTVqpxo2Pa8qt+6944HDg== X-Received: by 10.101.81.68 with SMTP id g4mr3904203pgq.166.1511787237732; Mon, 27 Nov 2017 04:53:57 -0800 (PST) Received: from localhost.localdomain ([106.51.17.194]) by smtp.gmail.com with ESMTPSA id i187sm51792658pfc.96.2017.11.27.04.53.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Nov 2017 04:53:56 -0800 (PST) From: Amit Pundir To: Greg KH Cc: Benjamin Poirier , Sasha Neftin , Stable , Jeff Kirsher Subject: [PATCH for-4.14.y 5/5] e1000e: fix buffer overrun while the I219 is processing DMA transactions Date: Mon, 27 Nov 2017 18:23:37 +0530 Message-Id: <1511787217-10987-6-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511787217-10987-1-git-send-email-amit.pundir@linaro.org> References: <1511787217-10987-1-git-send-email-amit.pundir@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Sasha Neftin commit b10effb92e272051dd1ec0d7be56bf9ca85ab927 upstream. IntelĀ® 100/200 Series Chipset platforms reduced the round-trip latency for the LAN Controller DMA accesses, causing in some high performance cases a buffer overrun while the I219 LAN Connected Device is processing the DMA transactions. I219LM and I219V devices can fall into unrecovered Tx hang under very stressfully UDP traffic and multiple reconnection of Ethernet cable. This Tx hang of the LAN Controller is only recovered if the system is rebooted. Slightly slow down DMA access by reducing the number of outstanding requests. This workaround could have an impact on TCP traffic performance on the platform. Disabling TSO eliminates performance loss for TCP traffic without a noticeable impact on CPU performance. Please, refer to I218/I219 specification update: https://www.intel.com/content/www/us/en/embedded/products/networking/ ethernet-connection-i218-family-documentation.html Signed-off-by: Sasha Neftin Reviewed-by: Dima Ruinskiy Reviewed-by: Raanan Avargil Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher Signed-off-by: Amit Pundir --- drivers/net/ethernet/intel/e1000e/netdev.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 99e5ef561f06..c38b00c90f48 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -3021,8 +3021,8 @@ static void e1000_configure_tx(struct e1000_adapter *adapter) hw->mac.ops.config_collision_dist(hw); - /* SPT and CNP Si errata workaround to avoid data corruption */ - if (hw->mac.type >= e1000_pch_spt) { + /* SPT and KBL Si errata workaround to avoid data corruption */ + if (hw->mac.type == e1000_pch_spt) { u32 reg_val; reg_val = er32(IOSFPC); @@ -3030,7 +3030,9 @@ static void e1000_configure_tx(struct e1000_adapter *adapter) ew32(IOSFPC, reg_val); reg_val = er32(TARC(0)); - reg_val |= E1000_TARC0_CB_MULTIQ_3_REQ; + /* SPT and KBL Si errata workaround to avoid Tx hang */ + reg_val &= ~BIT(28); + reg_val |= BIT(29); ew32(TARC(0), reg_val); } }