mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* RTL8127AF doesn't get a link over SFP+ DAC
@ 2025-11-13 17:30 Michael Zimmermann
  2025-11-13 19:54 ` Heiner Kallweit
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Zimmermann @ 2025-11-13 17:30 UTC (permalink / raw)
  To: Heiner Kallweit, nic_swsd, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: netdev, linux-kernel

Hi,

I have a RT8127AF card from DIEWU:
https://24wireless.info/diewu-txa403-and-txa405 .
The card is detected just fine:
[125201.683763] r8169 0000:08:00.0 eth1: RTL8127A, xx:xx:xx:xx:xx:xx,
XID 6c9, IRQ 143
[125201.683770] r8169 0000:08:00.0 eth1: jumbo features [frames: 16362
bytes, tx checksumming: ko]
[125201.688543] r8169 0000:08:00.0 enp8s0: renamed from eth1
[125201.715519] Realtek Internal NBASE-T PHY r8169-0-800:00: attached
PHY driver (mii_bus:phy_addr=r8169-0-800:00, irq=MAC)
[125202.277034] r8169 0000:08:00.0 enp8s0: Link is Down

This is what ethtool shows:
Settings for enp8s0:
        Supported ports: [ TP    MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
                                10000baseT/Full
                                2500baseT/Full
                                5000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
                                10000baseT/Full
                                2500baseT/Full
                                5000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: Unknown!
        Duplex: Unknown! (255)
        Auto-negotiation: on
        master-slave cfg: preferred slave
        master-slave status: unknown
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        MDI-X: Unknown
        Supports Wake-on: pumbg
        Wake-on: d
        Link detected: no

and `ip a`:
10: enp8s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc
fq_codel state DOWN group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
    altname enxXXXXXXXXXXXX

And that's it, the link never comes up. The 10G Mikrotik switch on the
other side sees that the module is inserted on its side, but doesn't
show any change when I plug in the RTL8127AF.

It works in Windows 11 and it also works with the r8127 Linux driver
downloaded from Realteks website:
https://www.realtek.com/Download/List?cate_id=584 :

[129318.976134] r8127: This product is covered by one or more of the
following patents: US6,570,884, US6,115,776, and US6,327,625.
[129318.976175] r8127  Copyright (C) 2025 Realtek NIC software team
<nicfae@realtek.com>
                 This program comes with ABSOLUTELY NO WARRANTY; for
details, please see <http://www.gnu.org/licenses/>.
                 This is free software, and you are welcome to
redistribute it under certain conditions; see
<http://www.gnu.org/licenses/>.
[129318.988293] r8127 0000:08:00.0 enp8s0: renamed from eth1
[129318.997092] enp8s0: 0xffffd49ec9140000, xx:xx:xx:xx:xx:xx, IRQ 137
[129319.421629] r8127: enp8s0: link up

ethtool with realteks driver shows something quite interesting:
Settings for enp8s0:
        Supported ports: [ TP ]
        Supported link modes:   1000baseT/Full
                                10000baseT/Full
        Supported pause frame use: No
        Supports auto-negotiation: No
        Supported FEC modes: Not reported
        Advertised link modes:  1000baseT/Full
                                10000baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: 10000Mb/s
        Duplex: Full
        Auto-negotiation: off
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        MDI-X: on
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000033 (51)
                               drv probe ifdown ifup
        Link detected: yes

auto-negotiation is off, even though it's enabled on my Mikrotik
switch. "ethtool -s enp8s0 autoneg on" (or off) on the realtek driver
succeeds but doesn't change what ethtools status shows. "ethtool -s
enp8s0 autoneg off" on the mainline driver does fail with:
netlink error: link settings update failed
netlink error: Invalid argument

So while I have no idea why things are not working, my best theory is
that auto-negotiation isn't supported (properly) and the mainline
driver doesn't support disabling it.

Thanks
Michael

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: RTL8127AF doesn't get a link over SFP+ DAC
  2025-11-13 17:30 RTL8127AF doesn't get a link over SFP+ DAC Michael Zimmermann
@ 2025-11-13 19:54 ` Heiner Kallweit
  2025-11-16  9:13   ` Michael Zimmermann
  0 siblings, 1 reply; 3+ messages in thread
From: Heiner Kallweit @ 2025-11-13 19:54 UTC (permalink / raw)
  To: Michael Zimmermann, nic_swsd, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: netdev, linux-kernel

On 11/13/2025 6:30 PM, Michael Zimmermann wrote:
> Hi,
> 
> I have a RT8127AF card from DIEWU:
> https://24wireless.info/diewu-txa403-and-txa405 .
> The card is detected just fine:
> [125201.683763] r8169 0000:08:00.0 eth1: RTL8127A, xx:xx:xx:xx:xx:xx,
> XID 6c9, IRQ 143
> [125201.683770] r8169 0000:08:00.0 eth1: jumbo features [frames: 16362
> bytes, tx checksumming: ko]
> [125201.688543] r8169 0000:08:00.0 enp8s0: renamed from eth1
> [125201.715519] Realtek Internal NBASE-T PHY r8169-0-800:00: attached
> PHY driver (mii_bus:phy_addr=r8169-0-800:00, irq=MAC)
> [125202.277034] r8169 0000:08:00.0 enp8s0: Link is Down
> 
> This is what ethtool shows:
> Settings for enp8s0:
>         Supported ports: [ TP    MII ]
>         Supported link modes:   10baseT/Half 10baseT/Full
>                                 100baseT/Half 100baseT/Full
>                                 1000baseT/Full
>                                 10000baseT/Full
>                                 2500baseT/Full
>                                 5000baseT/Full
>         Supported pause frame use: Symmetric Receive-only
>         Supports auto-negotiation: Yes
>         Supported FEC modes: Not reported
>         Advertised link modes:  10baseT/Half 10baseT/Full
>                                 100baseT/Half 100baseT/Full
>                                 1000baseT/Full
>                                 10000baseT/Full
>                                 2500baseT/Full
>                                 5000baseT/Full
>         Advertised pause frame use: Symmetric Receive-only
>         Advertised auto-negotiation: Yes
>         Advertised FEC modes: Not reported
>         Speed: Unknown!
>         Duplex: Unknown! (255)
>         Auto-negotiation: on
>         master-slave cfg: preferred slave
>         master-slave status: unknown
>         Port: Twisted Pair
>         PHYAD: 0
>         Transceiver: internal
>         MDI-X: Unknown
>         Supports Wake-on: pumbg
>         Wake-on: d
>         Link detected: no
> 
> and `ip a`:
> 10: enp8s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc
> fq_codel state DOWN group default qlen 1000
>     link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
>     altname enxXXXXXXXXXXXX
> 
> And that's it, the link never comes up. The 10G Mikrotik switch on the
> other side sees that the module is inserted on its side, but doesn't
> show any change when I plug in the RTL8127AF.
> 
> It works in Windows 11 and it also works with the r8127 Linux driver
> downloaded from Realteks website:
> https://www.realtek.com/Download/List?cate_id=584 :
> 
> [129318.976134] r8127: This product is covered by one or more of the
> following patents: US6,570,884, US6,115,776, and US6,327,625.
> [129318.976175] r8127  Copyright (C) 2025 Realtek NIC software team
> <nicfae@realtek.com>
>                  This program comes with ABSOLUTELY NO WARRANTY; for
> details, please see <http://www.gnu.org/licenses/>.
>                  This is free software, and you are welcome to
> redistribute it under certain conditions; see
> <http://www.gnu.org/licenses/>.
> [129318.988293] r8127 0000:08:00.0 enp8s0: renamed from eth1
> [129318.997092] enp8s0: 0xffffd49ec9140000, xx:xx:xx:xx:xx:xx, IRQ 137
> [129319.421629] r8127: enp8s0: link up
> 
> ethtool with realteks driver shows something quite interesting:
> Settings for enp8s0:
>         Supported ports: [ TP ]
>         Supported link modes:   1000baseT/Full
>                                 10000baseT/Full
>         Supported pause frame use: No
>         Supports auto-negotiation: No
>         Supported FEC modes: Not reported
>         Advertised link modes:  1000baseT/Full
>                                 10000baseT/Full
>         Advertised pause frame use: No
>         Advertised auto-negotiation: No
>         Advertised FEC modes: Not reported
>         Speed: 10000Mb/s
>         Duplex: Full
>         Auto-negotiation: off
>         Port: Twisted Pair
>         PHYAD: 0
>         Transceiver: internal
>         MDI-X: on
>         Supports Wake-on: pumbg
>         Wake-on: g
>         Current message level: 0x00000033 (51)
>                                drv probe ifdown ifup
>         Link detected: yes
> 
> auto-negotiation is off, even though it's enabled on my Mikrotik
> switch. "ethtool -s enp8s0 autoneg on" (or off) on the realtek driver
> succeeds but doesn't change what ethtools status shows. "ethtool -s
> enp8s0 autoneg off" on the mainline driver does fail with:
> netlink error: link settings update failed
> netlink error: Invalid argument
> 
> So while I have no idea why things are not working, my best theory is
> that auto-negotiation isn't supported (properly) and the mainline
> driver doesn't support disabling it.
> 
Realtek uses a proprietary way to deal with the SFP and hides it
behind the internal PHY. The SFP signals aren't exposed.
When in fiber mode the internal PHY doesn't behave fully compliant
with clause 22 any longer. E.g. link status isn't reported by the
PHY, but only via a proprietary register.
To cut a long story short: Fiber mode isn't supported by r8169
at the moment.

> Thanks
> Michael


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: RTL8127AF doesn't get a link over SFP+ DAC
  2025-11-13 19:54 ` Heiner Kallweit
@ 2025-11-16  9:13   ` Michael Zimmermann
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Zimmermann @ 2025-11-16  9:13 UTC (permalink / raw)
  To: Heiner Kallweit
  Cc: nic_swsd, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev, linux-kernel

On Thu, Nov 13, 2025 at 8:54 PM Heiner Kallweit <hkallweit1@gmail.com> wrote:
>
> On 11/13/2025 6:30 PM, Michael Zimmermann wrote:
> > Hi,
> >
> > I have a RT8127AF card from DIEWU:
> > https://24wireless.info/diewu-txa403-and-txa405 .
> > The card is detected just fine:
> > [125201.683763] r8169 0000:08:00.0 eth1: RTL8127A, xx:xx:xx:xx:xx:xx,
> > XID 6c9, IRQ 143
> > [125201.683770] r8169 0000:08:00.0 eth1: jumbo features [frames: 16362
> > bytes, tx checksumming: ko]
> > [125201.688543] r8169 0000:08:00.0 enp8s0: renamed from eth1
> > [125201.715519] Realtek Internal NBASE-T PHY r8169-0-800:00: attached
> > PHY driver (mii_bus:phy_addr=r8169-0-800:00, irq=MAC)
> > [125202.277034] r8169 0000:08:00.0 enp8s0: Link is Down
> >
> > This is what ethtool shows:
> > Settings for enp8s0:
> >         Supported ports: [ TP    MII ]
> >         Supported link modes:   10baseT/Half 10baseT/Full
> >                                 100baseT/Half 100baseT/Full
> >                                 1000baseT/Full
> >                                 10000baseT/Full
> >                                 2500baseT/Full
> >                                 5000baseT/Full
> >         Supported pause frame use: Symmetric Receive-only
> >         Supports auto-negotiation: Yes
> >         Supported FEC modes: Not reported
> >         Advertised link modes:  10baseT/Half 10baseT/Full
> >                                 100baseT/Half 100baseT/Full
> >                                 1000baseT/Full
> >                                 10000baseT/Full
> >                                 2500baseT/Full
> >                                 5000baseT/Full
> >         Advertised pause frame use: Symmetric Receive-only
> >         Advertised auto-negotiation: Yes
> >         Advertised FEC modes: Not reported
> >         Speed: Unknown!
> >         Duplex: Unknown! (255)
> >         Auto-negotiation: on
> >         master-slave cfg: preferred slave
> >         master-slave status: unknown
> >         Port: Twisted Pair
> >         PHYAD: 0
> >         Transceiver: internal
> >         MDI-X: Unknown
> >         Supports Wake-on: pumbg
> >         Wake-on: d
> >         Link detected: no
> >
> > and `ip a`:
> > 10: enp8s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc
> > fq_codel state DOWN group default qlen 1000
> >     link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
> >     altname enxXXXXXXXXXXXX
> >
> > And that's it, the link never comes up. The 10G Mikrotik switch on the
> > other side sees that the module is inserted on its side, but doesn't
> > show any change when I plug in the RTL8127AF.
> >
> > It works in Windows 11 and it also works with the r8127 Linux driver
> > downloaded from Realteks website:
> > https://www.realtek.com/Download/List?cate_id=584 :
> >
> > [129318.976134] r8127: This product is covered by one or more of the
> > following patents: US6,570,884, US6,115,776, and US6,327,625.
> > [129318.976175] r8127  Copyright (C) 2025 Realtek NIC software team
> > <nicfae@realtek.com>
> >                  This program comes with ABSOLUTELY NO WARRANTY; for
> > details, please see <http://www.gnu.org/licenses/>.
> >                  This is free software, and you are welcome to
> > redistribute it under certain conditions; see
> > <http://www.gnu.org/licenses/>.
> > [129318.988293] r8127 0000:08:00.0 enp8s0: renamed from eth1
> > [129318.997092] enp8s0: 0xffffd49ec9140000, xx:xx:xx:xx:xx:xx, IRQ 137
> > [129319.421629] r8127: enp8s0: link up
> >
> > ethtool with realteks driver shows something quite interesting:
> > Settings for enp8s0:
> >         Supported ports: [ TP ]
> >         Supported link modes:   1000baseT/Full
> >                                 10000baseT/Full
> >         Supported pause frame use: No
> >         Supports auto-negotiation: No
> >         Supported FEC modes: Not reported
> >         Advertised link modes:  1000baseT/Full
> >                                 10000baseT/Full
> >         Advertised pause frame use: No
> >         Advertised auto-negotiation: No
> >         Advertised FEC modes: Not reported
> >         Speed: 10000Mb/s
> >         Duplex: Full
> >         Auto-negotiation: off
> >         Port: Twisted Pair
> >         PHYAD: 0
> >         Transceiver: internal
> >         MDI-X: on
> >         Supports Wake-on: pumbg
> >         Wake-on: g
> >         Current message level: 0x00000033 (51)
> >                                drv probe ifdown ifup
> >         Link detected: yes
> >
> > auto-negotiation is off, even though it's enabled on my Mikrotik
> > switch. "ethtool -s enp8s0 autoneg on" (or off) on the realtek driver
> > succeeds but doesn't change what ethtools status shows. "ethtool -s
> > enp8s0 autoneg off" on the mainline driver does fail with:
> > netlink error: link settings update failed
> > netlink error: Invalid argument
> >
> > So while I have no idea why things are not working, my best theory is
> > that auto-negotiation isn't supported (properly) and the mainline
> > driver doesn't support disabling it.
> >
> Realtek uses a proprietary way to deal with the SFP and hides it
> behind the internal PHY. The SFP signals aren't exposed.
> When in fiber mode the internal PHY doesn't behave fully compliant
> with clause 22 any longer. E.g. link status isn't reported by the
> PHY, but only via a proprietary register.
> To cut a long story short: Fiber mode isn't supported by r8169
> at the moment.
>
> > Thanks
> > Michael
>

Thanks for the hint. I've spent some time understanding and comparing
both drivers and testing a couple of things and was actually able to
get it working with r8169. After some more testing and code cleanup
I'll send a patch.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-11-16  9:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-13 17:30 RTL8127AF doesn't get a link over SFP+ DAC Michael Zimmermann
2025-11-13 19:54 ` Heiner Kallweit
2025-11-16  9:13   ` Michael Zimmermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®