lkml.org 
[lkml]   [2021]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 net-next 06/10] net: dsa: microchip: add support for phylink management
From
Date
On Sat, 2021-07-31 at 18:27 +0300, Vladimir Oltean wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
>
> On Fri, Jul 23, 2021 at 11:01:04PM +0530, Prasanna Vengateshan wrote:
> > +static void lan937x_phylink_validate(struct dsa_switch *ds, int port,
> > +                                  unsigned long *supported,
> > +                                  struct phylink_link_state *state)
> > +{
> > +     struct ksz_device *dev = ds->priv;
> > +     __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
> > +
> > +     /* Check for unsupported interfaces */
> > +     if (!phy_interface_mode_is_rgmii(state->interface) &&
> > +         state->interface != PHY_INTERFACE_MODE_RMII &&
> > +         state->interface != PHY_INTERFACE_MODE_MII &&
> > +         state->interface != PHY_INTERFACE_MODE_INTERNAL) {
>
> According to include/linux/phylink.h, when phylink passes
> state->interface == PHY_INTERFACE_MODE_NA, you are expected to return
> all supported link modes.

Okay, Noted. i think PHY_INTERFACE_MODE_NA check should be added in all of the
'if' (==) checks down to the above one and including the above one (!=).

\
 
 \ /
  Last update: 2021-08-03 19:05    [W:0.059 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site