Re: [PATCH net-next 07/13] net: mvpp2: improve the link management function

From: Antoine Tenart
Date: Thu Aug 24 2017 - 10:14:31 EST


Hi Andrew,

On Thu, Aug 24, 2017 at 04:06:25PM +0200, Andrew Lunn wrote:
> On Thu, Aug 24, 2017 at 10:38:17AM +0200, Antoine Tenart wrote:
> > @@ -5753,14 +5753,24 @@ static void mvpp2_link_event(struct net_device *dev)
> > port->link = phydev->link;
> >
> > if (phydev->link) {
> > + mvpp2_interrupts_enable(port);
> > + mvpp2_port_enable(port);
> > +
> > mvpp2_egress_enable(port);
> > mvpp2_ingress_enable(port);
> > + netif_carrier_on(dev);
>
> Have you seen cases where it is required to change the carrier state?
> The phy state machine should be doing this. e.g. when autoneg has
> completed, force link configuration, the link goes down etc.

I don't think I saw a case where this was needed. And if phylib already
handle this I think it should be removed from here as the
mvpp2_link_event only is called by phylib.

Thanks!
Antoine

--
Antoine Ténart, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

Attachment: signature.asc
Description: PGP signature