lkml.org 
[lkml]   [2023]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v2 11/11] net: dsa: mt7530: use external PCS driver
On Fri, Feb 10, 2023 at 10:56:57AM +0000, Russell King (Oracle) wrote:
> On Tue, Feb 07, 2023 at 02:24:17PM +0000, Daniel Golle wrote:
> > @@ -2728,11 +2612,11 @@ mt753x_phylink_mac_select_pcs(struct dsa_switch *ds, int port,
> >
> > switch (interface) {
> > case PHY_INTERFACE_MODE_TRGMII:
> > + return &priv->pcs[port].pcs;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> > case PHY_INTERFACE_MODE_SGMII:
> > case PHY_INTERFACE_MODE_1000BASEX:
> > case PHY_INTERFACE_MODE_2500BASEX:
> > - return &priv->pcs[port].pcs;
> > -
> > + return priv->ports[port].sgmii_pcs;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> My only concern here is that we also use the PCS when in TRGMII mode in
> this driver, but the mtk pcs code from mtk_eth_soc doesn't handle
> TRGMII (and getting the link timer will fail for this mode, causing
> the pcs_config() method to fail.)
>
> Thus, this driver will stop working in TRGMII mode.

But in TRGMII mode we return &priv->pcs[port].pcs which is not the PCS
code from mtk_eth_soc now moved to the new pcs-mtk-lynxi driver, but
rather the old existing codepath from mt7530.c.

The new PCS driver only replaces mt7531_sgmii_pcs_* functions, which
were all nearly identical with what is now in pcs-mtk-lynxi.c.

Or do I miss something here?

\
 
 \ /
  Last update: 2023-03-27 00:17    [W:0.049 / U:1.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site