From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Serge Semin <fancer.lancer@gmail.com>, andrew@lunn.ch
Cc: si.yanteng@linux.dev, Huacai Chen <chenhuacai@kernel.org>,
Yanteng Si <siyanteng@loongson.cn>,
hkallweit1@gmail.com, peppe.cavallaro@st.com,
alexandre.torgue@foss.st.com, joabreu@synopsys.com,
Jose.Abreu@synopsys.com, guyinggang@loongson.cn,
netdev@vger.kernel.org, chris.chenfeiyang@gmail.com
Subject: Re: [PATCH net-next v13 12/15] net: stmmac: Fixed failure to set network speed to 1000.
Date: Tue, 2 Jul 2024 16:08:05 +0100 [thread overview]
Message-ID: <ZoQX1bqtJI2Zd9qH@shell.armlinux.org.uk> (raw)
In-Reply-To: <gndedhwq6q6ou56nxnld6irkv4curb7mql4sy2i4wx5qnqksoh@6kpyuozs656l>
On Tue, Jul 02, 2024 at 01:31:44PM +0300, Serge Semin wrote:
> On Tue, Jun 04, 2024 at 11:29:43AM +0000, si.yanteng@linux.dev wrote:
> > 2024年5月30日 15:22, "Russell King (Oracle)" <linux@armlinux.org.uk> 写到:
> >
> > Hi, Russell, Serge,
> >
> > > I would like this patch to be held off until more thought can be put
> > >
> > > into how to handle this without having a hack in the driver (stmmac
> > >
> > > has too many hacks and we're going to have to start saying no to
> > >
> > > these.)
> > Yeah, you have a point there, but I would also like to hear Serge's opinion.
>
> I would be really glad not to have so many hacks in the STMMAC driver.
> It would have been awesome if we are able to find a solution without
> introducing one more quirk in the common driver code.
>
> I started digging into this sometime ago, but failed to come up with
> any decent hypothesis about the problem nature. One of the glimpse
> idea was that the loongson_gnet_fix_speed() method code might be somehow
> connected with the problem. But I didn't have much time to go further
> than that.
>
> Anyway I guess we'll need to have at least two more patchset
> re-spins to settle all the found issues. Until then we can keep
> discussing the problem Yanteng experience on his device. Russell, do
> you have any suggestion of what info Yanteng should provide to better
> understand the problem and get closer to it' cause?
First question: is auto-negotiation required by 802.3 for 1000base-T?
By "required" I mean "required to be used" not "required to be
implemented". This is an important distinction, and 802.3 tends to be
a bit wooly about the exact meaning. However, I think on balance the
conclusion is that AN is mandatory _to be used_ for 1000base-T links.
Annex 40C's state diagrams seems to imply that mr_autoneg_enable
(BMCR AN ENABLE) doesn't affect whether or not the AN state machines
work for 1000base-T, and some PHY datasheets (e.g. Marvell Alaska)
state that disabling mr_autoneg_enable leaves AN enabled but forced
to 1G full duplex.
So, I'm thinking is that the ethtool interface should reject any
request where we have a PHY supporting *only* base-T for gigabit
speeds, where the user is requesting !AN && SPEED_1000 on the basis
that AN is part of the link setup of 1000base-T links.
Maybe this should be a property of the struct phy_device so we can
transition phylib and phylink to return an appropriate error to
userspace?
Alternatively, maybe just implement the Marvell Alaska solution
to this problem (if the user attempts to disable AN on a PHY
supporting only base-T at gigabit speeds, then we silently force
AN with SPEED_1000 and DUPLEX_FULL.
Andrew - seems to be an IEEE 802.3 requirement that's been missed
in phylib, any thoughts?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2024-07-02 15:08 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-29 10:17 [PATCH net-next v13 00/15] stmmac: Add Loongson platform support Yanteng Si
2024-05-29 10:18 ` [PATCH net-next v13 01/15] net: stmmac: Move the atds flag to the stmmac_dma_cfg structure Yanteng Si
2024-05-29 10:18 ` [PATCH net-next v13 02/15] net: stmmac: Add multi-channel support Yanteng Si
2024-06-14 13:31 ` Serge Semin
2024-06-15 9:18 ` Yanteng Si
2024-05-29 10:18 ` [PATCH net-next v13 03/15] net: stmmac: Export dwmac1000_dma_ops Yanteng Si
2024-05-29 10:19 ` [PATCH net-next v13 04/15] net: stmmac: dwmac-loongson: Drop duplicated hash-based filter size init Yanteng Si
2024-06-14 13:46 ` Serge Semin
2024-05-29 10:19 ` [PATCH net-next v13 05/15] net: stmmac: dwmac-loongson: Use PCI_DEVICE_DATA() macro for device identification Yanteng Si
2024-05-29 10:19 ` [PATCH net-next v13 06/15] net: stmmac: dwmac-loongson: Detach GMAC-specific platform data init Yanteng Si
2024-06-14 16:19 ` Serge Semin
2024-06-17 10:00 ` Yanteng Si
2024-06-24 1:47 ` Serge Semin
2024-06-25 12:31 ` Yanteng Si
2024-07-01 22:57 ` Serge Semin
2024-07-02 9:24 ` Yanteng Si
2024-07-02 8:28 ` Serge Semin
2024-07-02 13:14 ` Yanteng Si
2024-07-02 14:09 ` Serge Semin
2024-07-03 9:41 ` Yanteng Si
2024-07-03 16:19 ` Serge Semin
2024-07-04 8:56 ` Yanteng Si
2024-07-05 10:16 ` Serge Semin
2024-07-05 10:45 ` Yanteng Si
2024-07-05 10:59 ` Serge Semin
2024-07-05 11:29 ` Yanteng Si
2024-07-05 11:53 ` Serge Semin
2024-07-06 13:31 ` Yanteng Si
2024-07-07 10:40 ` Serge Semin
2024-07-08 7:00 ` Yanteng Si
2024-05-29 10:19 ` [PATCH net-next v13 07/15] net: stmmac: dwmac-loongson: Init ref and PTP clocks rate Yanteng Si
2024-05-29 10:19 ` [PATCH net-next v13 08/15] net: stmmac: dwmac-loongson: Add phy_interface for Loongson GMAC Yanteng Si
2024-07-02 8:43 ` Serge Semin
2024-07-04 9:18 ` Yanteng Si
2024-05-29 10:19 ` [PATCH net-next v13 09/15] net: stmmac: dwmac-loongson: Introduce PCI device info data Yanteng Si
2024-07-02 9:18 ` Serge Semin
2024-07-04 9:18 ` Yanteng Si
2024-05-29 10:20 ` [PATCH net-next v13 10/15] net: stmmac: dwmac-loongson: Add DT-less GMAC PCI-device support Yanteng Si
2024-07-02 9:35 ` Serge Semin
2024-07-04 9:17 ` Yanteng Si
2024-05-29 10:20 ` [PATCH net-next v13 11/15] net: stmmac: dwmac-loongson: Add loongson_dwmac_dt_config Yanteng Si
2024-07-02 9:46 ` Serge Semin
2024-07-04 9:15 ` Yanteng Si
2024-05-29 10:20 ` [PATCH net-next v13 12/15] net: stmmac: Fixed failure to set network speed to 1000 Yanteng Si
2024-05-30 2:25 ` Huacai Chen
2024-05-30 7:22 ` Russell King (Oracle)
2024-06-04 11:29 ` si.yanteng
2024-07-02 10:31 ` Serge Semin
2024-07-02 15:08 ` Russell King (Oracle) [this message]
2024-07-03 16:56 ` Serge Semin
2024-07-03 18:56 ` Russell King (Oracle)
2024-07-03 19:09 ` Andrew Lunn
2024-07-03 20:33 ` Russell King (Oracle)
2024-07-05 11:17 ` Yanteng Si
2024-07-05 11:31 ` Russell King (Oracle)
2024-07-05 11:38 ` Yanteng Si
2024-05-29 10:21 ` [PATCH net-next v13 13/15] net: stmmac: dwmac-loongson: Drop pci_enable/disable_msi temporarily Yanteng Si
2024-07-01 1:17 ` Serge Semin
2024-07-04 9:32 ` Yanteng Si
2024-05-29 10:21 ` [PATCH net-next v13 14/15] net: stmmac: dwmac-loongson: Add Loongson GNET support Yanteng Si
2024-05-30 2:46 ` Huacai Chen
2024-06-05 9:43 ` Yanteng Si
2024-06-10 12:12 ` Yanteng Si
2024-07-02 13:43 ` Serge Semin
2024-07-03 1:19 ` Huacai Chen
2024-07-05 10:40 ` Serge Semin
2024-07-05 12:06 ` Yanteng Si
2024-07-05 12:17 ` Serge Semin
2024-07-06 10:30 ` Yanteng Si
2024-07-06 10:36 ` Huacai Chen
2024-07-07 10:51 ` Serge Semin
2024-07-07 13:57 ` Huacai Chen
2024-07-08 7:31 ` Yanteng Si
2024-07-03 10:27 ` Yanteng Si
2024-05-29 10:21 ` [PATCH net-next v13 15/15] net: stmmac: dwmac-loongson: Add loongson module author Yanteng Si
2024-06-05 11:30 ` [PATCH net-next v13 00/15] stmmac: Add Loongson platform support Serge Semin
2024-06-06 12:27 ` Yanteng Si
2024-06-06 18:27 ` Russell King (Oracle)
2024-06-06 18:39 ` 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=ZoQX1bqtJI2Zd9qH@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=Jose.Abreu@synopsys.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew@lunn.ch \
--cc=chenhuacai@kernel.org \
--cc=chris.chenfeiyang@gmail.com \
--cc=fancer.lancer@gmail.com \
--cc=guyinggang@loongson.cn \
--cc=hkallweit1@gmail.com \
--cc=joabreu@synopsys.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=si.yanteng@linux.dev \
--cc=siyanteng@loongson.cn \
/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;
as well as URLs for NNTP newsgroup(s).