[PATCH v2 net-next 11/14] net: dsa: netc: add phylink MAC operations
Paolo Abeni
pabeni at redhat.com
Tue Mar 24 19:13:32 AEDT 2026
On 3/23/26 10:30 AM, Russell King (Oracle) wrote:
> On Mon, Mar 23, 2026 at 02:07:49PM +0800, Wei Fang wrote:
>> +static void netc_port_set_mac_mode(struct netc_port *np,
>> + unsigned int mode,
>> + phy_interface_t phy_mode)
>> +{
>> + u32 mask = PM_IF_MODE_IFMODE | PM_IF_MODE_REVMII | PM_IF_MODE_ENA;
>> + u32 val = 0;
>> +
>> + switch (phy_mode) {
>> + case PHY_INTERFACE_MODE_RGMII:
>> + case PHY_INTERFACE_MODE_RGMII_ID:
>> + case PHY_INTERFACE_MODE_RGMII_RXID:
>> + case PHY_INTERFACE_MODE_RGMII_TXID:
>> + val |= IFMODE_RGMII;
>> + /* Enable auto-negotiation for the MAC if its
>> + * RGMII interface supports In-Band status.
>> + */
>> + if (phylink_autoneg_inband(mode))
>> + val |= PM_IF_MODE_ENA;
>
> I would prefer newer drivers not to use phylink_autoneg_inband()
> anymore. Note that there is no need to support RGMII inband in the
> kernel (nor is there any proper support without a "phylink_pcs"
> being present to provide the inband status.)
Would you mind sharing a patch adding a comment nearby
phylink_autoneg_inband(), explaining the above for future memory?
Thanks,
Paolo
More information about the Linuxppc-dev
mailing list