Re: [PATCH net-next v2 5/9] net: ethernet: oa_tc6: Adding vendor specific MMS
From: Andrew Lunn
Date: Mon May 11 2026 - 15:36:19 EST
> -static int oa_tc6_get_phy_c45_mms(int devnum)
> +static int oa_tc6_get_phy_c45_mms(struct oa_tc6 *tc6, int devnum)
> {
> switch (devnum) {
> case MDIO_MMD_PCS:
> @@ -456,6 +470,8 @@ static int oa_tc6_get_phy_c45_mms(int devnum)
> return OA_TC6_PHY_C45_AUTO_NEG_MMS5;
> case MDIO_MMD_POWER_UNIT:
> return OA_TC6_PHY_C45_POWER_UNIT_MMS6;
> + case MDIO_MMD_VEND1:
> + return tc6->vend1_mms;
MMS 0 would be against the specification. So i would do
case MDIO_MMD_VEND1:
if (!tc6->vend1_mms)
return -EOPNOTSUPP;
return tc6->vend1_mms;
That should catch uses of VEND1 without first defining the mapping to
the MMS.
Andrew