From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97649606A32C for ; Thu, 3 Dec 2026 10:23:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=1bPpWi0d; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=KZXzLWuW Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 76A756135B; Thu, 3 Dec 2026 10:23:25 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id BPpWz12imWH8; Thu, 3 Dec 2026 10:23:24 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp3.osuosl.org 96C7361371 Authentication-Results: smtp3.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1796293404; b=rHeUAKI0H4p2Sd+19LiYR7A/8CggjO1wE6ulNFPj+n+6t/7Df+3ptZyevhzSIrv/ObGK CLnwxccp2dENlHA5o6orimHueE3GfAMK+3ammZHps6VDk2Hfv7292qgISGzyzS6g4AsWT aguGMYayRAVenDqZjpyoHmWj4dCYtAqPqjn3h7OzaJyWfKC4m+kH66qFekAey66MNifId Qlu50QQsme2LGp3zs4jhMdufAdww0jzHwCQcKQdTNSagSQ8zvDAFQZzcNhotU0AKGGNqr jdY/xelScI+9thfUz9ydauJbJtYkrE6wj7d2drnI021BlNV9MqwEdprBHmSAgJAi2DQ== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796293404; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: Received:DKIM-Signature:Message-ID:From:Subject:To:In-Reply-To: References:Content-Type:Content-Transfer-Encoding:Date:X-BeenThere: X-Mailman-Version:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Reply-To:Errors-To; bh=udqqc54WG8NtrpbTPh1lIRhGjsG/6aqcouo9+NVrmLs=; b=FnMEujDBFaV1ouoM6wfoGx2Nltf+S+KJo9hM8alGaN0EucZibDWqhowoS2FYsarRFykf hlmxc1uETJyM9fumtLBU4H1rIuOWdytrYB2BI3v3jnMCLLXKOeSI4WmWZ5pNT4bBnW9tW kGgSlspvMeNg9yvfNDVHTmomWKo7ziZipcJn+Onh5LVEiBOIHY92JZGvpr7ElFSn5OZ7O Pua4p8bdQQXqpJbDVV/18p4mr+P6vHm8idC3c/E3JXeWewsWt4n6g+MTfo/9wjFtj94FP 9sLTly4OflZEvyjS4r3LyqDaEkYbJI5BrwyMpVSU99Bf6HozHVmvI3wcOxZ/rKaGxwQ== ARC-Authentication-Results: i=1; smtp3.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1796293404; bh=udqqc54WG8NtrpbTPh1lIRhGjsG/6aqcouo9+NVrmLs=; h=From:Subject:To:In-Reply-To:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To:From; b=1bPpWi0ddgV7YZ7e1FJDcRTDtjpeAg0cGKuto+aFgO2u125yZUqhWUL7l2BpcCG3E 1mJjealFWgd7X5gP3jPhci7wpblicNy3ZXFXH+3kxgvKD5+eK4wAdQSudYUQ4hMxrz uThhiHudndWbcFr/b0Ew0I6zZ2xOg5bqKJTIwctPeKesk6Q4amMaRDpzBDiAVu8bh5 myUtRA0Vu+/neahhvqChMZDUeKS1xag0pB0qA0ROeGa/28HmzDCMGyOGAaHT8Qan7h WWC+cCgE+FQmS/ZgbJmUaNa1zB5bhCgdpXkJmjuBHRQqeRbdyjaxk7VhpArFkiOMPP Axv8ASdxrolmg== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 96C7361371; Thu, 3 Dec 2026 10:23:24 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists1.osuosl.org (Postfix) with ESMTP id CD2653DB for ; Thu, 3 Dec 2026 10:23:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B333D409EC for ; Thu, 3 Dec 2026 10:23:22 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id mCnVt_hZd-xm for ; Thu, 3 Dec 2026 10:23:22 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp4.osuosl.org CB8E0409E4 Authentication-Results: smtp4.osuosl.org; arc=none smtp.remote-ip=172.234.252.31 Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=sashiko-bot@kernel.org; receiver= Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=KZXzLWuW Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by smtp4.osuosl.org (Postfix) with ESMTPS id CB8E0409E4 for ; Thu, 3 Dec 2026 10:23:21 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 1751641715; Thu, 3 Dec 2026 10:23:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC0D41F00896; Thu, 3 Dec 2026 10:23:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796293401; bh=udqqc54WG8NtrpbTPh1lIRhGjsG/6aqcouo9+NVrmLs=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=KZXzLWuW1vU6jRIS6iJq7J+0h1o13hXaLgjfw4lhzwoZli+y7lJEh2i1Dt+yAmLzj e2GWFbkYZGrfpmfBGCzNMdPN9SqSdoIFBNgkAgLn9YL7Dzq3QNlwhNW0L/G03KwRbj wSnTkd/iMtGnJbB3lGEfYuOjniEP/XlwEXuhOiUmHCBxxvA8JC9ao67fe0A87DCqdT j2M6dO7NyEbayBf+lPQiKYqeHblsAXk2YjP83murWoHcr7u/dM12eXe9mUFGTaXiiy W1czPRK63jgg/GTx0FMiF2/I3bD9WjxO32WBygEcsC60Bq5e2ps0hNZ7EDRF6nViRy XklytUpV9+aOA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH iwl-net] e1000e: fix TX hang after failed S4 hibernate cycle To: "Dima Ruinskiy" , intel-wired-lan@lists.osuosl.org In-Reply-To: <20261203095751.1446451-1-dima.ruinskiy@intel.com> References: <20261203095751.1446451-1-dima.ruinskiy@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 10:23:20 +0000 X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [High] e1000e: BUG_ON panic and TX ring desync via e1000e_reset() in e1000e_pm_thaw() - [Medium] e1000e: duplicate hardware reset in e1000e_pm_thaw() on resume and recovery -- commit adb0449c9bbd60d253066f7b7823fc2a85104bf9 Author: Dima Ruinskiy e1000e: fix TX hang after failed S4 hibernate cycle This commit adds a call to e1000e_reset() in e1000e_pm_thaw() before requesting interrupts and bringing the interface back up, to clear stale PHY state after a freeze/thaw cycle. > diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/eth= ernet/intel/e1000e/netdev.c > index 1d592f61f2cbe..60125dca5d555 100644 > --- a/drivers/net/ethernet/intel/e1000e/netdev.c > +++ b/drivers/net/ethernet/intel/e1000e/netdev.c > @@ -6945,6 +6945,11 @@ static int e1000e_pm_thaw(struct device *dev) > =20 > rtnl_lock(); > if (netif_running(netdev)) { > + /* Reset adapter to clear stale PHY state > + * after freeze/thaw cycle. Without this, > + * a failed hibernation leaves the TX path hung. > + */ > + e1000e_reset(adapter); > rc =3D e1000_request_irq(adapter); > if (rc) > goto err_irq; [Severity: High] Can this e1000e_reset() call hit BUG_ON(tdt !=3D tx_ring->next_to_use) in e1000_flush_tx_ring() on I219 and newer PCH adapters? During hibernation freeze, e1000e_pm_freeze() calls e1000e_down(adapter, false), which skips e1000e_reset() and calls e1000_clean_tx_ring(). That resets tx_ring->next_to_use to 0 while hardware TDLEN(0) and TDT(0) retain their pre-freeze values. On thaw, e1000e_reset() calls e1000_flush_desc_rings() when hw->mac.type >=3D e1000_pch_spt. If FLUSH_DESC_REQUIRED is still set in PCICFG_DESC_RING_STATUS (for instance, when PHYRA blocked the freeze-time flush), e1000_flush_tx_ring() panics whenever TDT(0) is non-zero. Even if TDT(0) is 0, e1000_flush_tx_ring() puts a dummy descriptor without E1000_TXD_CMD_RS at slot 0 and sets tx_ring->next_to_use to 1. Since e1000e_up() -> e1000_configure_tx() resets TDH(0)/TDT(0) to 0 without cleaning tx_ring, slot 0 sends tx_ring->dma data and stalls TX cleanup. [Severity: Medium] Does calling e1000e_reset() unconditionally here cause a second full hardware reset on every S3/S0ix resume, S4 restore, and PCI error recovery? e1000e_pm_thaw() is also called by e1000e_pm_resume() right after __e1000_resume() has already called e1000e_reset() and e1000_init_manageability_pt(), and by e1000_io_resume() after e1000_io_slot_reset() has already reset the adapter. Running a second reset under global rtnl_lock() adds 35 to 60+ ms of resume latency (including a 10 ms busy-wait in e1000e_get_cfg_done_generic()) and blocks other asynchronously resuming network devices. If e1000_request_irq() fails, the redundant reset also wipes the manageability pass-through setup from e1000_init_manageability_pt(). Should the reset only run from the standalone .thaw callback, for example via a helper taking a bool reset parameter? --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203095751.1446= 451-1-dima.ruinskiy@intel.com?part=3D1