From: Andrew Lunn <andrew@lunn.ch>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-renesas-soc@vger.kernel.org, netdev@vger.kernel.org,
Philippe Schenker <philippe.schenker@toradex.com>,
Francesco Dolcini <francesco.dolcini@toradex.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"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
Subject: Re: [RFC PATCH] net: phy: micrel: reset KSZ9x31 when resuming
Date: Tue, 9 Jan 2024 22:04:20 +0100 [thread overview]
Message-ID: <d9e86b0b-22cd-4055-90e1-44083ffbc05c@lunn.ch> (raw)
In-Reply-To: <20240109205223.40219-1-wsa+renesas@sang-engineering.com>
> +static int ksz9x31_resume(struct phy_device *phydev)
> +{
> + phy_device_reset(phydev, 1);
> + phy_device_reset(phydev, 0);
> +
> + return kszphy_resume(phydev);
> +}
> +
> static int kszphy_probe(struct phy_device *phydev)
> {
> const struct kszphy_type *type = phydev->drv->driver_data;
> @@ -4778,7 +4786,7 @@ static struct phy_driver ksphy_driver[] = {
> .get_strings = kszphy_get_strings,
> .get_stats = kszphy_get_stats,
> .suspend = kszphy_suspend,
> - .resume = kszphy_resume,
> + .resume = ksz9x31_resume,
Humm, i'm not so sure about this.
phy_resume() is called by mdio_bus_phy_resume(). That first does a
call to phy_init_hw(), which will perform a soft reset on the PHY,
call the drivers config_init() callback, and the config_intr()
callback. Then it calls phy_resume().
Does phy_resume() hitting it with a reset clear out the configuration
done by config_init() and the interrupt configuration performed by
config_intr()?
Andrew
next prev parent reply other threads:[~2024-01-09 21:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-09 20:52 Wolfram Sang
2024-01-09 21:04 ` Andrew Lunn [this message]
2024-01-17 13:59 ` Wolfram Sang
2024-01-09 23:28 ` Francesco Dolcini
2024-01-17 13:33 ` Wolfram Sang
2024-02-06 17:26 ` Francesco Dolcini
2024-02-06 17:57 ` Andrew Lunn
2024-02-06 19:09 ` Francesco Dolcini
2024-02-06 19:19 ` Andrew Lunn
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=d9e86b0b-22cd-4055-90e1-44083ffbc05c@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=francesco.dolcini@toradex.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=philippe.schenker@toradex.com \
--cc=wsa+renesas@sang-engineering.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®