Re: [RFC PATCH] net: phy: micrel: reset KSZ9x31 when resuming

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 17, 2024 at 02:33:53PM +0100, Wolfram Sang wrote:
> > > +static int ksz9x31_resume(struct phy_device *phydev)
> > > +{
> > > +	phy_device_reset(phydev, 1);
> > > +	phy_device_reset(phydev, 0);
> > 
> > Is something like that fine?
> > Don't we need to reconfigure the ethernet phy completely on resume
> > if we do reset it? kszphy_config_reset() is taking care of something,
> > but I think that the phy being reset on resume is not handled
> > correctly.
> 
> If the interface is up before suspending, then suspend will assert the
> reset-line. If the interface is disabled before suspending, then close
> will assert the reset line. Deassertion will happen on resume/open.
> 
> So, unless I am overlooking something, my code does not really add
> something new. It only makes sure that the reset line always gets
> asserted before deasserting. Because in the case that the interface has
> never been up before, there is no instance which could assert reset. Or,
> at least, I could not find one.
> 
> Makes sense? Tests work fine here, at least.

What I do not know, is what happen to any configuration that was done to
the phy before.

What if you have disabled gigabit ethernet from auto negotiation before
suspend, it will be enabled again after the phy get out of reset.

Is the ethernet phy subsystem taking care of this? Ensuring that this
configuration is restored into the phy?

I was starting to debug something around this a few days ago, with the
difference that in that case the reset was asserted/de-asserted by the
hardware and the end results was not really the expected one ...

Francesco





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux