lkml.org 
[lkml]   [2024]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] net: phy: micrel: reset KSZ9x31 when resuming
> +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

\
 
 \ /
  Last update: 2024-01-09 22:06    [W:0.076 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site