lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 21 Nov 2013 18:42:22 -0800
From:	Florian Fainelli <f.fainelli@...il.com>
To:	Grant Grundler <grundler@...gle.com>
Cc:	David Miller <davem@...emloft.net>,
	Freddy Xin <freddy@...x.com.tw>,
	netdev <netdev@...r.kernel.org>, linux-usb@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>,
	davemloft <davemloft@...emloft.net>,
	ASIX Louis [蘇威陸] <louis@...x.com.tw>,
	Allan Chou <allan@...x.com.tw>,
	Daniel_ASIX <daniel@...x.com.tw>
Subject: Re: [PATCH 1/1] Workaround for Suspend/Resume issue of AX88772B under ChromeOS

2013/11/21 Grant Grundler <grundler@...gle.com>:
> On Thu, Nov 21, 2013 at 5:58 PM, Florian Fainelli <f.fainelli@...il.com> wrote:
> ...
>>> Freddy sent me a patch that saves/restores MII_ADVERTISE and MII_BMCR
>>> registers. Testing that now and he'll post if that all works out.
>
> Bad News: Freddy's patch didn't work and needs to be rework it.
>
>> That should be enough to ensure the PHY is put back into a consistent
>> state. So long as you are suspending/resuming from a configuration
>> where autoneg was enabled, I would not expect anything bad to happen.
>
> Well, I think davem NACK'd that approach (the original patch in this
> thread did that).
>
>> If the link was forced, that is a different story.
>>
>> One way to make sure this work properly without driver-specific code
>> is to include that functionality into the PHY library. As far as I can
>> see it the asix drivers do not use it but implement the old-style
>> mii_bus interface so that would be a first step.
>
> AFAICT, many USBNET drivers support mii_bus interface. Can you point
> at a good example of a USBNET driver that is supporting PHY lib?

drivers/net/usb/ax88172a.c implements the PHY library calls.

>
> I also didn't see anything in usbnet_resume() code path that calls
> into a phy lib. So it seems that some infrastructure still needs to
> happen if that's considered a feasible.

There are still some pending patches to make sure that suspend/resume
are properly being taken care of when issuing phy_stop/phy_start, but
once that is done, you would not have to call anything in
usbnet_resume(), the driver's ndo_open() callback would call
phy_start() which would resume the PHY into the state it was before
suspending.
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists