From nobody Mon Sep 15 00:13:09 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD27DC3DA78 for ; Tue, 17 Jan 2023 10:27:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236574AbjAQK1u (ORCPT ); Tue, 17 Jan 2023 05:27:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236374AbjAQK1e (ORCPT ); Tue, 17 Jan 2023 05:27:34 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39F8A279A9; Tue, 17 Jan 2023 02:27:34 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id y1so33075418plb.2; Tue, 17 Jan 2023 02:27:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=kmOnku77wCpJTbZOm6646yTM8PiOjj7loFTP8/nFzXY=; b=JaR9n1yIXU8Xys+G0tkz6C7PSqR9i0vQP6wK/Qb4e6Bby8BKdUMQFaniTYM+6DXD+U +meRrjihC59W7zV8CV2T60XZGmhVcOAIlX207PcQhlxwyLB71sqSqq7CoW1TfxQ+WklD vpeSGibDIK4/k5TDmZI0uIYTOfuPWayTKOlWMTVSmngoQjlM3Bxl3VyQFCadUor8azxp pR8R1EQFXa/ArWCTgLm1ONwDPwjRoksC1bUCQTYvKRyozLphC/P7n0fMbldW40qLqj1b Ds5Dazv2fMlTFQ43RwOt06CBvQXRVFzItzBXT7rfmJIVN6MUHnJqY8vlL90U+dQgrybX 3qiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kmOnku77wCpJTbZOm6646yTM8PiOjj7loFTP8/nFzXY=; b=SKyz9FJLTv4KKEoy3if6/1RIvR0FbtBbvn7xIg9kmgZXTyEcNntOK9TH7f+hfgmVrU 5w7DSWbV4K4oy4gsnmzRkRyEi8LmPlACcZOkB2oldqn76gwwj8r8hqROvh+uy9cso+3v 1kMZ4CpvNWqF/9OtMnX94J0yFzZwPya9rWQfLvT6KMYt88m9je/IdarG21eYR5mUVrb6 zwB+X2WsCmKL5d32RjiZ/Ccuw42lIab8l6CI55xVXfsPmWOy6MdikJT9sQlK6OZmrPm4 WfOx5fuAXInzXAs2rXSuiH0sQTvJdtqIQgvuPzzvWsyX30P/pAPVWMZYbwGaJfENg8td 8HLA== X-Gm-Message-State: AFqh2koASa66D+KJzFWZshvfn/k2R3VU9Khsm/jp4tRqAA4V2eRn+HMF kGXbXfcpxKvuLqUDYdqBpkE= X-Google-Smtp-Source: AMrXdXvLAqhc4oGk1i82O5NAA03rkDUCOFcyZ1urDuBJ7SYLHLU0Pr+NOGlOoGVyVwxRluvgf7o48w== X-Received: by 2002:a17:902:7106:b0:194:66db:7789 with SMTP id a6-20020a170902710600b0019466db7789mr18287556pll.50.1673951253720; Tue, 17 Jan 2023 02:27:33 -0800 (PST) Received: from li540-143.members.linode.com ([2600:3c01::f03c:92ff:fe6e:f0f6]) by smtp.gmail.com with ESMTPSA id q11-20020a170902eb8b00b00189c93ce5easm20796153plg.166.2023.01.17.02.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 02:27:33 -0800 (PST) From: Jiajia Liu To: jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiajia Liu Subject: [PATCH] e1000e: Add ADP_I219_LM17 to ME S0ix blacklist Date: Tue, 17 Jan 2023 10:26:46 +0000 Message-Id: <20230117102645.24920-1-liujia6264@gmail.com> X-Mailer: git-send-email 2.21.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" I219 on HP EliteOne 840 All in One cannot work after s2idle resume when the link speed is Gigabit, Wake-on-LAN is enabled and then set the link down before suspend. No issue found when requesting driver to configure S0ix. Add workround to let ADP_I219_LM17 use the dirver configured S0ix. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=3D216926 Signed-off-by: Jiajia Liu --- It's regarding the bug above, it looks it's causued by the ME S0ix. And is there a method to make the ME S0ix path work? drivers/net/ethernet/intel/e1000e/netdev.c | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ether= net/intel/e1000e/netdev.c index 04acd1a992fa..7ee759dbd09d 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -6330,6 +6330,23 @@ static void e1000e_flush_lpic(struct pci_dev *pdev) pm_runtime_put_sync(netdev->dev.parent); } =20 +static u16 me_s0ix_blacklist[] =3D { + E1000_DEV_ID_PCH_ADP_I219_LM17, + 0 +}; + +static bool e1000e_check_me_s0ix_blacklist(const struct e1000_adapter *ada= pter) +{ + u16 *list; + + for (list =3D me_s0ix_blacklist; *list; list++) { + if (*list =3D=3D adapter->pdev->device) + return true; + } + + return false; +} + /* S0ix implementation */ static void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter) { @@ -6337,6 +6354,9 @@ static void e1000e_s0ix_entry_flow(struct e1000_adapt= er *adapter) u32 mac_data; u16 phy_data; =20 + if (e1000e_check_me_s0ix_blacklist(adapter)) + goto req_driver; + if (er32(FWSM) & E1000_ICH_FWSM_FW_VALID && hw->mac.type >=3D e1000_pch_adp) { /* Request ME configure the device for S0ix */ @@ -6346,6 +6366,7 @@ static void e1000e_s0ix_entry_flow(struct e1000_adapt= er *adapter) trace_e1000e_trace_mac_register(mac_data); ew32(H2ME, mac_data); } else { +req_driver: /* Request driver configure the device to S0ix */ /* Disable the periodic inband message, * don't request PCIe clock in K1 page770_17[10:9] =3D 10b @@ -6488,6 +6509,9 @@ static void e1000e_s0ix_exit_flow(struct e1000_adapte= r *adapter) u16 phy_data; u32 i =3D 0; =20 + if (e1000e_check_me_s0ix_blacklist(adapter)) + goto req_driver; + if (er32(FWSM) & E1000_ICH_FWSM_FW_VALID && hw->mac.type >=3D e1000_pch_adp) { /* Keep the GPT clock enabled for CSME */ @@ -6523,6 +6547,7 @@ static void e1000e_s0ix_exit_flow(struct e1000_adapte= r *adapter) else e_dbg("DPG_EXIT_DONE cleared after %d msec\n", i * 10); } else { +req_driver: /* Request driver unconfigure the device from S0ix */ =20 /* Disable the Dynamic Power Gating in the MAC */ --=20 2.30.2