From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ECF5935E1AE for ; Tue, 4 Aug 2026 11:35:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785843339; cv=none; b=GyS/4+RqZ1D2HvdMGpKq9aHuaoQg//mvdGakzFoUsi6FQPRwH2GGAtTdzZEMKz9/gDrBxolWgc9FUgIRS7CtVm66b49HrQkQQZAhl3EG8dMn7Gh1GMVDQ92GiYVSOqKWpCX2KLtufxB9joTzIdgWunjKhQyeAHoHwVU1HcV9Sc8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785843339; c=relaxed/simple; bh=eG0RFUZjcwUsngo8jMc0RSRwUDp+/m+lU3rnsR26qXA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Io1cGh/0xf8Ak4vWDZXDPAPJ667WWmy++3JfCkD/ANlYu+4yqnQdcU0o9axVMtpspfrNqKxaBfKjGFrXG5RUdx5IcQeOEp9pGBgeCNPAdrtrac+M3+jeg1nQn0pwGGohMFafQtiVsTm7Uyfg2FT5+xLDM52KfAONKqwHkpA2/vw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BKs1Woo5; arc=none smtp.client-ip=209.85.215.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BKs1Woo5" Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-c9e7391839cso3945090a12.0 for ; Tue, 04 Aug 2026 04:35:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785843337; x=1786448137; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=uNVTFfdfEZG90+jAE3BzNE+piQiVWzc95vgbhLXgILA=; b=BKs1Woo5URfJ5kDfQ+z9YbJslopDx79/r+BcbYYD/dQPqz95ZTZL73ys300wr6nBh/ Ma8Zlz4u4C5fIdt2qkiOtDMngAP+e0szg+KNxoQ+NwEVn3JwhixRIzxcV4yJDlHpvlPQ aPnh5/RvvF8U9snS8IRvGm6SCZyqYlRttgb0x9vEWlYZBaenu5+ySTEfDyoiAn3HF6GL WaHy7eRx2zdmp787lO+18bbuEZwJseJO6ZuK9FVwO9H+6xh5z1EmjCxHzzXwkobjfuUx b8VXeVMeVc/+3rA6CX7Rq+mhyzTRzqurD3KEcXbdnrYdC4uvwm77V8/Ld2lcLYG7CDdR zHvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785843337; x=1786448137; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=uNVTFfdfEZG90+jAE3BzNE+piQiVWzc95vgbhLXgILA=; b=dxjipZM4amg872n1xUeZhinvDTlfPau/BLZa1MiqE2MO14tyAqXf7I/vjKcozb7cNI oPoiUc+hfkTW3c9Hn4eHqIe8TZncr0jIeLNRgS2Sw+diBi0GG//AWKWL0tEzr6VufQXa OnrHdZIsIyxOgwmjHTHmd+sobwEunsC3nybsVgaZqCXDENihEUOejdns7+FKkkELFMCz PzlaGIQoYrdpjOGT83Na2noHikF3lm7qMRmVSqhMZmfdctBGauXnP7eNhmHrsju4BrEa qpVZ7Vhdk2fh94wyHZSF7UZhIEX6MdE8crkEulRl+MfFjY0M3mPuwHUrhn0MJs2PeUp/ HxdA== X-Forwarded-Encrypted: i=1; AHgh+RoKaD0ytHgEjbrdxu/zcgQqQLkyGdI1r2+aT8lZB71YhUj32XwD9kCr4Tk4A/rb45lfm/pi1ON3DzChiHk=@vger.kernel.org X-Gm-Message-State: AOJu0YwLKzPGfM++Ej8cGZ5Zk0k+U/QvaZs5c683Yt3NBq6V8aGkUgIh vJUYZEVA8rWsPi9VeXhR67Tb/za81cwUBNzlS796JYvJUrYxVxR20vDR X-Gm-Gg: AR+sD11PrQ/DW2b9nxpM54jbBd5JZjFDfguRjDRi+Co+oRt4PDySUGqjQGuGjdguw9R jaHYdXS2bXB/bxmUZhddJtITD2u2gfQT2DsvW0pIwF+yd+V56o6CtfUO3AODFHWUVlGQsVFo4KN e7waMXFftrUYo456GEqSoXzEO6kfC4RF1Cbx0BMGK9bxToc12t7gTBPpfJr6yoPN8I1u3KWsAa3 ciwE8KX6ePhNQgJFjPzayjEQCn544oI6Wd215ry+bj2ldEWG2RPfgPXMWvJeS0DNX6mIIygrZ6U FZAoB6hn49AyWG955kurIgamYqgh+7iD1cW3JWNxFI1Od+xVkZlENTuGUhjnsk++u1jlGI25MJx uhFYTUjOlwrQQiGMXVb1+s/Rxxl8xGRsMqv6AzIf7u5aau0Q+Z6VtqFzan7HA7u0VmVLGB6Mj9Z jTz9tePwdixxhxFEtzArF0e2DtIZ5FcPglErYaZ1yWrAIrmecyS2RydxmTY0DA3BTFVuVq X-Received: by 2002:a05:6a21:3a47:b0:3c0:278c:6a31 with SMTP id adf61e73a8af0-3c92a51df73mr13770829637.11.1785843337304; Tue, 04 Aug 2026 04:35:37 -0700 (PDT) Received: from DESKTOP-TIT0J8O.dm.ae ([49.47.198.15]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-13fca63ce12sm3569493c88.5.2026.08.04.04.35.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Aug 2026 04:35:36 -0700 (PDT) From: Ahmed Naseef To: netdev@vger.kernel.org Cc: "David S. Miller" , Andrew Lunn , AngeloGioacchino Del Regno , Daniel Golle , Eric Dumazet , Heiner Kallweit , Jakub Kicinski , Matthias Brugger , Paolo Abeni , Qingfang Deng , Russell King , SkyLake Huang , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Ahmed Naseef Subject: [PATCH net] net: phy: mediatek: fix TX blink masks using the RX bits Date: Tue, 4 Aug 2026 15:35:11 +0400 Message-Id: <20260804113511.3371248-1-naseefkm@gmail.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit MTK_GPHY_LED_TX_BLINK_SET and MTK_2P5GPHY_LED_TX_BLINK_SET are built from the RX blink bits instead of the TX ones, so both TX masks are identical to their RX counterparts. The TX bits they should be using, MTK_PHY_LED_BLINK_{10,100,1000,2500}TX, are otherwise only referenced by the per-speed branch of mtk_phy_led_hw_ctrl_set(). A TX trigger selected without a link trigger therefore programs the RX blink bits, and the LED blinks on received traffic. The masks are also used to decode the blink register in mtk_phy_led_hw_ctrl_get(), which as a result cannot tell the two triggers apart: an RX-only configuration reads back as RX and TX, and a TX-only configuration reads back as neither. Fixes: 7f9c320c98db ("net: phy: mediatek: Move LED helper functions into mtk phy lib") Cc: stable@vger.kernel.org Signed-off-by: Ahmed Naseef --- drivers/net/phy/mediatek/mtk.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/phy/mediatek/mtk.h b/drivers/net/phy/mediatek/mtk.h index 320f76ffa81f..79e09727b81b 100644 --- a/drivers/net/phy/mediatek/mtk.h +++ b/drivers/net/phy/mediatek/mtk.h @@ -53,15 +53,15 @@ #define MTK_GPHY_LED_RX_BLINK_SET (MTK_PHY_LED_BLINK_1000RX | \ MTK_PHY_LED_BLINK_100RX | \ MTK_PHY_LED_BLINK_10RX) -#define MTK_GPHY_LED_TX_BLINK_SET (MTK_PHY_LED_BLINK_1000RX | \ - MTK_PHY_LED_BLINK_100RX | \ - MTK_PHY_LED_BLINK_10RX) +#define MTK_GPHY_LED_TX_BLINK_SET (MTK_PHY_LED_BLINK_1000TX | \ + MTK_PHY_LED_BLINK_100TX | \ + MTK_PHY_LED_BLINK_10TX) #define MTK_2P5GPHY_LED_ON_SET (MTK_PHY_LED_ON_LINK2500 | \ MTK_GPHY_LED_ON_SET) #define MTK_2P5GPHY_LED_RX_BLINK_SET (MTK_PHY_LED_BLINK_2500RX | \ MTK_GPHY_LED_RX_BLINK_SET) -#define MTK_2P5GPHY_LED_TX_BLINK_SET (MTK_PHY_LED_BLINK_2500RX | \ +#define MTK_2P5GPHY_LED_TX_BLINK_SET (MTK_PHY_LED_BLINK_2500TX | \ MTK_GPHY_LED_TX_BLINK_SET) #define MTK_PHY_LED_STATE_FORCE_ON 0 base-commit: 1a35da325cac4d5bcad76a2aa943408a6f1d9000 -- 2.34.1