linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Golle <daniel@makrotopia.org>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: "Frank Wunderlich" <frank-w@public-files.de>,
	"Vladimir Oltean" <vladimir.oltean@nxp.com>,
	netdev@vger.kernel.org, linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	"Lorenzo Bianconi" <lorenzo@kernel.org>,
	"Mark Lee" <Mark-MC.Lee@mediatek.com>,
	"John Crispin" <john@phrozen.org>, "Felix Fietkau" <nbd@nbd.name>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"DENG Qingfang" <dqfext@gmail.com>,
	"Landen Chao" <Landen.Chao@mediatek.com>,
	"Sean Wang" <sean.wang@mediatek.com>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Eric Dumazet" <edumazet@google.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Vladimir Oltean" <olteanv@gmail.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Jianhui Zhao" <zhaojh329@gmail.com>,
	"Bjørn Mork" <bjorn@mork.no>,
	"Alexander Couzens" <lynxis@fe80.eu>
Subject: Re: Aw: Re: [PATCH net-next v12 08/18] net: ethernet: mtk_eth_soc: fix 1000Base-X and 2500Base-X modes
Date: Sat, 11 Mar 2023 20:34:12 +0000	[thread overview]
Message-ID: <ZAzlxF6LaMSdOdIL@makrotopia.org> (raw)
In-Reply-To: <ZAzeZwT3JJK42ANn@shell.armlinux.org.uk>

On Sat, Mar 11, 2023 at 08:02:47PM +0000, Russell King (Oracle) wrote:
> On Sat, Mar 11, 2023 at 02:51:27PM +0000, Daniel Golle wrote:
> > On Sat, Mar 11, 2023 at 02:26:13PM +0100, Frank Wunderlich wrote:
> > > > Gesendet: Samstag, 11. März 2023 um 13:05 Uhr
> > > > Von: "Frank Wunderlich" <frank-w@public-files.de>
> > > > > Gesendet: Mittwoch, 08. März 2023 um 16:24 Uhr
> > > > > Von: "Russell King (Oracle)" <linux@armlinux.org.uk>
> > > > > > > It would be nice to add these to my database - please send me the
> > > > > > > output of ethtool -m $iface raw on > foo.bin for each module.
> > > > > 
> > > > > so if you can do that for me, then I can see whether it's likely that
> > > > > the patches that are already in mainline will do anything to solve
> > > > > the workaround you've had to add for the hw signals.
> > > > 
> > > > i got the 2.5G copper sfps, and tried them...they work well with the v12 (including this patch), but not in v13...
> > > > 
> > > > i dumped the eeprom like you mention for your database:
> > > > 
> > > > $ hexdump -C 2g5_sfp.bin 
> > > > 00000000  03 04 07 00 01 00 00 00  00 02 00 05 19 00 00 00  |................|
> > > > 00000010  1e 14 00 00 4f 45 4d 20  20 20 20 20 20 20 20 20  |....OEM         |
> > > > 00000020  20 20 20 20 00 00 00 00  53 46 50 2d 32 2e 35 47  |    ....SFP-2.5G|
> > > > 00000030  2d 54 20 20 20 20 20 20  31 2e 30 20 03 52 00 19  |-T      1.0 .R..|
> > > > 00000040  00 1a 00 00 53 4b 32 33  30 31 31 31 30 30 30 38  |....SK2301110008|
> > > > 00000050  20 20 20 20 32 33 30 31  31 30 20 20 68 f0 01 e8  |    230110  h...|
> > > > 00000060  00 00 11 37 4f 7a dc ff  3d c0 6e 74 9b 7c 06 ca  |...7Oz..=.nt.|..|
> > > > 00000070  e1 d0 f9 00 00 00 00 00  00 00 00 00 08 f0 fc 64  |...............d|
> > > > 00000080  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
> > > > *
> > > > 00000100  5f 00 ce 00 5a 00 d3 00  8c a0 75 30 88 b8 79 18  |_...Z.....u0..y.|
> > > > 00000110  1d 4c 01 f4 19 64 03 e8  4d f0 06 30 3d e8 06 f2  |.L...d..M..0=...|
> > > > 00000120  2b d4 00 c7 27 10 00 df  00 00 00 00 00 00 00 00  |+...'...........|
> > > > 00000130  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
> > > > 00000140  00 00 00 00 3f 80 00 00  00 00 00 00 01 00 00 00  |....?...........|
> > > > 00000150  01 00 00 00 01 00 00 00  01 00 00 00 00 00 00 f1  |................|
> > > > 00000160  29 1a 82 41 0b b8 13 88  0f a0 ff ff ff ff 80 ff  |)..A............|
> > > > 00000170  00 00 ff ff 00 00 ff ff  04 ff ff ff ff ff ff 00  |................|
> > > > 00000180  43 4e 53 38 54 55 54 41  41 43 33 30 2d 31 34 31  |CNS8TUTAAC30-141|
> > > > 00000190  30 2d 30 34 56 30 34 20  49 fb 46 00 00 00 00 29  |0-04V04 I.F....)|
> > > > 000001a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
> > > > 000001b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 aa aa  |................|
> > > > 000001c0  47 4c 43 2d 54 20 20 20  20 20 20 20 20 20 20 20  |GLC-T           |
> > > > 000001d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 97  |               .|
> > > > 000001e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
> > > > 000001f0  00 00 00 00 00 00 00 00  00 40 00 40 00 00 00 00  |.........@.@....|
> > > > 
> > > > how can we add a quirk to support this?
> > > 
> > > tried to add the quirk like this onto v13
> > > 
> > > --- a/drivers/net/phy/sfp.c
> > > +++ b/drivers/net/phy/sfp.c
> > > @@ -403,6 +403,8 @@ static const struct sfp_quirk sfp_quirks[] = {
> > >         SFP_QUIRK_F("OEM", "RTSFP-10G", sfp_fixup_rollball_cc),
> > >         SFP_QUIRK_F("Turris", "RTSFP-10", sfp_fixup_rollball),
> > >         SFP_QUIRK_F("Turris", "RTSFP-10G", sfp_fixup_rollball),
> > > +
> > > +       SFP_QUIRK_M("OEM", "SFP-2.5G-T", sfp_quirk_2500basex),
> > >  };
> > > 
> > > but still no link...
> > > 
> > > how can i verify the quirk was applied? see only this in dmesg:
> > > 
> > > [    2.192274] sfp sfp-1: module OEM              SFP-2.5G-T       rev 1.0  sn SK2301110008     dc 230110  
> > > 
> > > also tried to force speed (module should support 100/1000/2500), but it seems i can set speed option only on
> > > gmac (eth1) and not on the sfp (phy).
> > > 
> > > i guess between mac and sfp speed is always 2500base-X and after the phy (if there is any) the link speed is
> > > maybe different.
> > 
> > As discussed in the previous iteration of the series where I suggested to
> > add work-arounds disabling in-band AN for 1000Base-X and 2500Base-X having
> > those will also affect fiber transceivers which transparently pass-through
> > the electrical SerDes signal into light. Russell explained it very well
> > and I now agree that a good solution would be to add a new SFP quirk
> > indicating that a SFP module got a "hidden" PHY which doesn't like in-band
> > autonegotiation.
> 
> I do not believe that fibre SFPs have hidden PHYs that disrupt the
> autonegotiation. What makes you think that they do?

This is not a fiber SFP, but rather a 2500Base-T RJ-45 module.
Hence it quite certainly has some kind of PHY.

> Do you have
> autonegotiation working with some fibre SFP modules but not other
> fibre modules?

I've tried only with one 1000Base-SX module and can confirm (like
Frank already did in your previous discussion some weeks ago) that
with that autonegotiation is working fine. Only those RJ-45 which
do not expose the PHY via i2c-mdio are problematic apparently, as
Linux/phylink *assumes* that they do in-band AN, but at least some
of them don't.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-03-11 20:35 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 15:52 [PATCH net-next v12 00/18] net: ethernet: mtk_eth_soc: various enhancements Daniel Golle
2023-03-07 15:52 ` [PATCH net-next v12 01/18] net: ethernet: mtk_eth_soc: add support for MT7981 SoC Daniel Golle
2023-03-07 15:52 ` [PATCH net-next v12 02/18] dt-bindings: net: mediatek,net: add mt7981-eth binding Daniel Golle
2023-03-07 15:52 ` [PATCH net-next v12 03/18] dt-bindings: arm: mediatek: sgmiisys: Convert to DT schema Daniel Golle
2023-03-07 15:53 ` [PATCH net-next v12 04/18] dt-bindings: arm: mediatek: sgmiisys: add MT7981 SoC Daniel Golle
2023-03-07 15:53 ` [PATCH net-next v12 05/18] net: ethernet: mtk_eth_soc: set MDIO bus clock frequency Daniel Golle
2023-03-07 15:53 ` [PATCH net-next v12 06/18] net: ethernet: mtk_eth_soc: reset PCS state Daniel Golle
2023-03-07 18:49   ` Aw: " Frank Wunderlich
2023-03-07 15:53 ` [PATCH net-next v12 07/18] net: ethernet: mtk_eth_soc: only write values if needed Daniel Golle
2023-03-07 18:53   ` Aw: " Frank Wunderlich
2023-03-07 15:53 ` [PATCH net-next v12 08/18] net: ethernet: mtk_eth_soc: fix 1000Base-X and 2500Base-X modes Daniel Golle
2023-03-07 18:52   ` Aw: " Frank Wunderlich
2023-03-08 11:35   ` Russell King (Oracle)
2023-03-08 12:11     ` Daniel Golle
2023-03-08 12:41       ` Russell King (Oracle)
2023-03-08 12:53         ` Daniel Golle
2023-03-08 13:12           ` Russell King (Oracle)
2023-03-08 13:46             ` Vladimir Oltean
2023-03-08 14:12               ` Russell King (Oracle)
2023-03-08 14:32                 ` Daniel Golle
2023-03-08 15:01                   ` Russell King (Oracle)
2023-03-08 15:08                     ` Daniel Golle
2023-03-08 15:24                       ` Russell King (Oracle)
2023-03-11 12:05                         ` Aw: " Frank Wunderlich
2023-03-11 13:26                           ` Frank Wunderlich
2023-03-11 14:51                             ` Daniel Golle
2023-03-11 20:02                               ` Russell King (Oracle)
2023-03-11 20:34                                 ` Daniel Golle [this message]
2023-03-11 20:00                           ` Russell King (Oracle)
2023-03-11 20:21                             ` Frank Wunderlich
2023-03-11 20:30                               ` Russell King (Oracle)
2023-03-12 12:40                                 ` Aw: " Frank Wunderlich
2023-03-12 14:26                                   ` Frank Wunderlich
2023-03-12 16:50                                     ` Frank Wunderlich
2023-03-12 20:10                                       ` Russell King (Oracle)
2023-03-12 20:05                                   ` Russell King (Oracle)
2023-03-13 10:59                                     ` Russell King (Oracle)
2023-03-13 18:39                                       ` Aw: " Frank Wunderlich
2023-03-13 22:57                                         ` Russell King (Oracle)
     [not found]                                           ` <trinity-e2c457f1-c897-45f1-907a-8ea3664b7512-1678783872771@3c-app-gmx-bap66>
     [not found]                                             ` <ZBA6gszARdJY26Mz@shell.armlinux.org.uk>
     [not found]                                               ` <trinity-bc4bbf4e-812a-4682-ac8c-5178320467f5-1678788102813@3c-app-gmx-bap66>
     [not found]                                                 ` <ZBBIDqZaqdSfwu9g@shell.armlinux.org.uk>
2023-03-14 13:59                                                   ` Aw: " Frank Wunderlich
2023-03-14 14:11                                                     ` Russell King (Oracle)
2023-03-07 15:54 ` [PATCH net-next v12 09/18] net: ethernet: mtk_eth_soc: Fix link status for none-SGMII modes Daniel Golle
2023-03-07 18:50   ` Aw: " Frank Wunderlich
2023-03-08 11:38   ` Russell King (Oracle)
2023-03-08 11:44     ` Frank Wunderlich
2023-03-08 12:05       ` Daniel Golle
2023-03-08 16:24         ` Russell King (Oracle)
2023-03-08 12:35       ` Russell King (Oracle)
2023-03-07 15:54 ` [PATCH net-next v12 10/18] net: ethernet: mtk_eth_soc: ppe: add support for flow accounting Daniel Golle
2023-03-07 15:54 ` [PATCH net-next v12 11/18] net: pcs: add driver for MediaTek SGMII PCS Daniel Golle
2023-03-07 18:52   ` Aw: " Frank Wunderlich
2023-03-07 15:54 ` [PATCH net-next v12 12/18] net: ethernet: mtk_eth_soc: switch to external PCS driver Daniel Golle
2023-03-07 15:55 ` [PATCH net-next v12 13/18] net: dsa: mt7530: use " Daniel Golle
2023-03-07 15:55 ` [PATCH net-next v12 14/18] net: ethernet: mtk_eth_soc: add MTK_NETSYS_V1 capability bit Daniel Golle
2023-03-07 15:55 ` [PATCH net-next v12 15/18] net: ethernet: mtk_eth_soc: move MAX_DEVS in mtk_soc_data Daniel Golle
2023-03-07 15:55 ` [PATCH v12 16/18] net: ethernet: mtk_eth_soc: rely on num_devs and remove MTK_MAC_COUNT Daniel Golle
2023-03-07 15:55 ` [PATCH v12 17/18] net: ethernet: mtk_eth_soc: add MTK_NETSYS_V3 capability bit Daniel Golle
2023-03-07 15:56 ` [PATCH v12 18/18] net: ethernet: mtk_eth_soc: convert caps in mtk_soc_data struct to u64 Daniel Golle

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=ZAzlxF6LaMSdOdIL@makrotopia.org \
    --to=daniel@makrotopia.org \
    --cc=Landen.Chao@mediatek.com \
    --cc=Mark-MC.Lee@mediatek.com \
    --cc=andrew@lunn.ch \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=bjorn@mork.no \
    --cc=davem@davemloft.net \
    --cc=dqfext@gmail.com \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=frank-w@public-files.de \
    --cc=hkallweit1@gmail.com \
    --cc=john@phrozen.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=lorenzo@kernel.org \
    --cc=lynxis@fe80.eu \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=sean.wang@mediatek.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=zhaojh329@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;
as well as URLs for NNTP newsgroup(s).