From patchwork Fri Dec 4 20:09:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Limonciello, Mario" X-Patchwork-Id: 1411262 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=dell.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=dell.com header.i=@dell.com header.a=rsa-sha256 header.s=smtpout1 header.b=Woll7bcJ; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4CnkdP0bCdz9sVV for ; Sat, 5 Dec 2020 07:22:01 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388185AbgLDUVK (ORCPT ); Fri, 4 Dec 2020 15:21:10 -0500 Received: from mx0a-00154904.pphosted.com ([148.163.133.20]:19156 "EHLO mx0a-00154904.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728017AbgLDUVJ (ORCPT ); Fri, 4 Dec 2020 15:21:09 -0500 Received: from pps.filterd (m0170393.ppops.net [127.0.0.1]) by mx0a-00154904.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B4KCwTE030210; Fri, 4 Dec 2020 15:20:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=smtpout1; bh=Bmk7Zjvi9X+Swpw2hnAWUI3bYSwnfmYTchixWgSaeE4=; b=Woll7bcJ45erKQUyWavA3A/tGb1fsShuUvv0zr6K8mEahfP7ywjinrSxgo+0caXnf0+Z WLr2JQi90faWhLzoxWA26xl2jakOR5m5CUbcNApnvxZU3YUlpDNkFvscDDUjolvJ4IuL FpaiZrDHP0GuM4j6sQMnOpcgknUKkc/xYqcxJudUih9p0HZ1jfOuy5z7WoH2bt8hMHoi qKnktdsN93uxgiYTfAjK5ld8aASp7SHVTreuCDVojRj7FHXTrcSviEcHzAMwogfMmRPM 2R/5m4qQ+6ZQVAxSL+P6EreuXyGTXy+W7hHxovaNjsTUzgPq4/jAlmztwMK5YZlrlm3S bg== Received: from mx0b-00154901.pphosted.com (mx0b-00154901.pphosted.com [67.231.157.37]) by mx0a-00154904.pphosted.com with ESMTP id 353jrqc0tm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Dec 2020 15:20:28 -0500 Received: from pps.filterd (m0144104.ppops.net [127.0.0.1]) by mx0b-00154901.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B4KDtgQ159954; Fri, 4 Dec 2020 15:20:27 -0500 Received: from ausxipps310.us.dell.com (AUSXIPPS310.us.dell.com [143.166.148.211]) by mx0b-00154901.pphosted.com with ESMTP id 357rmtkkh2-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 04 Dec 2020 15:20:27 -0500 X-LoopCount0: from 10.173.37.130 X-PREM-Routing: D-Outbound X-IronPort-AV: E=Sophos;i="5.78,393,1599541200"; d="scan'208";a="573039888" From: Mario Limonciello To: Jeff Kirsher , Tony Nguyen , intel-wired-lan@lists.osuosl.org Cc: linux-kernel@vger.kernel.org, Linux PM , Netdev , Alexander Duyck , Jakub Kicinski , Sasha Netfin , Aaron Brown , Stefan Assmann , David Miller , darcari@redhat.com, Yijun.Shen@dell.com, Perry.Yuan@dell.com, anthony.wong@canonical.com, Vitaly Lifshits Subject: [PATCH v3 1/7] e1000e: fix S0ix flow to allow S0i3.2 subset entry Date: Fri, 4 Dec 2020 14:09:14 -0600 Message-Id: <20201204200920.133780-2-mario.limonciello@dell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201204200920.133780-1-mario.limonciello@dell.com> References: <20201204200920.133780-1-mario.limonciello@dell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-12-04_09:2020-12-04,2020-12-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 spamscore=0 bulkscore=0 adultscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 lowpriorityscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012040115 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 bulkscore=0 suspectscore=0 adultscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012040115 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vitaly Lifshits Changed a configuration in the flows to align with architecture requirements to achieve S0i3.2 substate. Also fixed a typo in the previous commit 632fbd5eb5b0 ("e1000e: fix S0ix flows for cable connected case"). Signed-off-by: Vitaly Lifshits Tested-by: Aaron Brown Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/e1000e/netdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index b30f00891c03..128ab6898070 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -6475,13 +6475,13 @@ static void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter) /* Ungate PGCB clock */ mac_data = er32(FEXTNVM9); - mac_data |= BIT(28); + mac_data &= ~BIT(28); ew32(FEXTNVM9, mac_data); /* Enable K1 off to enable mPHY Power Gating */ mac_data = er32(FEXTNVM6); mac_data |= BIT(31); - ew32(FEXTNVM12, mac_data); + ew32(FEXTNVM6, mac_data); /* Enable mPHY power gating for any link and speed */ mac_data = er32(FEXTNVM8); @@ -6525,11 +6525,11 @@ static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter) /* Disable K1 off */ mac_data = er32(FEXTNVM6); mac_data &= ~BIT(31); - ew32(FEXTNVM12, mac_data); + ew32(FEXTNVM6, mac_data); /* Disable Ungate PGCB clock */ mac_data = er32(FEXTNVM9); - mac_data &= ~BIT(28); + mac_data |= BIT(28); ew32(FEXTNVM9, mac_data); /* Cancel not waking from dynamic From patchwork Fri Dec 4 20:09:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Limonciello, Mario" X-Patchwork-Id: 1411266 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=dell.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=dell.com header.i=@dell.com header.a=rsa-sha256 header.s=smtpout1 header.b=LH10oPuv; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4CnkdS2Cn6z9sWW for ; Sat, 5 Dec 2020 07:22:04 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388314AbgLDUVR (ORCPT ); Fri, 4 Dec 2020 15:21:17 -0500 Received: from mx0a-00154904.pphosted.com ([148.163.133.20]:20048 "EHLO mx0a-00154904.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730090AbgLDUVM (ORCPT ); Fri, 4 Dec 2020 15:21:12 -0500 Received: from pps.filterd (m0170391.ppops.net [127.0.0.1]) by mx0a-00154904.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B4KCA6Q001312; Fri, 4 Dec 2020 15:20:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=smtpout1; bh=YXiBzMDtFTt1Nnkq1FxQ/poJXuR1KHPhcYsDdLF324Y=; b=LH10oPuvb4w36p6alkKnFt62BgYpB7xwTXjw4oJiw/EdCZedY1LLuyvqfg0sWB95O7wn lbZ8MbXaaiyGsuoAPIcm0sSHnJlq7u2yEfyhVwTsFeyQZuP46kq0k25LUpicrmsFsHO8 uBPWgIe0dBVjU4ntIM9/0BTf34/6MI1DEm1VCeojCIF9h8cXX3HZ8UnjR/WW/KrjwHNP KTjhtmjJEOdreOv5nB8yJZfRj+GRAoU/eoT6vZYkuMHYEjrb59PXNcR6gc9pENLzIgvA VJni1aOPlXjYD1+Uao0RXS6o3Hgt8OUXrik4fijdAbFImfeGI+132ZJwV9qvJuN5CZUq lg== Received: from mx0b-00154901.pphosted.com (mx0b-00154901.pphosted.com [67.231.157.37]) by mx0a-00154904.pphosted.com with ESMTP id 353jk340r4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Dec 2020 15:20:29 -0500 Received: from pps.filterd (m0144104.ppops.net [127.0.0.1]) by mx0b-00154901.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B4KDtgR159954; Fri, 4 Dec 2020 15:20:28 -0500 Received: from ausxipps310.us.dell.com (AUSXIPPS310.us.dell.com [143.166.148.211]) by mx0b-00154901.pphosted.com with ESMTP id 357rmtkkh2-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 04 Dec 2020 15:20:28 -0500 X-LoopCount0: from 10.173.37.130 X-PREM-Routing: D-Outbound X-IronPort-AV: E=Sophos;i="5.78,393,1599541200"; d="scan'208";a="573039889" From: Mario Limonciello To: Jeff Kirsher , Tony Nguyen , intel-wired-lan@lists.osuosl.org Cc: linux-kernel@vger.kernel.org, Linux PM , Netdev , Alexander Duyck , Jakub Kicinski , Sasha Netfin , Aaron Brown , Stefan Assmann , David Miller , darcari@redhat.com, Yijun.Shen@dell.com, Perry.Yuan@dell.com, anthony.wong@canonical.com, Mario Limonciello , Yijun Shen Subject: [PATCH v3 2/7] e1000e: Move all S0ix related code into its own source file Date: Fri, 4 Dec 2020 14:09:15 -0600 Message-Id: <20201204200920.133780-3-mario.limonciello@dell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201204200920.133780-1-mario.limonciello@dell.com> References: <20201204200920.133780-1-mario.limonciello@dell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-12-04_09:2020-12-04,2020-12-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 spamscore=0 bulkscore=0 adultscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 lowpriorityscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012040115 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012040115 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Introduce a flag to indicate the device should be using the S0ix flows and use this flag to run those functions. Splitting the code to it's own file will make future heuristics more self contained. Tested-by: Yijun Shen Signed-off-by: Mario Limonciello --- drivers/net/ethernet/intel/e1000e/Makefile | 2 +- drivers/net/ethernet/intel/e1000e/e1000.h | 4 + drivers/net/ethernet/intel/e1000e/netdev.c | 272 +------------------- drivers/net/ethernet/intel/e1000e/s0ix.c | 280 +++++++++++++++++++++ 4 files changed, 290 insertions(+), 268 deletions(-) create mode 100644 drivers/net/ethernet/intel/e1000e/s0ix.c diff --git a/drivers/net/ethernet/intel/e1000e/Makefile b/drivers/net/ethernet/intel/e1000e/Makefile index 44e58b6e7660..f2332c01f86c 100644 --- a/drivers/net/ethernet/intel/e1000e/Makefile +++ b/drivers/net/ethernet/intel/e1000e/Makefile @@ -9,5 +9,5 @@ obj-$(CONFIG_E1000E) += e1000e.o e1000e-objs := 82571.o ich8lan.o 80003es2lan.o \ mac.o manage.o nvm.o phy.o \ - param.o ethtool.o netdev.o ptp.o + param.o ethtool.o netdev.o s0ix.o ptp.o diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h index ba7a0f8f6937..b13f956285ae 100644 --- a/drivers/net/ethernet/intel/e1000e/e1000.h +++ b/drivers/net/ethernet/intel/e1000e/e1000.h @@ -436,6 +436,7 @@ s32 e1000e_get_base_timinca(struct e1000_adapter *adapter, u32 *timinca); #define FLAG2_DFLT_CRC_STRIPPING BIT(12) #define FLAG2_CHECK_RX_HWTSTAMP BIT(13) #define FLAG2_CHECK_SYSTIM_OVERFLOW BIT(14) +#define FLAG2_ENABLE_S0IX_FLOWS BIT(15) #define E1000_RX_DESC_PS(R, i) \ (&(((union e1000_rx_desc_packet_split *)((R).desc))[i])) @@ -462,6 +463,9 @@ enum latency_range { extern char e1000e_driver_name[]; void e1000e_check_options(struct e1000_adapter *adapter); +void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter); +void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter); +void e1000e_maybe_enable_s0ix(struct e1000_adapter *adapter); void e1000e_set_ethtool_ops(struct net_device *netdev); int e1000e_open(struct net_device *netdev); diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 128ab6898070..cd9839e86615 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -103,45 +103,6 @@ static const struct e1000_reg_info e1000_reg_info_tbl[] = { {0, NULL} }; -struct e1000e_me_supported { - u16 device_id; /* supported device ID */ -}; - -static const struct e1000e_me_supported me_supported[] = { - {E1000_DEV_ID_PCH_LPT_I217_LM}, - {E1000_DEV_ID_PCH_LPTLP_I218_LM}, - {E1000_DEV_ID_PCH_I218_LM2}, - {E1000_DEV_ID_PCH_I218_LM3}, - {E1000_DEV_ID_PCH_SPT_I219_LM}, - {E1000_DEV_ID_PCH_SPT_I219_LM2}, - {E1000_DEV_ID_PCH_LBG_I219_LM3}, - {E1000_DEV_ID_PCH_SPT_I219_LM4}, - {E1000_DEV_ID_PCH_SPT_I219_LM5}, - {E1000_DEV_ID_PCH_CNP_I219_LM6}, - {E1000_DEV_ID_PCH_CNP_I219_LM7}, - {E1000_DEV_ID_PCH_ICP_I219_LM8}, - {E1000_DEV_ID_PCH_ICP_I219_LM9}, - {E1000_DEV_ID_PCH_CMP_I219_LM10}, - {E1000_DEV_ID_PCH_CMP_I219_LM11}, - {E1000_DEV_ID_PCH_CMP_I219_LM12}, - {E1000_DEV_ID_PCH_TGP_I219_LM13}, - {E1000_DEV_ID_PCH_TGP_I219_LM14}, - {E1000_DEV_ID_PCH_TGP_I219_LM15}, - {0} -}; - -static bool e1000e_check_me(u16 device_id) -{ - struct e1000e_me_supported *id; - - for (id = (struct e1000e_me_supported *)me_supported; - id->device_id; id++) - if (device_id == id->device_id) - return true; - - return false; -} - /** * __ew32_prepare - prepare to write to MAC CSR register on certain parts * @hw: pointer to the HW structure @@ -6368,228 +6329,6 @@ static void e1000e_flush_lpic(struct pci_dev *pdev) pm_runtime_put_sync(netdev->dev.parent); } -/* S0ix implementation */ -static void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter) -{ - struct e1000_hw *hw = &adapter->hw; - u32 mac_data; - u16 phy_data; - - /* Disable the periodic inband message, - * don't request PCIe clock in K1 page770_17[10:9] = 10b - */ - e1e_rphy(hw, HV_PM_CTRL, &phy_data); - phy_data &= ~HV_PM_CTRL_K1_CLK_REQ; - phy_data |= BIT(10); - e1e_wphy(hw, HV_PM_CTRL, phy_data); - - /* Make sure we don't exit K1 every time a new packet arrives - * 772_29[5] = 1 CS_Mode_Stay_In_K1 - */ - e1e_rphy(hw, I217_CGFREG, &phy_data); - phy_data |= BIT(5); - e1e_wphy(hw, I217_CGFREG, phy_data); - - /* Change the MAC/PHY interface to SMBus - * Force the SMBus in PHY page769_23[0] = 1 - * Force the SMBus in MAC CTRL_EXT[11] = 1 - */ - e1e_rphy(hw, CV_SMB_CTRL, &phy_data); - phy_data |= CV_SMB_CTRL_FORCE_SMBUS; - e1e_wphy(hw, CV_SMB_CTRL, phy_data); - mac_data = er32(CTRL_EXT); - mac_data |= E1000_CTRL_EXT_FORCE_SMBUS; - ew32(CTRL_EXT, mac_data); - - /* DFT control: PHY bit: page769_20[0] = 1 - * Gate PPW via EXTCNF_CTRL - set 0x0F00[7] = 1 - */ - e1e_rphy(hw, I82579_DFT_CTRL, &phy_data); - phy_data |= BIT(0); - e1e_wphy(hw, I82579_DFT_CTRL, phy_data); - - mac_data = er32(EXTCNF_CTRL); - mac_data |= E1000_EXTCNF_CTRL_GATE_PHY_CFG; - ew32(EXTCNF_CTRL, mac_data); - - /* Check MAC Tx/Rx packet buffer pointers. - * Reset MAC Tx/Rx packet buffer pointers to suppress any - * pending traffic indication that would prevent power gating. - */ - mac_data = er32(TDFH); - if (mac_data) - ew32(TDFH, 0); - mac_data = er32(TDFT); - if (mac_data) - ew32(TDFT, 0); - mac_data = er32(TDFHS); - if (mac_data) - ew32(TDFHS, 0); - mac_data = er32(TDFTS); - if (mac_data) - ew32(TDFTS, 0); - mac_data = er32(TDFPC); - if (mac_data) - ew32(TDFPC, 0); - mac_data = er32(RDFH); - if (mac_data) - ew32(RDFH, 0); - mac_data = er32(RDFT); - if (mac_data) - ew32(RDFT, 0); - mac_data = er32(RDFHS); - if (mac_data) - ew32(RDFHS, 0); - mac_data = er32(RDFTS); - if (mac_data) - ew32(RDFTS, 0); - mac_data = er32(RDFPC); - if (mac_data) - ew32(RDFPC, 0); - - /* Enable the Dynamic Power Gating in the MAC */ - mac_data = er32(FEXTNVM7); - mac_data |= BIT(22); - ew32(FEXTNVM7, mac_data); - - /* Disable the time synchronization clock */ - mac_data = er32(FEXTNVM7); - mac_data |= BIT(31); - mac_data &= ~BIT(0); - ew32(FEXTNVM7, mac_data); - - /* Dynamic Power Gating Enable */ - mac_data = er32(CTRL_EXT); - mac_data |= BIT(3); - ew32(CTRL_EXT, mac_data); - - /* Disable disconnected cable conditioning for Power Gating */ - mac_data = er32(DPGFR); - mac_data |= BIT(2); - ew32(DPGFR, mac_data); - - /* Don't wake from dynamic Power Gating with clock request */ - mac_data = er32(FEXTNVM12); - mac_data |= BIT(12); - ew32(FEXTNVM12, mac_data); - - /* Ungate PGCB clock */ - mac_data = er32(FEXTNVM9); - mac_data &= ~BIT(28); - ew32(FEXTNVM9, mac_data); - - /* Enable K1 off to enable mPHY Power Gating */ - mac_data = er32(FEXTNVM6); - mac_data |= BIT(31); - ew32(FEXTNVM6, mac_data); - - /* Enable mPHY power gating for any link and speed */ - mac_data = er32(FEXTNVM8); - mac_data |= BIT(9); - ew32(FEXTNVM8, mac_data); - - /* Enable the Dynamic Clock Gating in the DMA and MAC */ - mac_data = er32(CTRL_EXT); - mac_data |= E1000_CTRL_EXT_DMA_DYN_CLK_EN; - ew32(CTRL_EXT, mac_data); - - /* No MAC DPG gating SLP_S0 in modern standby - * Switch the logic of the lanphypc to use PMC counter - */ - mac_data = er32(FEXTNVM5); - mac_data |= BIT(7); - ew32(FEXTNVM5, mac_data); -} - -static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter) -{ - struct e1000_hw *hw = &adapter->hw; - u32 mac_data; - u16 phy_data; - - /* Disable the Dynamic Power Gating in the MAC */ - mac_data = er32(FEXTNVM7); - mac_data &= 0xFFBFFFFF; - ew32(FEXTNVM7, mac_data); - - /* Enable the time synchronization clock */ - mac_data = er32(FEXTNVM7); - mac_data |= BIT(0); - ew32(FEXTNVM7, mac_data); - - /* Disable mPHY power gating for any link and speed */ - mac_data = er32(FEXTNVM8); - mac_data &= ~BIT(9); - ew32(FEXTNVM8, mac_data); - - /* Disable K1 off */ - mac_data = er32(FEXTNVM6); - mac_data &= ~BIT(31); - ew32(FEXTNVM6, mac_data); - - /* Disable Ungate PGCB clock */ - mac_data = er32(FEXTNVM9); - mac_data |= BIT(28); - ew32(FEXTNVM9, mac_data); - - /* Cancel not waking from dynamic - * Power Gating with clock request - */ - mac_data = er32(FEXTNVM12); - mac_data &= ~BIT(12); - ew32(FEXTNVM12, mac_data); - - /* Cancel disable disconnected cable conditioning - * for Power Gating - */ - mac_data = er32(DPGFR); - mac_data &= ~BIT(2); - ew32(DPGFR, mac_data); - - /* Disable Dynamic Power Gating */ - mac_data = er32(CTRL_EXT); - mac_data &= 0xFFFFFFF7; - ew32(CTRL_EXT, mac_data); - - /* Disable the Dynamic Clock Gating in the DMA and MAC */ - mac_data = er32(CTRL_EXT); - mac_data &= 0xFFF7FFFF; - ew32(CTRL_EXT, mac_data); - - /* Revert the lanphypc logic to use the internal Gbe counter - * and not the PMC counter - */ - mac_data = er32(FEXTNVM5); - mac_data &= 0xFFFFFF7F; - ew32(FEXTNVM5, mac_data); - - /* Enable the periodic inband message, - * Request PCIe clock in K1 page770_17[10:9] =01b - */ - e1e_rphy(hw, HV_PM_CTRL, &phy_data); - phy_data &= 0xFBFF; - phy_data |= HV_PM_CTRL_K1_CLK_REQ; - e1e_wphy(hw, HV_PM_CTRL, phy_data); - - /* Return back configuration - * 772_29[5] = 0 CS_Mode_Stay_In_K1 - */ - e1e_rphy(hw, I217_CGFREG, &phy_data); - phy_data &= 0xFFDF; - e1e_wphy(hw, I217_CGFREG, phy_data); - - /* Change the MAC/PHY interface to Kumeran - * Unforce the SMBus in PHY page769_23[0] = 0 - * Unforce the SMBus in MAC CTRL_EXT[11] = 0 - */ - e1e_rphy(hw, CV_SMB_CTRL, &phy_data); - phy_data &= ~CV_SMB_CTRL_FORCE_SMBUS; - e1e_wphy(hw, CV_SMB_CTRL, phy_data); - mac_data = er32(CTRL_EXT); - mac_data &= ~E1000_CTRL_EXT_FORCE_SMBUS; - ew32(CTRL_EXT, mac_data); -} - static int e1000e_pm_freeze(struct device *dev) { struct net_device *netdev = dev_get_drvdata(dev); @@ -6962,7 +6701,6 @@ static __maybe_unused int e1000e_pm_suspend(struct device *dev) struct net_device *netdev = pci_get_drvdata(to_pci_dev(dev)); struct e1000_adapter *adapter = netdev_priv(netdev); struct pci_dev *pdev = to_pci_dev(dev); - struct e1000_hw *hw = &adapter->hw; int rc; e1000e_flush_lpic(pdev); @@ -6974,8 +6712,7 @@ static __maybe_unused int e1000e_pm_suspend(struct device *dev) e1000e_pm_thaw(dev); /* Introduce S0ix implementation */ - if (hw->mac.type >= e1000_pch_cnp && - !e1000e_check_me(hw->adapter->pdev->device)) + if (adapter->flags2 & FLAG2_ENABLE_S0IX_FLOWS) e1000e_s0ix_entry_flow(adapter); return rc; @@ -6986,12 +6723,10 @@ static __maybe_unused int e1000e_pm_resume(struct device *dev) struct net_device *netdev = pci_get_drvdata(to_pci_dev(dev)); struct e1000_adapter *adapter = netdev_priv(netdev); struct pci_dev *pdev = to_pci_dev(dev); - struct e1000_hw *hw = &adapter->hw; int rc; /* Introduce S0ix implementation */ - if (hw->mac.type >= e1000_pch_cnp && - !e1000e_check_me(hw->adapter->pdev->device)) + if (adapter->flags2 & FLAG2_ENABLE_S0IX_FLOWS) e1000e_s0ix_exit_flow(adapter); rc = __e1000_resume(pdev); @@ -7655,6 +7390,9 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (!(adapter->flags & FLAG_HAS_AMT)) e1000e_get_hw_control(adapter); + /* use heuristics to decide whether to enable s0ix flows */ + e1000e_maybe_enable_s0ix(adapter); + strlcpy(netdev->name, "eth%d", sizeof(netdev->name)); err = register_netdev(netdev); if (err) diff --git a/drivers/net/ethernet/intel/e1000e/s0ix.c b/drivers/net/ethernet/intel/e1000e/s0ix.c new file mode 100644 index 000000000000..c3013edbd9e4 --- /dev/null +++ b/drivers/net/ethernet/intel/e1000e/s0ix.c @@ -0,0 +1,280 @@ +// SPDX-License-Identifier: GPL-2.0 +/* Copyright(c) 1999 - 2018 Intel Corporation. */ + +#include + +#include "e1000.h" + +struct e1000e_me_supported { + u16 device_id; /* supported device ID */ +}; + +static const struct e1000e_me_supported me_supported[] = { + {E1000_DEV_ID_PCH_LPT_I217_LM}, + {E1000_DEV_ID_PCH_LPTLP_I218_LM}, + {E1000_DEV_ID_PCH_I218_LM2}, + {E1000_DEV_ID_PCH_I218_LM3}, + {E1000_DEV_ID_PCH_SPT_I219_LM}, + {E1000_DEV_ID_PCH_SPT_I219_LM2}, + {E1000_DEV_ID_PCH_LBG_I219_LM3}, + {E1000_DEV_ID_PCH_SPT_I219_LM4}, + {E1000_DEV_ID_PCH_SPT_I219_LM5}, + {E1000_DEV_ID_PCH_CNP_I219_LM6}, + {E1000_DEV_ID_PCH_CNP_I219_LM7}, + {E1000_DEV_ID_PCH_ICP_I219_LM8}, + {E1000_DEV_ID_PCH_ICP_I219_LM9}, + {E1000_DEV_ID_PCH_CMP_I219_LM10}, + {E1000_DEV_ID_PCH_CMP_I219_LM11}, + {E1000_DEV_ID_PCH_CMP_I219_LM12}, + {E1000_DEV_ID_PCH_TGP_I219_LM13}, + {E1000_DEV_ID_PCH_TGP_I219_LM14}, + {E1000_DEV_ID_PCH_TGP_I219_LM15}, + {0} +}; + +static bool e1000e_check_me(u16 device_id) +{ + struct e1000e_me_supported *id; + + for (id = (struct e1000e_me_supported *)me_supported; + id->device_id; id++) + if (device_id == id->device_id) + return true; + + return false; +} + +void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter) +{ + struct e1000_hw *hw = &adapter->hw; + u32 mac_data; + u16 phy_data; + + /* Disable the periodic inband message, + * don't request PCIe clock in K1 page770_17[10:9] = 10b + */ + e1e_rphy(hw, HV_PM_CTRL, &phy_data); + phy_data &= ~HV_PM_CTRL_K1_CLK_REQ; + phy_data |= BIT(10); + e1e_wphy(hw, HV_PM_CTRL, phy_data); + + /* Make sure we don't exit K1 every time a new packet arrives + * 772_29[5] = 1 CS_Mode_Stay_In_K1 + */ + e1e_rphy(hw, I217_CGFREG, &phy_data); + phy_data |= BIT(5); + e1e_wphy(hw, I217_CGFREG, phy_data); + + /* Change the MAC/PHY interface to SMBus + * Force the SMBus in PHY page769_23[0] = 1 + * Force the SMBus in MAC CTRL_EXT[11] = 1 + */ + e1e_rphy(hw, CV_SMB_CTRL, &phy_data); + phy_data |= CV_SMB_CTRL_FORCE_SMBUS; + e1e_wphy(hw, CV_SMB_CTRL, phy_data); + mac_data = er32(CTRL_EXT); + mac_data |= E1000_CTRL_EXT_FORCE_SMBUS; + ew32(CTRL_EXT, mac_data); + + /* DFT control: PHY bit: page769_20[0] = 1 + * Gate PPW via EXTCNF_CTRL - set 0x0F00[7] = 1 + */ + e1e_rphy(hw, I82579_DFT_CTRL, &phy_data); + phy_data |= BIT(0); + e1e_wphy(hw, I82579_DFT_CTRL, phy_data); + + mac_data = er32(EXTCNF_CTRL); + mac_data |= E1000_EXTCNF_CTRL_GATE_PHY_CFG; + ew32(EXTCNF_CTRL, mac_data); + + /* Check MAC Tx/Rx packet buffer pointers. + * Reset MAC Tx/Rx packet buffer pointers to suppress any + * pending traffic indication that would prevent power gating. + */ + mac_data = er32(TDFH); + if (mac_data) + ew32(TDFH, 0); + mac_data = er32(TDFT); + if (mac_data) + ew32(TDFT, 0); + mac_data = er32(TDFHS); + if (mac_data) + ew32(TDFHS, 0); + mac_data = er32(TDFTS); + if (mac_data) + ew32(TDFTS, 0); + mac_data = er32(TDFPC); + if (mac_data) + ew32(TDFPC, 0); + mac_data = er32(RDFH); + if (mac_data) + ew32(RDFH, 0); + mac_data = er32(RDFT); + if (mac_data) + ew32(RDFT, 0); + mac_data = er32(RDFHS); + if (mac_data) + ew32(RDFHS, 0); + mac_data = er32(RDFTS); + if (mac_data) + ew32(RDFTS, 0); + mac_data = er32(RDFPC); + if (mac_data) + ew32(RDFPC, 0); + + /* Enable the Dynamic Power Gating in the MAC */ + mac_data = er32(FEXTNVM7); + mac_data |= BIT(22); + ew32(FEXTNVM7, mac_data); + + /* Disable the time synchronization clock */ + mac_data = er32(FEXTNVM7); + mac_data |= BIT(31); + mac_data &= ~BIT(0); + ew32(FEXTNVM7, mac_data); + + /* Dynamic Power Gating Enable */ + mac_data = er32(CTRL_EXT); + mac_data |= BIT(3); + ew32(CTRL_EXT, mac_data); + + /* Disable disconnected cable conditioning for Power Gating */ + mac_data = er32(DPGFR); + mac_data |= BIT(2); + ew32(DPGFR, mac_data); + + /* Don't wake from dynamic Power Gating with clock request */ + mac_data = er32(FEXTNVM12); + mac_data |= BIT(12); + ew32(FEXTNVM12, mac_data); + + /* Ungate PGCB clock */ + mac_data = er32(FEXTNVM9); + mac_data &= ~BIT(28); + ew32(FEXTNVM9, mac_data); + + /* Enable K1 off to enable mPHY Power Gating */ + mac_data = er32(FEXTNVM6); + mac_data |= BIT(31); + ew32(FEXTNVM6, mac_data); + + /* Enable mPHY power gating for any link and speed */ + mac_data = er32(FEXTNVM8); + mac_data |= BIT(9); + ew32(FEXTNVM8, mac_data); + + /* Enable the Dynamic Clock Gating in the DMA and MAC */ + mac_data = er32(CTRL_EXT); + mac_data |= E1000_CTRL_EXT_DMA_DYN_CLK_EN; + ew32(CTRL_EXT, mac_data); + + /* No MAC DPG gating SLP_S0 in modern standby + * Switch the logic of the lanphypc to use PMC counter + */ + mac_data = er32(FEXTNVM5); + mac_data |= BIT(7); + ew32(FEXTNVM5, mac_data); +} + +void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter) +{ + struct e1000_hw *hw = &adapter->hw; + u32 mac_data; + u16 phy_data; + + /* Disable the Dynamic Power Gating in the MAC */ + mac_data = er32(FEXTNVM7); + mac_data &= 0xFFBFFFFF; + ew32(FEXTNVM7, mac_data); + + /* Enable the time synchronization clock */ + mac_data = er32(FEXTNVM7); + mac_data |= BIT(0); + ew32(FEXTNVM7, mac_data); + + /* Disable mPHY power gating for any link and speed */ + mac_data = er32(FEXTNVM8); + mac_data &= ~BIT(9); + ew32(FEXTNVM8, mac_data); + + /* Disable K1 off */ + mac_data = er32(FEXTNVM6); + mac_data &= ~BIT(31); + ew32(FEXTNVM6, mac_data); + + /* Disable Ungate PGCB clock */ + mac_data = er32(FEXTNVM9); + mac_data |= BIT(28); + ew32(FEXTNVM9, mac_data); + + /* Cancel not waking from dynamic + * Power Gating with clock request + */ + mac_data = er32(FEXTNVM12); + mac_data &= ~BIT(12); + ew32(FEXTNVM12, mac_data); + + /* Cancel disable disconnected cable conditioning + * for Power Gating + */ + mac_data = er32(DPGFR); + mac_data &= ~BIT(2); + ew32(DPGFR, mac_data); + + /* Disable Dynamic Power Gating */ + mac_data = er32(CTRL_EXT); + mac_data &= 0xFFFFFFF7; + ew32(CTRL_EXT, mac_data); + + /* Disable the Dynamic Clock Gating in the DMA and MAC */ + mac_data = er32(CTRL_EXT); + mac_data &= 0xFFF7FFFF; + ew32(CTRL_EXT, mac_data); + + /* Revert the lanphypc logic to use the internal Gbe counter + * and not the PMC counter + */ + mac_data = er32(FEXTNVM5); + mac_data &= 0xFFFFFF7F; + ew32(FEXTNVM5, mac_data); + + /* Enable the periodic inband message, + * Request PCIe clock in K1 page770_17[10:9] =01b + */ + e1e_rphy(hw, HV_PM_CTRL, &phy_data); + phy_data &= 0xFBFF; + phy_data |= HV_PM_CTRL_K1_CLK_REQ; + e1e_wphy(hw, HV_PM_CTRL, phy_data); + + /* Return back configuration + * 772_29[5] = 0 CS_Mode_Stay_In_K1 + */ + e1e_rphy(hw, I217_CGFREG, &phy_data); + phy_data &= 0xFFDF; + e1e_wphy(hw, I217_CGFREG, phy_data); + + /* Change the MAC/PHY interface to Kumeran + * Unforce the SMBus in PHY page769_23[0] = 0 + * Unforce the SMBus in MAC CTRL_EXT[11] = 0 + */ + e1e_rphy(hw, CV_SMB_CTRL, &phy_data); + phy_data &= ~CV_SMB_CTRL_FORCE_SMBUS; + e1e_wphy(hw, CV_SMB_CTRL, phy_data); + mac_data = er32(CTRL_EXT); + mac_data &= ~E1000_CTRL_EXT_FORCE_SMBUS; + ew32(CTRL_EXT, mac_data); +} + +void e1000e_maybe_enable_s0ix(struct e1000_adapter *adapter) +{ + struct e1000_hw *hw = &adapter->hw; + struct pci_dev *pdev = adapter->pdev; + + /* require cannon point or later */ + if (hw->mac.type < e1000_pch_cnp) + return; + /* turn off on ME configurations */ + if (e1000e_check_me(pdev->device)) + return; + adapter->flags2 |= FLAG2_ENABLE_S0IX_FLOWS; +} From patchwork Fri Dec 4 20:09:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Limonciello, Mario" X-Patchwork-Id: 1411261 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=dell.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=dell.com header.i=@dell.com header.a=rsa-sha256 header.s=smtpout1 header.b=T0fR8aZ4; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4CnkcS1xW3z9sVV for ; Sat, 5 Dec 2020 07:21:12 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730509AbgLDUVL (ORCPT ); Fri, 4 Dec 2020 15:21:11 -0500 Received: from mx0b-00154904.pphosted.com ([148.163.137.20]:51318 "EHLO mx0b-00154904.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729917AbgLDUVK (ORCPT ); Fri, 4 Dec 2020 15:21:10 -0500 Received: from pps.filterd (m0170396.ppops.net [127.0.0.1]) by mx0b-00154904.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B4KEHtf027745; Fri, 4 Dec 2020 15:20:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=smtpout1; bh=Y6f9sAG/INUVh8vyUVXJekKtUdBIzutr9gx9oKs5RNg=; b=T0fR8aZ4i7YAnHV3kai465/1tZ554oBktApTR4L4NHcAB5EaLt20vFxOSL5hNaHsmJ+S Lxb4NE8t74/g5WVIwNNrn1D0rDUgM1wAQHoAo4lH5lSn8X2AffqkmywBsqcTEj4Eb54v GExf51DK9JinlOm50VJE87cc/SQR7xhejDvyjjLefDwcXP2lJ1I/7PPaqUVlk1Ta5sDG ahpQjnia0d1D/G7+IvDIyTzAUCp3maukBOsHGS275Kuw5McK40rcC40PBxpyf335Lxc+ hAvfP1dUqYmPzBYU/pOwEqyOlDcZ01G4IFJucekh15HvMNuw7PMihkymMu9xuyfALbXn gA== Received: from mx0b-00154901.pphosted.com (mx0b-00154901.pphosted.com [67.231.157.37]) by mx0b-00154904.pphosted.com with ESMTP id 354fjthj5e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Dec 2020 15:20:29 -0500 Received: from pps.filterd (m0144104.ppops.net [127.0.0.1]) by mx0b-00154901.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B4KDtgS159954; Fri, 4 Dec 2020 15:20:28 -0500 Received: from ausxipps310.us.dell.com (AUSXIPPS310.us.dell.com [143.166.148.211]) by mx0b-00154901.pphosted.com with ESMTP id 357rmtkkh2-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 04 Dec 2020 15:20:28 -0500 X-LoopCount0: from 10.173.37.130 X-PREM-Routing: D-Outbound X-IronPort-AV: E=Sophos;i="5.78,393,1599541200"; d="scan'208";a="573039891" From: Mario Limonciello To: Jeff Kirsher , Tony Nguyen , intel-wired-lan@lists.osuosl.org Cc: linux-kernel@vger.kernel.org, Linux PM , Netdev , Alexander Duyck , Jakub Kicinski , Sasha Netfin , Aaron Brown , Stefan Assmann , David Miller , darcari@redhat.com, Yijun.Shen@dell.com, Perry.Yuan@dell.com, anthony.wong@canonical.com, Mario Limonciello , Yijun Shen Subject: [PATCH v3 3/7] e1000e: Export S0ix flags to ethtool Date: Fri, 4 Dec 2020 14:09:16 -0600 Message-Id: <20201204200920.133780-4-mario.limonciello@dell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201204200920.133780-1-mario.limonciello@dell.com> References: <20201204200920.133780-1-mario.limonciello@dell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-12-04_09:2020-12-04,2020-12-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 spamscore=0 bulkscore=0 adultscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 lowpriorityscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012040115 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 spamscore=0 adultscore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012040115 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This flag can be used for debugging and development purposes including determining if S0ix flows work properly for a system not currently recognized by heuristics. Tested-by: Yijun Shen Signed-off-by: Mario Limonciello --- drivers/net/ethernet/intel/e1000e/ethtool.c | 40 +++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/drivers/net/ethernet/intel/e1000e/ethtool.c b/drivers/net/ethernet/intel/e1000e/ethtool.c index 03215b0aee4b..eb683949ebfe 100644 --- a/drivers/net/ethernet/intel/e1000e/ethtool.c +++ b/drivers/net/ethernet/intel/e1000e/ethtool.c @@ -23,6 +23,13 @@ struct e1000_stats { int stat_offset; }; +static const char e1000e_priv_flags_strings[][ETH_GSTRING_LEN] = { +#define E1000E_PRIV_FLAGS_S0IX_ENABLED BIT(0) + "s0ix-enabled", +}; + +#define E1000E_PRIV_FLAGS_STR_LEN ARRAY_SIZE(e1000e_priv_flags_strings) + #define E1000_STAT(str, m) { \ .stat_string = str, \ .type = E1000_STATS, \ @@ -1776,6 +1783,8 @@ static int e1000e_get_sset_count(struct net_device __always_unused *netdev, return E1000_TEST_LEN; case ETH_SS_STATS: return E1000_STATS_LEN; + case ETH_SS_PRIV_FLAGS: + return E1000E_PRIV_FLAGS_STR_LEN; default: return -EOPNOTSUPP; } @@ -2097,6 +2106,10 @@ static void e1000_get_strings(struct net_device __always_unused *netdev, p += ETH_GSTRING_LEN; } break; + case ETH_SS_PRIV_FLAGS: + memcpy(data, e1000e_priv_flags_strings, + E1000E_PRIV_FLAGS_STR_LEN * ETH_GSTRING_LEN); + break; } } @@ -2305,6 +2318,31 @@ static int e1000e_get_ts_info(struct net_device *netdev, return 0; } +static u32 e1000e_get_priv_flags(struct net_device *netdev) +{ + struct e1000_adapter *adapter = netdev_priv(netdev); + u32 priv_flags = 0; + + if (adapter->flags2 & FLAG2_ENABLE_S0IX_FLOWS) + priv_flags |= E1000E_PRIV_FLAGS_S0IX_ENABLED; + + return priv_flags; +} + +static int e1000e_set_priv_flags(struct net_device *netdev, u32 priv_flags) +{ + struct e1000_adapter *adapter = netdev_priv(netdev); + unsigned int flags2 = adapter->flags2; + + flags2 &= ~FLAG2_ENABLE_S0IX_FLOWS; + if (priv_flags & E1000E_PRIV_FLAGS_S0IX_ENABLED) + flags2 |= FLAG2_ENABLE_S0IX_FLOWS; + if (flags2 != adapter->flags2) + adapter->flags2 = flags2; + + return 0; +} + static const struct ethtool_ops e1000_ethtool_ops = { .supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS, .get_drvinfo = e1000_get_drvinfo, @@ -2336,6 +2374,8 @@ static const struct ethtool_ops e1000_ethtool_ops = { .set_eee = e1000e_set_eee, .get_link_ksettings = e1000_get_link_ksettings, .set_link_ksettings = e1000_set_link_ksettings, + .get_priv_flags = e1000e_get_priv_flags, + .set_priv_flags = e1000e_set_priv_flags, }; void e1000e_set_ethtool_ops(struct net_device *netdev) From patchwork Fri Dec 4 20:09:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Limonciello, Mario" X-Patchwork-Id: 1411264 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=dell.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=dell.com header.i=@dell.com header.a=rsa-sha256 header.s=smtpout1 header.b=CcOXpzm7; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4CnkdQ1lSpz9sVV for ; Sat, 5 Dec 2020 07:22:02 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388221AbgLDUVL (ORCPT ); Fri, 4 Dec 2020 15:21:11 -0500 Received: from mx0a-00154904.pphosted.com ([148.163.133.20]:20322 "EHLO mx0a-00154904.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730171AbgLDUVK (ORCPT ); Fri, 4 Dec 2020 15:21:10 -0500 Received: from pps.filterd (m0170390.ppops.net [127.0.0.1]) by mx0a-00154904.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B4KC4ki023068; Fri, 4 Dec 2020 15:20:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=smtpout1; bh=Em2YhkrOBAbaK4LeEBHLRgC4Yg1dd17B4HORzBH6pd4=; b=CcOXpzm7zqowFXquMuox7UIXNgnRSQCgMURfw7i+3Thh4fEBjVbazlztHGlulljHrXOu MbLZIfpK2KDOnY9YJevSZo1wrRkM4en1hetHuSxGFpdkxC9tssB9alRu+LluJ1EN5Ela MaJ4VHnfz+MoQRE1Zh2DLYpLzaOxb5Prk0lj1hEebUkTfdi6HtPuD9XNJY4LYeur+12T yD1TUuc0ckwuVlr6W/eu+cTounlq9BBlNpnvOlebo82YPuQGxHDPtZ3jLOA6SjyhPyg5 miK5uvRu8ruPAxskKMNS6nK0Z+2R2vjcJZ4rqGoVOG0C5uIIslIKYCw50Ywrjaur8At7 MA== Received: from mx0a-00154901.pphosted.com (mx0a-00154901.pphosted.com [67.231.149.39]) by mx0a-00154904.pphosted.com with ESMTP id 353jg946nc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Dec 2020 15:20:29 -0500 Received: from pps.filterd (m0134746.ppops.net [127.0.0.1]) by mx0a-00154901.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B4KJEbL143512; Fri, 4 Dec 2020 15:20:29 -0500 Received: from ausxipps310.us.dell.com (AUSXIPPS310.us.dell.com [143.166.148.211]) by mx0a-00154901.pphosted.com with ESMTP id 357ua80kun-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 04 Dec 2020 15:20:29 -0500 X-LoopCount0: from 10.173.37.130 X-PREM-Routing: D-Outbound X-IronPort-AV: E=Sophos;i="5.78,393,1599541200"; d="scan'208";a="573039892" From: Mario Limonciello To: Jeff Kirsher , Tony Nguyen , intel-wired-lan@lists.osuosl.org Cc: linux-kernel@vger.kernel.org, Linux PM , Netdev , Alexander Duyck , Jakub Kicinski , Sasha Netfin , Aaron Brown , Stefan Assmann , David Miller , darcari@redhat.com, Yijun.Shen@dell.com, Perry.Yuan@dell.com, anthony.wong@canonical.com, Mario Limonciello , Yijun Shen Subject: [PATCH v3 4/7] e1000e: Add Dell's Comet Lake systems into S0ix heuristics Date: Fri, 4 Dec 2020 14:09:17 -0600 Message-Id: <20201204200920.133780-5-mario.limonciello@dell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201204200920.133780-1-mario.limonciello@dell.com> References: <20201204200920.133780-1-mario.limonciello@dell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-12-04_09:2020-12-04,2020-12-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 impostorscore=0 adultscore=0 priorityscore=1501 phishscore=0 clxscore=1015 mlxscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012040115 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 adultscore=0 mlxlogscore=999 suspectscore=0 malwarescore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012040115 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Dell's shipping Comet Lake Latitude and Precision systems containing i219LM are properly configured and should use the S0ix flows. Disabling s0ix entry and exit flows caused a regression in power consumption over suspend to idle on these systems. Fixes: e086ba2fccda ("e1000e: disable s0ix entry and exit flows for ME systems") Tested-by: Yijun Shen Signed-off-by: Mario Limonciello --- drivers/net/ethernet/intel/e1000e/s0ix.c | 33 +++++++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/e1000e/s0ix.c b/drivers/net/ethernet/intel/e1000e/s0ix.c index c3013edbd9e4..74043e80c32f 100644 --- a/drivers/net/ethernet/intel/e1000e/s0ix.c +++ b/drivers/net/ethernet/intel/e1000e/s0ix.c @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 -/* Copyright(c) 1999 - 2018 Intel Corporation. */ +/* Copyright(c) 1999 - 2018 Intel Corporation. + * Copyright(c) 2020 Dell Inc. + */ #include @@ -44,6 +46,26 @@ static bool e1000e_check_me(u16 device_id) return false; } +static bool e1000e_check_subsystem_allowlist(struct pci_dev *dev) +{ + if (dev->subsystem_vendor == PCI_VENDOR_ID_DELL) { + switch (dev->subsystem_device) { + case 0x099f: /* Latitude 5310 */ + case 0x09a0: /* Latitude 5410 */ + case 0x09c9: /* Latitude 5410 */ + case 0x09a1: /* Latitude 5510 */ + case 0x09a2: /* Precision 3550 */ + case 0x09c0: /* Latitude 5411 */ + case 0x09c1: /* Latitude 5511 */ + case 0x09c2: /* Precision 3551 */ + case 0x09c3: /* Precision 7550 */ + case 0x09c4: /* Precision 7750 */ + return true; + } + } + return false; +} + void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter) { struct e1000_hw *hw = &adapter->hw; @@ -273,8 +295,11 @@ void e1000e_maybe_enable_s0ix(struct e1000_adapter *adapter) /* require cannon point or later */ if (hw->mac.type < e1000_pch_cnp) return; - /* turn off on ME configurations */ - if (e1000e_check_me(pdev->device)) - return; + /* check for allowlist of systems */ + if (!e1000e_check_subsystem_allowlist(pdev)) { + /* turn off on ME configurations */ + if (e1000e_check_me(pdev->device)) + return; + } adapter->flags2 |= FLAG2_ENABLE_S0IX_FLOWS; } From patchwork Fri Dec 4 20:09:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Limonciello, Mario" X-Patchwork-Id: 1411268 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=dell.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=dell.com header.i=@dell.com header.a=rsa-sha256 header.s=smtpout1 header.b=ybKtQn5c; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4CnkdW2nVzz9sWd for ; Sat, 5 Dec 2020 07:22:07 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388377AbgLDUV2 (ORCPT ); Fri, 4 Dec 2020 15:21:28 -0500 Received: from mx0a-00154904.pphosted.com ([148.163.133.20]:21118 "EHLO mx0a-00154904.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726021AbgLDUVL (ORCPT ); Fri, 4 Dec 2020 15:21:11 -0500 Received: from pps.filterd (m0170391.ppops.net [127.0.0.1]) by mx0a-00154904.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B4KC6IV001210; Fri, 4 Dec 2020 15:20:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=smtpout1; bh=nsnR6oUO6VlQfGFg+Y3eEMgKteKYlrr0xitGicF9Gfo=; b=ybKtQn5cHlPBUYwZUMmDctHN01on8T6BjFsM9WfkTxUGTyyw9T6dFjEFSrYJW19R1YyW uAp715YwbKa0NLYw0qzXgzm6khTwrxPWDSprmmorj6VxDORc2ANGWo/smo49wknrcMkI Z6xDhpLcnQU034U1ZCopXs5h5n9lw/XG7IMIySgqMD7KzGFTroyfqtemmwaNzs1xtala wIlPDFLQCfJTr6PomxVLFdA3XUoLxvhfoTLXTdENLO2sWRgRMwOLrsAfNrrveUU7bQxa CpF96+wZcpn7G2ZLzddejvZ8FOPNWZhmNvFNQ8fAEge05zXCQ6kE22BISpkQ+UCg9VxR Ug== Received: from mx0b-00154901.pphosted.com (mx0b-00154901.pphosted.com [67.231.157.37]) by mx0a-00154904.pphosted.com with ESMTP id 353jk340r8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Dec 2020 15:20:30 -0500 Received: from pps.filterd (m0144104.ppops.net [127.0.0.1]) by mx0b-00154901.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B4KDtgT159954; Fri, 4 Dec 2020 15:20:29 -0500 Received: from ausxipps310.us.dell.com (AUSXIPPS310.us.dell.com [143.166.148.211]) by mx0b-00154901.pphosted.com with ESMTP id 357rmtkkh2-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 04 Dec 2020 15:20:29 -0500 X-LoopCount0: from 10.173.37.130 X-PREM-Routing: D-Outbound X-IronPort-AV: E=Sophos;i="5.78,393,1599541200"; d="scan'208";a="573039893" From: Mario Limonciello To: Jeff Kirsher , Tony Nguyen , intel-wired-lan@lists.osuosl.org Cc: linux-kernel@vger.kernel.org, Linux PM , Netdev , Alexander Duyck , Jakub Kicinski , Sasha Netfin , Aaron Brown , Stefan Assmann , David Miller , darcari@redhat.com, Yijun.Shen@dell.com, Perry.Yuan@dell.com, anthony.wong@canonical.com, Mario Limonciello , Yijun Shen Subject: [PATCH v3 5/7] e1000e: Add more Dell CML systems into S0ix heuristics Date: Fri, 4 Dec 2020 14:09:18 -0600 Message-Id: <20201204200920.133780-6-mario.limonciello@dell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201204200920.133780-1-mario.limonciello@dell.com> References: <20201204200920.133780-1-mario.limonciello@dell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-12-04_09:2020-12-04,2020-12-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 spamscore=0 bulkscore=0 adultscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 lowpriorityscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012040115 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012040115 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org These Comet Lake systems are not yet released, but have been validated on pre-release hardware. This is being submitted separately from released hardware in case of a regression between pre-release and release hardware so this commit can be reverted alone. Tested-by: Yijun Shen Signed-off-by: Mario Limonciello --- drivers/net/ethernet/intel/e1000e/s0ix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/intel/e1000e/s0ix.c b/drivers/net/ethernet/intel/e1000e/s0ix.c index 74043e80c32f..0dd2e2702ebb 100644 --- a/drivers/net/ethernet/intel/e1000e/s0ix.c +++ b/drivers/net/ethernet/intel/e1000e/s0ix.c @@ -60,6 +60,9 @@ static bool e1000e_check_subsystem_allowlist(struct pci_dev *dev) case 0x09c2: /* Precision 3551 */ case 0x09c3: /* Precision 7550 */ case 0x09c4: /* Precision 7750 */ + case 0x0a40: /* Notebook 0x0a40 */ + case 0x0a41: /* Notebook 0x0a41 */ + case 0x0a42: /* Notebook 0x0a42 */ return true; } } From patchwork Fri Dec 4 20:09:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Limonciello, Mario" X-Patchwork-Id: 1411267 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=dell.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=dell.com header.i=@dell.com header.a=rsa-sha256 header.s=smtpout1 header.b=OLTZBBJm; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4CnkdV24r0z9sWc for ; Sat, 5 Dec 2020 07:22:06 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388350AbgLDUV1 (ORCPT ); Fri, 4 Dec 2020 15:21:27 -0500 Received: from mx0a-00154904.pphosted.com ([148.163.133.20]:21346 "EHLO mx0a-00154904.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388189AbgLDUVL (ORCPT ); Fri, 4 Dec 2020 15:21:11 -0500 Received: from pps.filterd (m0170392.ppops.net [127.0.0.1]) by mx0a-00154904.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B4KEICe025074; Fri, 4 Dec 2020 15:20:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=smtpout1; bh=O2msH3+P3E3WNuVH5XQQnPf1sFoIo+wGo+bEN/vxDZ4=; b=OLTZBBJmmo6bcPzfxiiXBqQUhjYT6Mh1496t9cidHCVCCsnovaw2SXWKDB8x9bGqhEjd j8+Hx4O8y9N4/JbHZYKC2wSb8hRmaxnIiIITuBwQPWdqtL9Fp2n3f4Hh2ZFGaS1zrX+U oPAxqCQKig8PVYa4vMm8o737kAeffbqsHiadl+XZGuQRq2vw65NJYkqUIIYU8IqNY+2b NVksUf4Dufrq/zzhCETAZvG2ojoNXpniFKHlx59J1nR9YXJnj513vse89ti3rkGf6mi+ RirzS3/pEiA9k31oXcJ/YZsZezKHO5TR+3pGYEMPPZDdk3DiWnlZWpyXOGCrXaG7sAOa eA== Received: from mx0b-00154901.pphosted.com (mx0b-00154901.pphosted.com [67.231.157.37]) by mx0a-00154904.pphosted.com with ESMTP id 353jkhv7yd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Dec 2020 15:20:30 -0500 Received: from pps.filterd (m0144104.ppops.net [127.0.0.1]) by mx0b-00154901.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B4KDtgU159954; Fri, 4 Dec 2020 15:20:29 -0500 Received: from ausxipps310.us.dell.com (AUSXIPPS310.us.dell.com [143.166.148.211]) by mx0b-00154901.pphosted.com with ESMTP id 357rmtkkh2-6 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 04 Dec 2020 15:20:29 -0500 X-LoopCount0: from 10.173.37.130 X-PREM-Routing: D-Outbound X-IronPort-AV: E=Sophos;i="5.78,393,1599541200"; d="scan'208";a="573039894" From: Mario Limonciello To: Jeff Kirsher , Tony Nguyen , intel-wired-lan@lists.osuosl.org Cc: linux-kernel@vger.kernel.org, Linux PM , Netdev , Alexander Duyck , Jakub Kicinski , Sasha Netfin , Aaron Brown , Stefan Assmann , David Miller , darcari@redhat.com, Yijun.Shen@dell.com, Perry.Yuan@dell.com, anthony.wong@canonical.com, Mario Limonciello Subject: [PATCH v3 6/7] e1000e: Add Dell TGL desktop systems into S0ix heuristics Date: Fri, 4 Dec 2020 14:09:19 -0600 Message-Id: <20201204200920.133780-7-mario.limonciello@dell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201204200920.133780-1-mario.limonciello@dell.com> References: <20201204200920.133780-1-mario.limonciello@dell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-12-04_09:2020-12-04,2020-12-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 spamscore=0 bulkscore=0 adultscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 lowpriorityscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012040115 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 spamscore=0 phishscore=0 adultscore=0 suspectscore=0 mlxscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012040115 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org These Tiger Lake systems are not yet released, but have been validated on pre-release hardware. This is being submitted separately from released hardware in case of a regression between pre-release and release hardware so this commit can be reverted alone. Signed-off-by: Mario Limonciello --- drivers/net/ethernet/intel/e1000e/s0ix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/intel/e1000e/s0ix.c b/drivers/net/ethernet/intel/e1000e/s0ix.c index 0dd2e2702ebb..cc04aeaa2292 100644 --- a/drivers/net/ethernet/intel/e1000e/s0ix.c +++ b/drivers/net/ethernet/intel/e1000e/s0ix.c @@ -63,6 +63,8 @@ static bool e1000e_check_subsystem_allowlist(struct pci_dev *dev) case 0x0a40: /* Notebook 0x0a40 */ case 0x0a41: /* Notebook 0x0a41 */ case 0x0a42: /* Notebook 0x0a42 */ + case 0x0a2e: /* Desktop 0x0a2e */ + case 0x0a30: /* Desktop 0x0a30 */ return true; } } From patchwork Fri Dec 4 20:09:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Limonciello, Mario" X-Patchwork-Id: 1411265 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=dell.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=dell.com header.i=@dell.com header.a=rsa-sha256 header.s=smtpout1 header.b=Z8O/Px1C; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4CnkdR3K5kz9sVV for ; Sat, 5 Dec 2020 07:22:03 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388270AbgLDUVN (ORCPT ); Fri, 4 Dec 2020 15:21:13 -0500 Received: from mx0b-00154904.pphosted.com ([148.163.137.20]:53368 "EHLO mx0b-00154904.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730480AbgLDUVM (ORCPT ); Fri, 4 Dec 2020 15:21:12 -0500 Received: from pps.filterd (m0170396.ppops.net [127.0.0.1]) by mx0b-00154904.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B4KEHET027750; Fri, 4 Dec 2020 15:20:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=smtpout1; bh=AHnb657ZVkd3rGKeu3xGSOupjj5816VejdnfGan8hNg=; b=Z8O/Px1CkKM+v1MyLm/Dn8zln6nYo5D8n+xY26BzkpDHQDcCPUtruNIzv0b4QUSz9OGK oshN5D/5jy34i6Nz/xBNrXfBrgUlWXfYWUm0jTVBm0wNzfXS0eZJhngYzgL1wDCruE1n FpJbOO0CJMCYz5UH4QI46Hsq4pM0FWApHuSJnMZBJURI2YryC2ox3bQg3SlV9ub4uvh2 n/IqNsr0i4a1xt1Z/Oe8D99N+CycNkO5ZtL9yhSFimNpbrm/sJwzTvWN0GXbFgE8f2oU ZJgbzqviqQyK7/d1N1lQMWxCeiUF5FjioicY1HWOTSft2jc3cErjAyvP2EIxUS3cqiAV jA== Received: from mx0a-00154901.pphosted.com (mx0a-00154901.pphosted.com [67.231.149.39]) by mx0b-00154904.pphosted.com with ESMTP id 354fjthj5g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Dec 2020 15:20:31 -0500 Received: from pps.filterd (m0134746.ppops.net [127.0.0.1]) by mx0a-00154901.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B4KJEbM143512; Fri, 4 Dec 2020 15:20:30 -0500 Received: from ausxipps310.us.dell.com (AUSXIPPS310.us.dell.com [143.166.148.211]) by mx0a-00154901.pphosted.com with ESMTP id 357ua80kun-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 04 Dec 2020 15:20:30 -0500 X-LoopCount0: from 10.173.37.130 X-PREM-Routing: D-Outbound X-IronPort-AV: E=Sophos;i="5.78,393,1599541200"; d="scan'208";a="573039895" From: Mario Limonciello To: Jeff Kirsher , Tony Nguyen , intel-wired-lan@lists.osuosl.org Cc: linux-kernel@vger.kernel.org, Linux PM , Netdev , Alexander Duyck , Jakub Kicinski , Sasha Netfin , Aaron Brown , Stefan Assmann , David Miller , darcari@redhat.com, Yijun.Shen@dell.com, Perry.Yuan@dell.com, anthony.wong@canonical.com, Mario Limonciello Subject: [PATCH v3 7/7] e1000e: Add another Dell TGL notebook system into S0ix heuristics Date: Fri, 4 Dec 2020 14:09:20 -0600 Message-Id: <20201204200920.133780-8-mario.limonciello@dell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201204200920.133780-1-mario.limonciello@dell.com> References: <20201204200920.133780-1-mario.limonciello@dell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-12-04_09:2020-12-04,2020-12-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 impostorscore=0 adultscore=0 priorityscore=1501 phishscore=0 clxscore=1015 mlxscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012040115 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 spamscore=0 adultscore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012040115 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This Tiger Lake system is not yet released, but has been validated on pre-release hardware. This is being submitted separately from released hardware in case of a regression between pre-release and release hardware so this commit can be reverted alone. Signed-off-by: Mario Limonciello --- drivers/net/ethernet/intel/e1000e/s0ix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/intel/e1000e/s0ix.c b/drivers/net/ethernet/intel/e1000e/s0ix.c index cc04aeaa2292..3f2985fac67c 100644 --- a/drivers/net/ethernet/intel/e1000e/s0ix.c +++ b/drivers/net/ethernet/intel/e1000e/s0ix.c @@ -63,6 +63,7 @@ static bool e1000e_check_subsystem_allowlist(struct pci_dev *dev) case 0x0a40: /* Notebook 0x0a40 */ case 0x0a41: /* Notebook 0x0a41 */ case 0x0a42: /* Notebook 0x0a42 */ + case 0x0a22: /* Notebook 0x0a22 */ case 0x0a2e: /* Desktop 0x0a2e */ case 0x0a30: /* Desktop 0x0a30 */ return true;