Message ID | 137ce1ee-0b68-4c96-a717-c8164b514eec@martin-whitaker.me.uk (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Regression in KSZ9477 dsa driver - KSZ9567 et al. do not support EEE | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Guessing tree name failed - patch did not apply |
On Mon, 5 Aug 2024 13:15:49 +0100 Martin Whitaker wrote: > I have an embedded processor board running Linux that incorporates a > KSZ9567 ethernet switch. When using Linux 6.1 I can establish a stable > connection between two of these boards. When using Linux 6.6, the link > repeatedly drops and reconnects every few seconds. > > From bisection, this bug was introduced in the patch series "net: add > EEE support for KSZ9477 switch family" which was merged in commit > 9b0bf4f77162. > > As noted in the errata for these devices, EEE support is not fully > operational in the KSZ9477, KSZ9567, KSZ9896, and KSZ9897 devices, > causing link drops when connected to another device that supports EEE. > > A fix for this regression was merged in commit 08c6d8bae48c2, but only > for the KSZ9477. This fix should be extended to the other affected > devices as follows: Thanks for the analysis, adding to CC the folks who wrote the commits you mention. > diff --git a/drivers/net/dsa/microchip/ksz_common.c > b/drivers/net/dsa/microchip/ksz_common.c > index 419476d07fa2..091dae6ac921 100644 > --- a/drivers/net/dsa/microchip/ksz_common.c > +++ b/drivers/net/dsa/microchip/ksz_common.c > @@ -2346,6 +2346,9 @@ static u32 ksz_get_phy_flags(struct dsa_switch > *ds, int port) > return MICREL_KSZ8_P1_ERRATA; > break; > case KSZ9477_CHIP_ID: > + case KSZ9567_CHIP_ID: > + case KSZ9896_CHIP_ID: > + case KSZ9897_CHIP_ID: > /* KSZ9477 Errata DS80000754C > * > * Module 4: Energy Efficient Ethernet (EEE) feature > select must > > I have verified this fixes the bug for the KSZ9567 on my board. >
Hi Martin, On Mon, Aug 05, 2024 at 01:54:55PM -0700, Jakub Kicinski wrote: > On Mon, 5 Aug 2024 13:15:49 +0100 Martin Whitaker wrote: > > I have an embedded processor board running Linux that incorporates a > > KSZ9567 ethernet switch. When using Linux 6.1 I can establish a stable > > connection between two of these boards. When using Linux 6.6, the link > > repeatedly drops and reconnects every few seconds. > > > > From bisection, this bug was introduced in the patch series "net: add > > EEE support for KSZ9477 switch family" which was merged in commit > > 9b0bf4f77162. > > > > As noted in the errata for these devices, EEE support is not fully > > operational in the KSZ9477, KSZ9567, KSZ9896, and KSZ9897 devices, > > causing link drops when connected to another device that supports EEE. > > > > A fix for this regression was merged in commit 08c6d8bae48c2, but only > > for the KSZ9477. This fix should be extended to the other affected > > devices as follows: > > Thanks for the analysis, adding to CC the folks who wrote the commits > you mention. Thank you! > > diff --git a/drivers/net/dsa/microchip/ksz_common.c > > b/drivers/net/dsa/microchip/ksz_common.c > > index 419476d07fa2..091dae6ac921 100644 > > --- a/drivers/net/dsa/microchip/ksz_common.c > > +++ b/drivers/net/dsa/microchip/ksz_common.c > > @@ -2346,6 +2346,9 @@ static u32 ksz_get_phy_flags(struct dsa_switch > > *ds, int port) > > return MICREL_KSZ8_P1_ERRATA; > > break; > > case KSZ9477_CHIP_ID: > > + case KSZ9567_CHIP_ID: > > + case KSZ9896_CHIP_ID: > > + case KSZ9897_CHIP_ID: > > /* KSZ9477 Errata DS80000754C > > * > > * Module 4: Energy Efficient Ethernet (EEE) feature > > select must > > > > I have verified this fixes the bug for the KSZ9567 on my board. I can confirm it, Microchip officially removed EEE support from the datasheets for this chips and extended errata documentations. KSZ9567S-Errata-DS80000756.pdf Module 4: Energy Efficient Ethernet (EEE) feature select must be manually disabled KSZ9896C-Errata-DS80000757.pdf Module 3: Energy Efficient Ethernet (EEE) feature select must be manually disabled KSZ9897S-Errata-DS80000759.pdf Module 4: Energy Efficient Ethernet (EEE) feature select must be manually disabled Would you like to send this patch against net and add references to this erratum to the code? Regards, Oleksij
Hi Oleksij/Martin, On Tue, 2024-08-06 at 07:08 +0200, Oleksij Rempel wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you > know the content is safe > > Hi Martin, > > > > I can confirm it, Microchip officially removed EEE support from the > datasheets for this chips and extended errata documentations. > > KSZ9567S-Errata-DS80000756.pdf > Module 4: Energy Efficient Ethernet (EEE) feature select must be > manually disabled > > KSZ9896C-Errata-DS80000757.pdf > Module 3: Energy Efficient Ethernet (EEE) feature select must be > manually disabled > > KSZ9897S-Errata-DS80000759.pdf > Module 4: Energy Efficient Ethernet (EEE) feature select must be > manually disabled KSZ8567 Errata - DS80000753.pdf Module 4: 100BASE-TX Energy Efficient Ethernet (EEE) is subject to link drop KSZ8567 which is derivative product of KSZ9477, also has errata. But unlikely to others, errata states two options, 1. Have a workaround through registers. 2. Disable EEE. Atleast, for now with this patch set can include KSZ8567 as well for disabling EEE. May be in future workaround can be implemented.
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index 419476d07fa2..091dae6ac921 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -2346,6 +2346,9 @@ static u32 ksz_get_phy_flags(struct dsa_switch *ds, int port) return MICREL_KSZ8_P1_ERRATA; break; case KSZ9477_CHIP_ID: + case KSZ9567_CHIP_ID: + case KSZ9896_CHIP_ID: + case KSZ9897_CHIP_ID: /* KSZ9477 Errata DS80000754C *