From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796255933; b=DN/uR0pKBP4yC+pEUVtDp9fV+iqFlecBSC+YOBerf/jXR64yD0f6mts2YsrOxj+qLKaS 8jNjmGmuHSPWFNbSDDJrw04yvzX1+cCNtmOOl4Pi1KhCf5n884CIZSNz6T/IvZlAazX9Q tcA+3DOhmm/w/YDjIqTgDHDEAuQBuBimr/4tyi0YwYtNB2bt7PQUxpkncXi8UTdwnERNP fzSpnp9yes1X9RsIOXK2Lx11P9h5RuwD0QfjLCSgBAEbf53rkM0PWCTojVzuLTBmTbDm1 +idkv8h/13Oc+O7L6HnTpe1URuh/Mv5M0cpC77fQuZw4QaQ+1pLAfIqZmsKaM0YoHrQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796255933; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=4cKmH/ZeXeLS8LebjV+MAm3iLvyGXh27nFew3cwH/oU=; b=HBdk4fAOZnIvNfPRF7uvyfjan+XTdTMNyZ82fNwk3PFRRB3CLZuWDqRETTbmrCDOwytS 5FfbbbefMFXmD/gQ9bh1ZioXOrsj8jYH+chorkx6dnHyvwmJlDolRbfGhVrZRhgzRKTxa iDINvOy3YatYE0OjsQ89LJhHabM6JNWj2u2a9/jpKXeh0u87BKm4mojNgAguVRP+st8Qg Au3C2F0xPig+arugc/8phPe7lTiD5zkloMsTdS7P5xXpYgm+eMn1M5G3xCeyrUcfw68Ha hdgOCLi7m19C1M8PEFQREgCZVLXRNhC0LuWK4pE+P+65xrwVp1iQjOu2iXr3cb0bQKw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="I4adJ/cO"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F070606A322; Wed, 2 Dec 2026 23:58:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=I4adJ/cO Received: by smtp.kernel.org (Postfix) with ESMTPSA id 027371F00896; Wed, 2 Dec 2026 23:58:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796255933; bh=4cKmH/ZeXeLS8LebjV+MAm3iLvyGXh27nFew3cwH/oU=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=I4adJ/cOeU9/E2EXpvDkFIEYah95pw6nQrHJdH7PdCG8yTFV1LryH4YekPzokSHC3 7NrphaXUCvT6gd5AGbusmM2JgXUbi6DEwO/9WWzsISg1LQhpD6cP7nVRvds92FO0z7 whWlOI0RfdQRsr3slhbawkrgCBdsmCZWTA0R+6rmHVVrZMN3gyGr5nUVVNO07pKO6I bHEX9/NS0sQZ3FfWnhL7x6g5aEZR4VwKliCK0NIf9clUf9glhPFK9Mj1akWe+uTKJn U3ryXqYxFPKfPZ5k+Jt0W9Bt4P2RJRbug6v1vl1jfSMsweo5j4JdN3eGznx9rAhSEz d7kh7x3nBB9Dw== Subject: Re: [PATCH net-next v18 05/15] net: dsa: realtek: rtl8365mb: set RGMII mode for family D From: netdev-bot+sashiko@kernel.org To: namiltd@yahoo.com Cc: linusw@kernel.org, andrew@lunn.ch, olteanv@gmail.com, kuba@kernel.org, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, linux@armlinux.org.uk, luizluca@gmail.com, maxime.chevallier@bootlin.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, alvin.sipraga@analog.com, gusfmora@gmail.com, kuncy7@gmail.com, fabianotassotti@gmail.com, gabonpivovich@gmail.com, contact@c127.dev, o.rempel@pengutronix.de Date: Wed, 02 Dec 2026 23:58:51 +0000 Message-ID: <179625593152.3146.8730462280005903743@kernel.org> In-Reply-To: <266ef365-4cbf-47c4-b92c-16d2935a44d2@yahoo.com> References: <266ef365-4cbf-47c4-b92c-16d2935a44d2@yahoo.com> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Thank you for your contribution! Sashiko AI review found more severe issue(s) in other patches of this series. This mail is only an FYI, in case you want to address the nit picks below when you respin. Low priority / nit picks for your consideration: - [Low] On family D EXT1, rtl8365mb_ext_config_rgmii() (drivers/net/dsa/realtek/rtl8365mb_main.c) sets TOP_CON0.MAC7_SEL_EXT1… -- net: dsa: realtek: rtl8365mb: set RGMII mode for family D On family D, this patch sets up the EXT1 pad drive and slew controls, clears the EXT1 RGMII TX delay field, binds the shared pins to MAC7 and disables SerDes 1 before it selects RGMII. It also stops advertising RGMII on port 7 in phylink_get_caps() when MAC4 already owns the EXT1 pins. > diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c > index 5c2e47074de4b..e239894392410 100644 > --- a/drivers/net/dsa/realtek/rtl8365mb_main.c > +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c [ ... ] > @@ -1279,6 +1310,54 @@ static int rtl8365mb_ext_config_rgmii(struct realtek_priv *priv, int port, > if (ret) > return ret; > > + if (rtl8365mb_is_d(priv) && extint->id == 1) { [ ... ] > + /* Bind the RGMII/MII pins to MAC7. MAC4 does not own them: > + * RGMII is not advertised otherwise, see > + * rtl8365mb_phylink_get_caps(). > + */ > + ret = regmap_update_bits(priv->map, > + RTL8365MB_D_REG_TOP_CON0, > + RTL8365MB_D_MAC7_SEL_EXT1_MASK, > + RTL8365MB_D_MAC7_SEL_EXT1_MASK); > + if (ret) > + return ret; > + > + ret = regmap_update_bits(priv->map, > + RTL8365MB_D_REG_SDS1_MISC0, > + RTL8365MB_D_SDS_MISC_MODE_FIELD_MASK, > + RTL8365MB_D_PORT_SDS_MODE_DISABLE); > + if (ret) > + return ret; > + } > + > ret = regmap_update_bits( > priv->map, RTL8365MB_DIGITAL_INTERFACE_SELECT_REG(extint->id), > RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_MASK(extint->id), [Severity: Low] Should SerDes 1 be disabled before TOP_CON0.MAC7_SEL_EXT1 is set, and not after? The commit message says: The TX delay field, the pin mux and the SerDes 1 disable are all programmed before RGMII is selected, so the shared pins are never driven by RGMII and SerDes 1 at the same time. That only holds if the EXT1 nibble of DIGITAL_INTERFACE_SELECT is not already RGMII when rtl8365mb_ext_config_rgmii() is entered. Nothing here reads or clears that nibble first. After rtl8365mb_reset_chip() its value comes from straps or EEPROM, and the commit message itself says the driver should not rely on those defaults. If that nibble is already RGMII and SerDes 1 is enabled, the pins are owned by both MAC7 RGMII and SerDes 1 between the TOP_CON0 write and the SDS1_MISC0 write. There is a second way to end up in the same state. If the SDS1_MISC0 regmap_update_bits() fails, the function returns with the pins muxed to MAC7 and SerDes 1 still enabled, and the TOP_CON0 change is not undone. The caller only logs the failure and returns void: rtl8365mb_phylink_mac_config() { ... ret = rtl8365mb_ext_config_rgmii(priv, port, state->interface); if (ret) dev_err(priv->dev, "failed to configure RGMII mode on port %d: %pe\n", port, ERR_PTR(ret)); return; ... } phylink then goes on to mac_link_up() with the pins in that state. If the SDS1_MISC0 write is moved ahead of the TOP_CON0 write, the window is gone whatever the entry state is. A failure part way through would then leave the pins with no owner instead of two. Whether such a strap state exists, and whether brief contention matters physically, depends on hardware behaviour that could not be checked against the vendor RTL8367D API. Even so, the guarantee in the commit message seems stronger than the code provides. [ ... ] -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/1383a67b-15e4-4c76-8bbf-65d3cbfa1fc1%40yahoo.com