Message ID | 20240531142430.678198-3-enguerrand.de-ribaucourt@savoirfairelinux.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Add Microchip KSZ 9897 Switch CPU PHY + Errata | expand |
> -----Original Message----- > From: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com> > Sent: Friday, May 31, 2024 7:24 AM > To: netdev@vger.kernel.org > Cc: andrew@lunn.ch; hkallweit1@gmail.com; linux@armlinux.org.uk; Woojung Huh - > C21699 <Woojung.Huh@microchip.com>; UNGLinuxDriver > <UNGLinuxDriver@microchip.com>; Enguerrand de Ribaucourt <enguerrand.de- > ribaucourt@savoirfairelinux.com> > Subject: [PATCH net v4 2/5] net: phy: micrel: disable suspend/resume callbacks > following errata > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content > is safe > > Microchip's erratas state that powering down a PHY may cause errors > on the adjacent PHYs due to the power supply noise. The suggested > workaround is to avoid toggling the powerdown bit dynamically while > traffic may be present. > > Fixes: fc3973a1fa09 ("phy: micrel: add Microchip KSZ 9477 Switch PHY support") > Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de- > ribaucourt@savoirfairelinux.com> > --- > v4: > - rebase on net/main > - add Fixes tag > v3: https://lore.kernel.org/all/20240530102436.226189-3-enguerrand.de- > ribaucourt@savoirfairelinux.com/ > --- > drivers/net/phy/micrel.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c > index 8a6dfaceeab3..2608d6cc7257 100644 > --- a/drivers/net/phy/micrel.c > +++ b/drivers/net/phy/micrel.c > @@ -5492,8 +5492,9 @@ static struct phy_driver ksphy_driver[] = { > .config_init = ksz9477_config_init, > .config_intr = kszphy_config_intr, > .handle_interrupt = kszphy_handle_interrupt, > - .suspend = genphy_suspend, > - .resume = genphy_resume, > + /* No suspend/resume callbacks because of errata DS80000758: > + * Toggling PHY Powerdown can cause errors or link failures in adjacent PHYs > + */ > .get_features = ksz9477_get_features, > }, { > .phy_id = PHY_ID_KSZ9897, KSZ9893 uses the same PHY driver as KSZ9477. KSZ9893 belongs to KSZ9893 family while KSZ9477 belongs to KSZ9897 family. They share most registers but KSZ9893 does not require PHY setup for link compatibility and does not have this PHY power up link lost issue, so it is not appropriate to completely disable PHY power down. PHY power down is executed when the network device is turned off. The PHY is powered up when the network device is turned on. This sometimes can cause other ports in KSZ9897 switch to lose link temporarily. The link will come back. In my opinion this problem does not impact much as the network devices are not likely to be turned off/on many times and likely to be turned off once during system initialization.
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 8a6dfaceeab3..2608d6cc7257 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -5492,8 +5492,9 @@ static struct phy_driver ksphy_driver[] = { .config_init = ksz9477_config_init, .config_intr = kszphy_config_intr, .handle_interrupt = kszphy_handle_interrupt, - .suspend = genphy_suspend, - .resume = genphy_resume, + /* No suspend/resume callbacks because of errata DS80000758: + * Toggling PHY Powerdown can cause errors or link failures in adjacent PHYs + */ .get_features = ksz9477_get_features, }, { .phy_id = PHY_ID_KSZ9897,
Microchip's erratas state that powering down a PHY may cause errors on the adjacent PHYs due to the power supply noise. The suggested workaround is to avoid toggling the powerdown bit dynamically while traffic may be present. Fixes: fc3973a1fa09 ("phy: micrel: add Microchip KSZ 9477 Switch PHY support") Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com> --- v4: - rebase on net/main - add Fixes tag v3: https://lore.kernel.org/all/20240530102436.226189-3-enguerrand.de-ribaucourt@savoirfairelinux.com/ --- drivers/net/phy/micrel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)