From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Jon Hunter <jonathanh@nvidia.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, netdev@vger.kernel.org,
linux-tegra <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH net-next v2 4/8] net: usb: asix: ax88772: add phylib support
Date: Thu, 10 Jun 2021 16:22:31 +0200 [thread overview]
Message-ID: <20210610142231.jwan57reetfsuyjw@pengutronix.de> (raw)
In-Reply-To: <0ebb1698-cd52-d8ad-b5cc-045d29ea964f@nvidia.com>
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 |
next prev parent reply other threads:[~2021-06-10 14:22 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-07 8:27 [PATCH net-next v2 0/8] port asix ax88772 to the PHYlib Oleksij Rempel
2021-06-07 8:27 ` [PATCH net-next v2 1/8] net: usb: asix: ax88772_bind: use devm_kzalloc() instead of kzalloc() Oleksij Rempel
2021-06-07 8:27 ` [PATCH net-next v2 2/8] net: usb: asix: refactor asix_read_phy_addr() and handle errors on return Oleksij Rempel
2021-06-07 8:27 ` [PATCH net-next v2 3/8] net: usb/phy: asix: add support for ax88772A/C PHYs Oleksij Rempel
2021-06-07 8:27 ` [PATCH net-next v2 4/8] net: usb: asix: ax88772: add phylib support Oleksij Rempel
[not found] ` <CGME20210609095923eucas1p2e692c9a482151742d543316c91f29802@eucas1p2.samsung.com>
2021-06-09 9:59 ` Marek Szyprowski
2021-06-09 12:46 ` Oleksij Rempel
2021-06-09 13:12 ` Heiner Kallweit
2021-06-10 13:36 ` Oleksij Rempel
2021-06-10 10:31 ` Marek Szyprowski
2021-06-10 12:54 ` Jon Hunter
2021-06-10 14:22 ` Oleksij Rempel [this message]
[not found] ` <CGME20210618083914eucas1p240f88e7064a7bf15b68370b7506d24a9@eucas1p2.samsung.com>
2021-06-18 8:39 ` Marek Szyprowski
2021-06-18 10:13 ` Oleksij Rempel
2021-06-18 10:45 ` Marek Szyprowski
2021-06-18 10:57 ` Marek Szyprowski
2021-06-18 13:10 ` Oleksij Rempel
2021-06-18 11:04 ` Heiner Kallweit
2021-06-18 11:11 ` Marek Szyprowski
2021-06-18 13:20 ` Oleksij Rempel
2021-06-21 6:05 ` Marek Szyprowski
2021-06-23 7:06 ` Oleksij Rempel
2021-06-28 8:27 ` Marek Szyprowski
2021-06-07 8:27 ` [PATCH net-next v2 5/8] net: usb: asix: ax88772: add generic selftest support Oleksij Rempel
2021-06-07 8:27 ` [PATCH net-next v2 6/8] net: usb: asix: add error handling for asix_mdio_* functions Oleksij Rempel
2021-06-07 8:27 ` [PATCH net-next v2 7/8] net: phy: do not print dump stack if device was removed Oleksij Rempel
2021-06-07 8:27 ` [PATCH net-next v2 8/8] usbnet: run unbind() before unregister_netdev() Oleksij Rempel
2021-06-07 20:40 ` [PATCH net-next v2 0/8] port asix ax88772 to the PHYlib patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210610142231.jwan57reetfsuyjw@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=m.szyprowski@samsung.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).