From patchwork Tue Oct 15 09:38:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: En-Wei Wu X-Patchwork-Id: 1997285 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XSTYj0fhfz1xsc for ; Tue, 15 Oct 2024 20:38:33 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1t0e0X-0007wS-7q; Tue, 15 Oct 2024 09:38:25 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1t0e0V-0007w7-Fl for kernel-team@lists.ubuntu.com; Tue, 15 Oct 2024 09:38:23 +0000 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 268FD3F740 for ; Tue, 15 Oct 2024 09:38:23 +0000 (UTC) Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4312731c7bfso15278135e9.1 for ; Tue, 15 Oct 2024 02:38:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728985102; x=1729589902; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tu6csdfLErbXQSFdiz0wpLc34ad5GH9ab7oc4hqN2cM=; b=wyVvl5lhierwafcf8h1oRUDmX8BjSTLUhzLnQREgKw5S29uwc3Mlv+7eEbQqyBNv71 19OVFyl9Q8dwtp+w2MT7JOY24k7jn3iy0jg6pXgt8KizZPDUPb+1Tims7AwgjmbURWtV DDtkwVlhTrsVvut6OhOHbAccSvxCLvmynkQfYl2mvm7E+MBEm7wOysYSlw9TI7E3HO2b sKghuVyZBrmGWHTxJdSDuHMhy6BqCKB1VBgS5CXmrBS44QXShuEl6p/z4lyWmD/EiqOc hQIU8D9Low8hUsg8SNLhLVRbCvI8DKiEmLUek0TWTRVvn0VYTsSZW48g1lub7KY74NjR /fHQ== X-Gm-Message-State: AOJu0YwoUvim9UlpMO/W00W+0ISq6srCZzuc79JVMTvIJtEW1NUEkfWj LXgDl3CdUlhStUSqfdK3EiFpGC9xK+cl0sJHfhFm6bp4Tvk7H+DwjQmDkcDoVQLpTEzsLDumpf0 rXufFReyd60i6SLsKCDaKcoF4B5i35ppqTC81m2vQZRJ3x9QgreUjyBLJlil13x16xNywV76RbR vTYBswjvwmB2fs X-Received: by 2002:a05:600c:45d1:b0:426:60b8:d8ba with SMTP id 5b1f17b1804b1-4311df47678mr128041365e9.28.1728985102124; Tue, 15 Oct 2024 02:38:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHh3WhIBmn2YUF1lziKcBUWurniyJHp9oRUB2aLWSeOSrEEbY1BVzq4XeZWKHlw22f1Yv0hBA== X-Received: by 2002:a05:600c:45d1:b0:426:60b8:d8ba with SMTP id 5b1f17b1804b1-4311df47678mr128041135e9.28.1728985101676; Tue, 15 Oct 2024 02:38:21 -0700 (PDT) Received: from rickywu0421-ThinkPad-X1-Carbon-Gen-11.. (dhcp-138-246-3-198.dynamic.eduroam.mwn.de. [138.246.3.198]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4313f55e054sm12443525e9.4.2024.10.15.02.38.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 02:38:21 -0700 (PDT) From: En-Wei Wu To: kernel-team@lists.ubuntu.com Subject: [SRU][N][PATCH 1/1] r8169: disable ALDPS per default for RTL8125 Date: Tue, 15 Oct 2024 11:38:20 +0200 Message-ID: <20241015093820.16581-2-en-wei.wu@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241015093820.16581-1-en-wei.wu@canonical.com> References: <20241015093820.16581-1-en-wei.wu@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Heiner Kallweit BugLink: https://bugs.launchpad.net/bugs/2084526 En-Wei reported that traffic breaks if cable is unplugged for more than 3s and then re-plugged. This was supposed to be fixed by 621735f59064 ("r8169: fix rare issue with broken rx after link-down on RTL8125"). But apparently this didn't fix the issue for everybody. The 3s threshold rang a bell, as this is the delay after which ALDPS kicks in. And indeed disabling ALDPS fixes the issue for this user. Maybe this fixes the issue in general. In a follow-up step we could remove the first fix attempt and see whether anybody complains. Fixes: f1bce4ad2f1c ("r8169: add support for RTL8125") Tested-by: En-Wei WU Signed-off-by: Heiner Kallweit Link: https://patch.msgid.link/778b9d86-05c4-4856-be59-cde4487b9e52@gmail.com Signed-off-by: Jakub Kicinski (cherry picked from commit b9c7ac4fe22c608acf6153a3329df2b6b6cd416c) Signed-off-by: En-Wei Wu Acked-by: Guoqing Jiang --- drivers/net/ethernet/realtek/r8169_phy_config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/realtek/r8169_phy_config.c b/drivers/net/ethernet/realtek/r8169_phy_config.c index 1f74317beb88..e1e5d9672ae4 100644 --- a/drivers/net/ethernet/realtek/r8169_phy_config.c +++ b/drivers/net/ethernet/realtek/r8169_phy_config.c @@ -1060,6 +1060,7 @@ static void rtl8125a_2_hw_phy_config(struct rtl8169_private *tp, phy_modify_paged(phydev, 0xa86, 0x15, 0x0001, 0x0000); rtl8168g_enable_gphy_10m(phydev); + rtl8168g_disable_aldps(phydev); rtl8125a_config_eee_phy(phydev); } @@ -1099,6 +1100,7 @@ static void rtl8125b_hw_phy_config(struct rtl8169_private *tp, phy_modify_paged(phydev, 0xbf8, 0x12, 0xe000, 0xa000); rtl8125_legacy_force_mode(phydev); + rtl8168g_disable_aldps(phydev); rtl8125b_config_eee_phy(phydev); }