All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Wei Fang <wei.fang@nxp.com>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	Shenwei Wang <shenwei.wang@nxp.com>,
	Clark Wang <xiaoning.wang@nxp.com>,
	dl-linux-imx <linux-imx@nxp.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 3/4] fec: add FIXME to move 'mac_managed_pm' to probe
Date: Thu, 16 Mar 2023 09:02:17 +0100	[thread overview]
Message-ID: <ZBLNCYgeTtNBSaMi@ninjato> (raw)
In-Reply-To: <ZBFzVjaRjcITP0bA@ninjato>

[-- Attachment #1: Type: text/plain, Size: 1355 bytes --]


> Yes, I will resend the series as RFC with more explanations.

Because I was able to fix SMSC myself, I'll just describe the procedure
here:

1) apply this debug patch:

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 1b2e253fce75..7b79c5979486 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -310,6 +310,8 @@ static __maybe_unused int mdio_bus_phy_suspend(struct device *dev)
 	if (phydev->mac_managed_pm)
 		return 0;
 
+printk(KERN_INFO "****** MDIO suspend\n");
+
 	/* Wakeup interrupts may occur during the system sleep transition when
 	 * the PHY is inaccessible. Set flag to postpone handling until the PHY
 	 * has resumed. Wait for concurrent interrupt handler to complete.

2) boot the device without bringing the interface (and thus the PHY) up.
   Bringing it down after it was up is not the same! It is important
   that it was never up before.

3) do a suspend-to-ram/resume cycle

4) your log should show the above debug message. If not, I was wrong

5) If yes, apply a similar fix to the one I did for the Renesas drivers
   in this series

6) suspend/resume should not show the debug message anymore

7) test for regressions and send out :)

I hope this was understandable. If not, feel free to ask.

Happy hacking,

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-03-16  8:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14 13:14 [PATCH net 0/4] net: set 'mac_managed_pm' at probe time Wolfram Sang
2023-03-14 13:14 ` [PATCH net 1/4] ravb: avoid PHY being resumed when interface is not up Wolfram Sang
2023-03-14 13:14 ` [PATCH net 2/4] sh_eth: " Wolfram Sang
2023-03-14 13:14 ` [PATCH net-next 3/4] fec: add FIXME to move 'mac_managed_pm' to probe Wolfram Sang
2023-03-15  5:48   ` Wei Fang
2023-03-15  7:27     ` Wolfram Sang
2023-03-16  8:02       ` Wolfram Sang [this message]
2023-03-16  9:10         ` Wei Fang
2023-03-16 13:53           ` Wolfram Sang
2023-03-14 13:14 ` [PATCH net-next 4/4] smsc911x: " Wolfram Sang
2023-03-15  8:50   ` Geert Uytterhoeven
2023-03-15  8:52     ` Wolfram Sang
2023-03-14 15:56 ` [PATCH net 0/4] net: set 'mac_managed_pm' at probe time Michal Kubiak
2023-03-14 16:40 ` Simon Horman
2023-03-15  7:26   ` Wolfram Sang

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=ZBLNCYgeTtNBSaMi@ninjato \
    --to=wsa+renesas@sang-engineering.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shenwei.wang@nxp.com \
    --cc=wei.fang@nxp.com \
    --cc=xiaoning.wang@nxp.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.