From: Lukasz Majewski <lukma@denx.de>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>,
Russell King <linux@armlinux.org.uk>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC] net: dsa: slave: Advertise correct EEE capabilities at slave PHY setup
Date: Wed, 31 May 2023 11:31:26 +0200 [thread overview]
Message-ID: <20230531113121.4dd392d9@wsk> (raw)
In-Reply-To: <ZHcBZ5hGTu7aBCsJ@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 2963 bytes --]
Hi Oleksij,
> Hi Lukasz,
>
> On Tue, May 30, 2023 at 03:40:39PM +0200, Lukasz Majewski wrote:
> > Hi Andrew,
> >
> > > On Tue, May 30, 2023 at 02:26:21PM +0200, Lukasz Majewski wrote:
> > > > One can disable in device tree advertising of EEE capabilities
> > > > of PHY when 'eee-broken-100tx' property is present in DTS.
> > > >
> > > > With DSA switch it also may happen that one would need to
> > > > disable EEE due to some network issues.
> > >
> > > Is EEE actually broken in the MAC/PHY combination?
> > >
> >
> > Problem is that when I connect on this project some non-manageable
> > switches (which by default have EEE enabled), then I observe very
> > rare and sporadic link loss and reconnection.
>
> The interesting question is, do other link partner or local system is
> broken?
I was able to reproduce customer issue on my local setup with this
switch.
Moreover, only two devices were connected to this switch - mv88e6071
and the host PC.
> In some cases, not proper tx-timer was triggering this kind of
> symptoms. And timer configuration may depend on the link speed. So,
> driver may be need to take care of this.
The speed is only 100 Mbps, full duplex (as this switch only supports
speed up till 100Mbps).
>
> > Disabling EEE solves the problem.
> >
> > > You should not be using this DT option for configuration. It is
> > > there because there is some hardware which is truly broken, and
> > > needs EEE turned off.
> >
> > Yes, I do think that the above sentence sums up my use case.
>
> As Andrew already described, current linux kernel EEE support is not
> in the best shape, it is hard to see the difference between broken HW
> and SW.
Ok.
>
> > > If EEE does work, but you need to turn it off because of latency
> > > etc, then please use ethtool.
> > >
> >
> > Yes, correct - it is possible to disable the EEE with
> >
> > ethtool --set-eee lan2 eee off
> >
> > However, as I've stated in the mail, I cannot re-enable EEE once
> > disabled with:
> >
> > ethtool --set-eee lan2 eee on
> >
> > ethtool --show-eee lan2
> > EEE Settings for lan2:
> > EEE status: not supported
> >
> >
> > As the capability register shows value of 0.
>
> Some PHYs indeed have this issues:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/phy/micrel.c?h=v6.4-rc4#n1402
>
> In case of your older kernel version, you will need to fake access to
> the EEE caps register.
Thanks for pointing this out - I will add this functionality when
re-enabling of EEE will be required via ethtool.
>
> Regards,
> Oleksij
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2023-05-31 9:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-30 12:26 [RFC] net: dsa: slave: Advertise correct EEE capabilities at slave PHY setup Lukasz Majewski
2023-05-30 12:59 ` Russell King (Oracle)
2023-05-30 14:07 ` Lukasz Majewski
2023-05-30 14:22 ` Russell King (Oracle)
2023-05-30 14:26 ` Andrew Lunn
2023-05-30 14:41 ` Russell King (Oracle)
2023-05-31 8:16 ` Lukasz Majewski
2023-05-31 8:37 ` Russell King (Oracle)
2023-05-30 14:47 ` Lukasz Majewski
2023-05-30 15:08 ` Russell King (Oracle)
2023-05-31 8:43 ` Lukasz Majewski
2023-05-31 12:56 ` Andrew Lunn
2023-05-30 14:57 ` Lukasz Majewski
2023-05-30 14:23 ` Andrew Lunn
2023-05-30 14:40 ` Lukasz Majewski
2023-05-30 17:15 ` Andrew Lunn
2023-05-31 8:44 ` Lukasz Majewski
2023-05-30 13:17 ` Andrew Lunn
2023-05-30 13:40 ` Lukasz Majewski
2023-05-31 8:12 ` Oleksij Rempel
2023-05-31 9:31 ` Lukasz Majewski [this message]
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=20230531113121.4dd392d9@wsk \
--to=lukma@denx.de \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=olteanv@gmail.com \
--cc=vivien.didelot@gmail.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