Linux Tegra architecture development
 help / color / mirror / Atom feed
* Re: [PATCH net-next v2 4/8] net: usb: asix: ax88772: add phylib support
       [not found]     ` <84ff1dab-ab0a-f27c-a948-e1ebdf778485@samsung.com>
@ 2021-06-10 12:54       ` Jon Hunter
  2021-06-10 14:22         ` Oleksij Rempel
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Hunter @ 2021-06-10 12:54 UTC (permalink / raw)
  To: Marek Szyprowski, Oleksij Rempel, David S. Miller, Jakub Kicinski,
	Andrew Lunn, Heiner Kallweit, Russell King
  Cc: kernel, linux-kernel, linux-usb, netdev, linux-tegra


On 09/06/2021 10:59, Marek Szyprowski wrote:
> Hi Oleksij,
> 
> On 07.06.2021 10:27, Oleksij Rempel wrote:
>> To be able to use ax88772 with external PHYs and use advantage of
>> existing PHY drivers, we need to port at least ax88772 part of asix
>> driver to the phylib framework.
>>
>> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> 
> This patch landed recently in linux-next as commit e532a096be0e ("net: 
> usb: asix: ax88772: add phylib support"). I found that it causes some 
> warnings on boards with those devices, see the following log:
> 
> root@target:~# time rtcwake -s10 -mmem
> rtcwake: wakeup from "mem" using /dev/rtc0 at Wed Jun  9 08:16:41 2021
> [  231.226579] PM: suspend entry (deep)
> [  231.231697] Filesystems sync: 0.002 seconds
> [  231.261761] Freezing user space processes ... (elapsed 0.002 seconds) 
> done.
> [  231.270526] OOM killer disabled.
> [  231.273557] Freezing remaining freezable tasks ... (elapsed 0.002 
> seconds) done.
> [  231.282229] printk: Suspending console(s) (use no_console_suspend to 
> debug)
> ...
> [  231.710852] Disabling non-boot CPUs ...
> ...
> [  231.901794] Enabling non-boot CPUs ...
> ...
> [  232.225640] usb usb3: root hub lost power or was reset
> [  232.225746] usb usb1: root hub lost power or was reset
> [  232.225864] usb usb5: root hub lost power or was reset
> [  232.226206] usb usb6: root hub lost power or was reset
> [  232.226207] usb usb4: root hub lost power or was reset
> [  232.297749] usb usb2: root hub lost power or was reset
> [  232.343227] asix 3-1:1.0 eth0: Failed to write reg index 0x0000: -22
> [  232.343293] asix 3-1:1.0 eth0: Failed to enable software MII access
> [  232.344486] asix 3-1:1.0 eth0: Failed to read reg index 0x0000: -22
> [  232.344512] asix 3-1:1.0 eth0: Failed to write reg index 0x0000: -22
> [  232.344529] PM: dpm_run_callback(): mdio_bus_phy_resume+0x0/0x78 
> returns -22
> [  232.344554] Asix Electronics AX88772C usb-003:002:10: PM: failed to 
> resume: error -22
> [  232.563712] usb 1-1: reset high-speed USB device number 2 using 
> exynos-ehci
> [  232.757653] usb 3-1: reset high-speed USB device number 2 using xhci-hcd
> [  233.730994] OOM killer enabled.
> [  233.734122] Restarting tasks ... done.
> [  233.754992] PM: suspend exit


I am seeing a similar problem on a couple of our Tegra boards that
use AX88772A device. When resuming from suspend I see ...

[   54.733266] PM: suspend entry (deep)

[   54.737179] Filesystems sync: 0.000 seconds

[   54.741904] Freezing user space processes ... (elapsed 0.001 seconds) done.

[   54.750895] OOM killer disabled.

[   54.754452] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.

[   54.763505] printk: Suspending console(s) (use no_console_suspend to debug)

[   54.898334] Disabling non-boot CPUs ...

[   54.899546] IRQ 26: no longer affine to CPU1

[   54.924373] Entering suspend state LP1

[   54.924493] Enabling non-boot CPUs ...

[   54.933164] CPU1 is up

[   55.005166] asix 3-1:1.0 eth0: Failed to write reg index 0x0000: -113

[   55.005226] asix 3-1:1.0 eth0: Failed to enable software MII access

[   55.006579] asix 3-1:1.0 eth0: Failed to read reg index 0x0000: -113

[   55.006722] asix 3-1:1.0 eth0: Failed to write reg index 0x0000: -113

[   55.006762] asix 3-1:1.0 eth0: Failed to enable software MII access


Interestingly once commit d275afb66371 ("net: usb: asix: add error
handling for asix_mdio_* functions") is applied, then resume from
suspend completely fails because the error is propagated. Bisect
is pointing to that patch, however, it is this patch that is
causing the problem.

Cheers
Jon

-- 
nvpublic

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next v2 4/8] net: usb: asix: ax88772: add phylib support
  2021-06-10 12:54       ` [PATCH net-next v2 4/8] net: usb: asix: ax88772: add phylib support Jon Hunter
@ 2021-06-10 14:22         ` Oleksij Rempel
  0 siblings, 0 replies; 2+ messages in thread
From: Oleksij Rempel @ 2021-06-10 14:22 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Marek Szyprowski, David S. Miller, Jakub Kicinski, Andrew Lunn,
	Heiner Kallweit, Russell King, kernel, linux-kernel, linux-usb,
	netdev, linux-tegra

Hi Marek and Jon,

I just send a patch to fix suspend/resume. It was tested on ax88772A and ax88772C
on iMX6 host. Can you please confirm if it works for you?

Regards,
Oleksij

net: usb: asix: ax88772: manage PHY PM from MAC 

On Thu, Jun 10, 2021 at 01:54:12PM +0100, Jon Hunter wrote:
> 
> On 09/06/2021 10:59, Marek Szyprowski wrote:
> > Hi Oleksij,
> > 
> > On 07.06.2021 10:27, Oleksij Rempel wrote:
> >> To be able to use ax88772 with external PHYs and use advantage of
> >> existing PHY drivers, we need to port at least ax88772 part of asix
> >> driver to the phylib framework.
> >>
> >> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> > 
> > This patch landed recently in linux-next as commit e532a096be0e ("net: 
> > usb: asix: ax88772: add phylib support"). I found that it causes some 
> > warnings on boards with those devices, see the following log:
> > 
> > root@target:~# time rtcwake -s10 -mmem
> > rtcwake: wakeup from "mem" using /dev/rtc0 at Wed Jun  9 08:16:41 2021
> > [  231.226579] PM: suspend entry (deep)
> > [  231.231697] Filesystems sync: 0.002 seconds
> > [  231.261761] Freezing user space processes ... (elapsed 0.002 seconds) 
> > done.
> > [  231.270526] OOM killer disabled.
> > [  231.273557] Freezing remaining freezable tasks ... (elapsed 0.002 
> > seconds) done.
> > [  231.282229] printk: Suspending console(s) (use no_console_suspend to 
> > debug)
> > ...
> > [  231.710852] Disabling non-boot CPUs ...
> > ...
> > [  231.901794] Enabling non-boot CPUs ...
> > ...
> > [  232.225640] usb usb3: root hub lost power or was reset
> > [  232.225746] usb usb1: root hub lost power or was reset
> > [  232.225864] usb usb5: root hub lost power or was reset
> > [  232.226206] usb usb6: root hub lost power or was reset
> > [  232.226207] usb usb4: root hub lost power or was reset
> > [  232.297749] usb usb2: root hub lost power or was reset
> > [  232.343227] asix 3-1:1.0 eth0: Failed to write reg index 0x0000: -22
> > [  232.343293] asix 3-1:1.0 eth0: Failed to enable software MII access
> > [  232.344486] asix 3-1:1.0 eth0: Failed to read reg index 0x0000: -22
> > [  232.344512] asix 3-1:1.0 eth0: Failed to write reg index 0x0000: -22
> > [  232.344529] PM: dpm_run_callback(): mdio_bus_phy_resume+0x0/0x78 
> > returns -22
> > [  232.344554] Asix Electronics AX88772C usb-003:002:10: PM: failed to 
> > resume: error -22
> > [  232.563712] usb 1-1: reset high-speed USB device number 2 using 
> > exynos-ehci
> > [  232.757653] usb 3-1: reset high-speed USB device number 2 using xhci-hcd
> > [  233.730994] OOM killer enabled.
> > [  233.734122] Restarting tasks ... done.
> > [  233.754992] PM: suspend exit
> 
> 
> I am seeing a similar problem on a couple of our Tegra boards that
> use AX88772A device. When resuming from suspend I see ...
> 
> [   54.733266] PM: suspend entry (deep)
> 
> [   54.737179] Filesystems sync: 0.000 seconds
> 
> [   54.741904] Freezing user space processes ... (elapsed 0.001 seconds) done.
> 
> [   54.750895] OOM killer disabled.
> 
> [   54.754452] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
> 
> [   54.763505] printk: Suspending console(s) (use no_console_suspend to debug)
> 
> [   54.898334] Disabling non-boot CPUs ...
> 
> [   54.899546] IRQ 26: no longer affine to CPU1
> 
> [   54.924373] Entering suspend state LP1
> 
> [   54.924493] Enabling non-boot CPUs ...
> 
> [   54.933164] CPU1 is up
> 
> [   55.005166] asix 3-1:1.0 eth0: Failed to write reg index 0x0000: -113
> 
> [   55.005226] asix 3-1:1.0 eth0: Failed to enable software MII access
> 
> [   55.006579] asix 3-1:1.0 eth0: Failed to read reg index 0x0000: -113
> 
> [   55.006722] asix 3-1:1.0 eth0: Failed to write reg index 0x0000: -113
> 
> [   55.006762] asix 3-1:1.0 eth0: Failed to enable software MII access
> 
> 
> Interestingly once commit d275afb66371 ("net: usb: asix: add error
> handling for asix_mdio_* functions") is applied, then resume from
> suspend completely fails because the error is propagated. Bisect
> is pointing to that patch, however, it is this patch that is
> causing the problem.
> 
> Cheers
> Jon
> 
> -- 
> nvpublic
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-10 14:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20210607082727.26045-1-o.rempel@pengutronix.de>
     [not found] ` <20210607082727.26045-5-o.rempel@pengutronix.de>
     [not found]   ` <CGME20210609095923eucas1p2e692c9a482151742d543316c91f29802@eucas1p2.samsung.com>
     [not found]     ` <84ff1dab-ab0a-f27c-a948-e1ebdf778485@samsung.com>
2021-06-10 12:54       ` [PATCH net-next v2 4/8] net: usb: asix: ax88772: add phylib support Jon Hunter
2021-06-10 14:22         ` Oleksij Rempel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox