From: Andrew Lunn <andrew@lunn.ch>
To: Selvamani Rajagopal <Selvamani.Rajagopal@onsemi.com>
Cc: Piergiorgio Beruto <Pier.Beruto@onsemi.com>,
"parthiban.veerasooran@microchip.com"
<parthiban.veerasooran@microchip.com>,
"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v2 5/9] net: ethernet: oa_tc6: Adding vendor specific MMS
Date: Tue, 12 May 2026 16:02:17 +0200 [thread overview]
Message-ID: <758c0984-c9a5-4eba-ac1d-a0d165328e5e@lunn.ch> (raw)
In-Reply-To: <CY8PR02MB92490ED7D572EB0C124E4C1F83392@CY8PR02MB9249.namprd02.prod.outlook.com>
On Tue, May 12, 2026 at 04:57:01AM +0000, Selvamani Rajagopal wrote:
> [..]
>
> >
> > > -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.
>
>
> vend1_mms is initialized to -EOPNOTSUPP in oa_tc6_init. So, it won't be 0 by default.
Ah, missed that. So this is O.K.
Andrew
prev parent reply other threads:[~2026-05-12 14:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 18:19 [PATCH net-next v2 5/9] net: ethernet: oa_tc6: Adding vendor specific MMS Selvamani Rajagopal
2026-05-11 19:35 ` Andrew Lunn
2026-05-12 4:57 ` Selvamani Rajagopal
2026-05-12 14:02 ` Andrew Lunn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=758c0984-c9a5-4eba-ac1d-a0d165328e5e@lunn.ch \
--to=andrew@lunn.ch \
--cc=Pier.Beruto@onsemi.com \
--cc=Selvamani.Rajagopal@onsemi.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=parthiban.veerasooran@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox