From: Stefan Chulski <stefanc@marvell.com>
To: Antoine Tenart <antoine.tenart@free-electrons.com>,
Andrew Lunn <andrew@lunn.ch>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"kishon@ti.com" <kishon@ti.com>,
"gregory.clement@free-electrons.com"
<gregory.clement@free-electrons.com>,
"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
"mw@semihalf.com" <mw@semihalf.com>,
Yan Markman <ymarkman@marvell.com>,
"thomas.petazzoni@free-electrons.com"
<thomas.petazzoni@free-electrons.com>,
"miquel.raynal@free-electrons.com"
<miquel.raynal@free-electrons.com>,
Nadav Haklai <nadavh@marvell.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [EXT] Re: [PATCH net-next v2 4/4] net: mvpp2: 2500baseX support
Date: Wed, 3 Jan 2018 15:50:35 +0000 [thread overview]
Message-ID: <6a14004f0f70462b88136162eeae1ee1@IL-EXCH01.marvell.com> (raw)
In-Reply-To: <20180103153227.GA9227@kwain>
> -----Original Message-----
> From: Antoine Tenart [mailto:antoine.tenart@free-electrons.com]
> Sent: Wednesday, January 03, 2018 5:32 PM
> To: Andrew Lunn <andrew@lunn.ch>
> Cc: Antoine Tenart <antoine.tenart@free-electrons.com>;
> davem@davemloft.net; kishon@ti.com; gregory.clement@free-electrons.com;
> linux@armlinux.org.uk; mw@semihalf.com; Stefan Chulski
> <stefanc@marvell.com>; Yan Markman <ymarkman@marvell.com>;
> thomas.petazzoni@free-electrons.com; miquel.raynal@free-electrons.com;
> Nadav Haklai <nadavh@marvell.com>; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: [EXT] Re: [PATCH net-next v2 4/4] net: mvpp2: 2500baseX support
>
> External Email
>
> ----------------------------------------------------------------------
> Hi Andrew,
>
> On Wed, Jan 03, 2018 at 04:20:36PM +0100, Andrew Lunn wrote:
> > > @@ -4612,6 +4616,9 @@ static int mvpp22_comphy_init(struct
> mvpp2_port *port)
> > > case PHY_INTERFACE_MODE_1000BASEX:
> > > mode = PHY_MODE_SGMII;
> > > break;
> > > + case PHY_INTERFACE_MODE_2500BASEX:
> > > + mode = PHY_MODE_2500SGMII;
> > > + break;
> >
> > I think this is the source of confusion with linux/phy.h and
> > linux/phy/phy.h.
> >
> > What would PHY_INTERFACE_MODE_2500SGMII use?
> >
> > Where is this all getting confused? Should the caller to
> > mvpp22_comphy_init() actually be passing
> PHY_INTERFACE_MODE_2500SGMII?
> > What is the MAC actually doing at this point? 2500BASEX or 2500SGMII?
>
> PHY_INTERFACE_MODE_2500BASEX is the PHY mode whereas
> PHY_MODE_2500SGMII is the mode used by the common PHY driver (i.e. the
> one configuring the serdes lanes).
>
> There's no PHY_INTERFACE_MODE_2500SGMII mode.
>
> > At minimum there needs to be a comment that this is not a typ0,
> > otherwise you are going to get patches submitted to 'fix' this.
>
> Sure, I can add a comment to state this function is a translation between the
> net PHY mode and the generic PHY mode (it's a n-to-1 translation).
>
Maybe we should rename enum phy_mode to comphy_mode and PHY_MODE_2500SGMII to COMPHY_MODE_2500SGMII.
Since this enum set MAC to PHY serdes communication mode, not PHY to PHY communication mode.
Stefan.
next prev parent reply other threads:[~2018-01-03 15:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-03 15:07 [PATCH net-next v2 0/4] net: mvpp2: 1000BaseX and 2000BaseX support Antoine Tenart
2018-01-03 15:07 ` [PATCH net-next v2 1/4] phy: add 2.5G SGMII mode to the phy_mode enum Antoine Tenart
2018-01-03 15:07 ` [PATCH net-next v2 2/4] phy: cp110-comphy: 2.5G SGMII mode Antoine Tenart
2018-01-03 15:07 ` [PATCH net-next v2 3/4] net: mvpp2: 1000baseX support Antoine Tenart
2018-01-03 15:07 ` [PATCH net-next v2 4/4] net: mvpp2: 2500baseX support Antoine Tenart
2018-01-03 15:20 ` Andrew Lunn
2018-01-03 15:32 ` Antoine Tenart
2018-01-03 15:50 ` Stefan Chulski [this message]
2018-01-03 15:53 ` Andrew Lunn
2018-01-03 16:11 ` Stefan Chulski
2018-01-03 18:08 ` Antoine Tenart
2018-01-03 18:05 ` Russell King - ARM Linux
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=6a14004f0f70462b88136162eeae1ee1@IL-EXCH01.marvell.com \
--to=stefanc@marvell.com \
--cc=andrew@lunn.ch \
--cc=antoine.tenart@free-electrons.com \
--cc=davem@davemloft.net \
--cc=gregory.clement@free-electrons.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=miquel.raynal@free-electrons.com \
--cc=mw@semihalf.com \
--cc=nadavh@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.com \
--cc=ymarkman@marvell.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
all inboxes | Powered by JetHome®