[PATCH net-next 16/16] net: stmmac: visconti: use stmmac_get_phy_intf_sel()
Maxime Chevallier
maxime.chevallier at bootlin.com
Sun Nov 9 08:38:45 PST 2025
On 08/11/2025 08:58, Russell King (Oracle) wrote:
> On Fri, Nov 07, 2025 at 07:23:26PM +0100, Maxime Chevallier wrote:
>> Hi Russell,
>>
>> On 07/11/2025 15:29, Russell King (Oracle) wrote:
>>> - switch (plat_dat->phy_interface) {
>>> - case PHY_INTERFACE_MODE_RGMII:
>>> - case PHY_INTERFACE_MODE_RGMII_ID:
>>> - case PHY_INTERFACE_MODE_RGMII_RXID:
>>> - case PHY_INTERFACE_MODE_RGMII_TXID:
>>> - phy_intf_sel = ETHER_CONFIG_INTF_RGMII;
>>> - break;
>>> - case PHY_INTERFACE_MODE_MII:
>>> - phy_intf_sel = ETHER_CONFIG_INTF_MII;
>>> - break;
>>> - case PHY_INTERFACE_MODE_RMII:
>>> - phy_intf_sel = ETHER_CONFIG_INTF_RMII;
>>> - break;
>>> - default:
>>> + int phy_intf_sel;
>>> +
>>> + phy_intf_sel = stmmac_get_phy_intf_sel(plat_dat->phy_interface);
>>> + if (phy_intf_sel != PHY_INTF_SEL_GMII_MII &&
>>> + phy_intf_sel != PHY_INTF_SEL_RGMII &&
>>> + phy_intf_sel != PHY_INTF_SEL_RMII) {
>>> dev_err(&pdev->dev, "Unsupported phy-mode (%d)\n", plat_dat->phy_interface);
>>> return -EOPNOTSUPP;
>>> }
>>
>> Probably not too big of a deal, but don't we now incorrectly accept the
>> "gmii" mode ?
>
> We will accept GMII mode, but (a) does that matter, and (b) shouldn't
> the DT binding be checking the phy-mode (we have some bindings that do.)
Thanks for the clarification, that's fine by me then :)
Maxime
More information about the Linux-mediatek
mailing list