Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp720852pxb; Mon, 25 Oct 2021 17:25:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6fkvKVCX0s70c1AiskMg2sCChMVFCXPbN57i5J1DZeI2v0WxKJLXpjEzA30mM8UbFWNn+ X-Received: by 2002:a63:af06:: with SMTP id w6mr7881474pge.436.1635207906530; Mon, 25 Oct 2021 17:25:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635207906; cv=none; d=google.com; s=arc-20160816; b=fxrUX4wrUZjjVCusHVOABcQLmap8tIpSD4Yo0yJ8iskOrR79d9zBUnjfUji21OVpuy 9YG0svayUwH11Y+F6jO8k8MiZEWgmMOqvmLFP2Gujhl4Zz/D/XDlMI7n85NggCAbQ8XT nMGYLJUljNyMgAQvZfXQAC6WU090+kZJ9hYDGzHc8ENYi9+HePiJIhG7lsXwPMwOcbWh b53o3F86kyfJZKZQJgocg6nugXkOjN8dD/kznZyznosWSKMMiAvUYWxa7i7t/AS05V0X 5ZjTe9BMXMQfNM/WERa0ulPajL04QpV8kQ21ch5RgENFs7AxGebl6fsPNXdg09zXsPDH xXvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vPozFlLVjdX75OAmmWg0oyzFJ0viiKrZSobkOyiiwOM=; b=DVv7ICq+cjWv6XsL1op3bxvU5CNhHuNORb5o2ToFZ73FNR1s7+KYVZijVFCpGgTdB7 pU21Y6IQEeCJDr4uCYgOjVFWMe3buCpoIosbtmzfZo+O3DFOPSuf+dQZt5YNknT7NXK8 okByKu+D2OjVVSUkBEwNjq0tBtNwd/vztVOWjH+FeGsH50uZ+ZYgIOBsgxxQS6anxB8C cTE1hR0/dVXt9I65/tpBqSv3nMZdcMaXvkrMVRrme6NMXjNJHKVrrWVod9x8fQIcd6Kt TZYw1Y6aKizkm6JxdO3JOrVnWGzW2ErqmDqac8wHMz9yLSWOpRaPXHlAa/JseKR15fFh GFRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0otxlVzQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a15si28870111pgw.185.2021.10.25.17.24.54; Mon, 25 Oct 2021 17:25:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0otxlVzQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236916AbhJYTuq (ORCPT + 99 others); Mon, 25 Oct 2021 15:50:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:60704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236615AbhJYTo5 (ORCPT ); Mon, 25 Oct 2021 15:44:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5B408611BD; Mon, 25 Oct 2021 19:38:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1635190711; bh=p083Oy0zE8zyg5YCC16SQDusyyr2P7h6Ag0nLhy/GQA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0otxlVzQvN3NlpxbchgAPNL9Id6etRZy6M3eHo77IAacnhZdNfngF/lu9xvY+bV6v MhzmBrIUN+qtvJCe0gW85Rd7R2jkgJhZXLGSbGtJcOD013Gmx679stqtvypaZefO/L SYtkdnWK3h3U4SiyzoWCCak3GhAxIETjLq7wSCBU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sasha Neftin , Mark Pearson , Nechama Kraus , Tony Nguyen , Sasha Levin Subject: [PATCH 5.14 052/169] e1000e: Fix packet loss on Tiger Lake and later Date: Mon, 25 Oct 2021 21:13:53 +0200 Message-Id: <20211025191024.267219772@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211025191017.756020307@linuxfoundation.org> References: <20211025191017.756020307@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sasha Neftin [ Upstream commit 639e298f432fb058a9496ea16863f53b1ce935fe ] Update the HW MAC initialization flow. Do not gate DMA clock from the modPHY block. Keeping this clock will prevent dropped packets sent in burst mode on the Kumeran interface. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213651 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213377 Fixes: fb776f5d57ee ("e1000e: Add support for Tiger Lake") Signed-off-by: Sasha Neftin Tested-by: Mark Pearson Tested-by: Nechama Kraus Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/e1000e/ich8lan.c | 11 ++++++++++- drivers/net/ethernet/intel/e1000e/ich8lan.h | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c index a80336c4319b..58a96a0cf4aa 100644 --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c @@ -4804,7 +4804,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw) { struct e1000_mac_info *mac = &hw->mac; - u32 ctrl_ext, txdctl, snoop; + u32 ctrl_ext, txdctl, snoop, fflt_dbg; s32 ret_val; u16 i; @@ -4863,6 +4863,15 @@ static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw) snoop = (u32)~(PCIE_NO_SNOOP_ALL); e1000e_set_pcie_no_snoop(hw, snoop); + /* Enable workaround for packet loss issue on TGP PCH + * Do not gate DMA clock from the modPHY block + */ + if (mac->type >= e1000_pch_tgp) { + fflt_dbg = er32(FFLT_DBG); + fflt_dbg |= E1000_FFLT_DBG_DONT_GATE_WAKE_DMA_CLK; + ew32(FFLT_DBG, fflt_dbg); + } + ctrl_ext = er32(CTRL_EXT); ctrl_ext |= E1000_CTRL_EXT_RO_DIS; ew32(CTRL_EXT, ctrl_ext); diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.h b/drivers/net/ethernet/intel/e1000e/ich8lan.h index e757896287eb..8f2a8f4ce0ee 100644 --- a/drivers/net/ethernet/intel/e1000e/ich8lan.h +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.h @@ -286,6 +286,9 @@ /* Proprietary Latency Tolerance Reporting PCI Capability */ #define E1000_PCI_LTR_CAP_LPT 0xA8 +/* Don't gate wake DMA clock */ +#define E1000_FFLT_DBG_DONT_GATE_WAKE_DMA_CLK 0x1000 + void e1000e_write_protect_nvm_ich8lan(struct e1000_hw *hw); void e1000e_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw, bool state); -- 2.33.0