[PATCH v2 4/4] net: mtip: The L2 switch driver for imx287

Lukasz Majewski lukma at denx.de
Mon Mar 31 00:00:33 PDT 2025


Hi Andrew.

> > > > +	/* Prevent a state halted on mii error */
> > > > +	if (fep->mii_timeout && phy_dev->state == PHY_HALTED) {
> > > > +		phy_dev->state = PHY_UP;
> > > > +		goto spin_unlock;
> > > > +	}    
> > > 
> > > A MAC driver should not be playing around with the internal state
> > > of phylib.  
> > 
> > Ok, I've replaced it with PHY API calls (phy_start() and
> > phy_is_started()).  
> 
> phy_start() and phy_stop() should be used in pairs. It is not good to
> call start more often than stop.
> 
> What exactly is going on here? Why would there be MII errors?
> 

Exactly.

I've double check it - this can be safely dropped.

> 	Andrew


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250331/a0a34955/attachment.sig>


More information about the linux-arm-kernel mailing list