Broadcom BCM5764M 千兆以太网无法以千兆速度连接

Broadcom BCM5764M 千兆以太网无法以千兆速度连接

我有一台带有集成以太网 5764 PCIe LOM 控制器的 HT Z600。

当我检查广告中的速度时,sudo ethtool enp1s0我可以看到广告中的链路模式为 10,100,1000baseT、半双工和全双工。

当我插入电缆时,“有线设置”显示尝试以 1000 MB/s 的速度连接,然后显示“电缆断开连接”,然后再次尝试连接。

使用不同的(较旧的)路由器时,会发生同样的事情,但经过多次尝试后,它会以 100 MB/s 的速度连接。使用两个较新的交换机时,它只会尝试以 1000 的速度连接,并且永远不会成功。

我只需宣传 10,100 速度即可使其连接sudo ethtool -s enp1s0 advertise 0x004,并且它将立即以 100 MB/s 的速度连接。

当我搜索类似问题时,几乎每次都是由电缆故障引起的。我买了一个带速度指示器的交换机,并测试了每条电缆都是 cat5e,当两端插入该交换机时显示为千兆位速度。我还测试了电缆提供千兆位速度,并且当插入两个不同的交换机之间时网络运行正常。我检查了两个交换机上的每个端口都提供千兆位速度。

这是我尝试收集的信息:

Ubuntu 18.04.2 LTS

> lspci | awk '/[Nn]et/ {print $1}' | xargs -i% lspci -ks %
01:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5764M Gigabit Ethernet PCIe (rev 10)
    Subsystem: Hewlett-Packard Company NetXtreme BCM5764M Gigabit Ethernet PCIe
    Kernel driver in use: tg3
    Kernel modules: tg3

> lspci -nn -d 14e4:

01:00.0 Ethernet controller [0200]: Broadcom Inc. and subsidiaries NetXtreme BCM5764M Gigabit Ethernet PCIe [14e4:1684] (rev 10)

> sudo ethtool -i enp1s0

driver: tg3
version: 3.137
firmware-version: 5764m-v3.35
expansion-rom-version: 
bus-info: 0000:01:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no

> sudo ethtool enp1s0 (when I set advertised mode to 10/100)

Settings for enp1s0:
    Supported ports: [ TP ]
    Supported link modes:   10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Half 1000baseT/Full 
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes:  100baseT/Half 
    Advertised pause frame use: Symmetric
    Advertised auto-negotiation: Yes
    Advertised FEC modes: Not reported
    Link partner advertised link modes:  10baseT/Half 10baseT/Full 
                                         100baseT/Half 100baseT/Full 
    Link partner advertised pause frame use: Symmetric
    Link partner advertised auto-negotiation: Yes
    Link partner advertised FEC modes: Not reported
    Speed: 100Mb/s
    Duplex: Half
    Port: Twisted Pair
    PHYAD: 1
    Transceiver: internal
    Auto-negotiation: on
    MDI-X: off
    Supports Wake-on: g
    Wake-on: g
    Current message level: 0x000000ff (255)
                   drv probe link timer ifdown ifup rx_err tx_err
    Link detected: yes

> sudo ethtool enp1s0 (when I set speed to 1000 with sudo ethtool -s enp1s0 speed 1000 duplex full)

Settings for enp1s0:
    Supported ports: [ TP ]
    Supported link modes:   10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Half 1000baseT/Full 
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes:  1000baseT/Full 
    Advertised pause frame use: Symmetric
    Advertised auto-negotiation: Yes
    Advertised FEC modes: Not reported
    Speed: Unknown!
    Duplex: Unknown! (255)
    Port: Twisted Pair
    PHYAD: 1
    Transceiver: internal
    Auto-negotiation: on
    MDI-X: Unknown
    Supports Wake-on: g
    Wake-on: g
    Current message level: 0x000000ff (255)
                   drv probe link timer ifdown ifup rx_err tx_err
    Link detected: no


(offload features)
> sudo ethtool -k enp1s0
...
highdma: on
...

> sudo cat /etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

> dmesg

[159771.985545] tg3 0000:01:00.0 enp1s0: Link is up at 1000 Mbps, full duplex
[159771.985554] tg3 0000:01:00.0 enp1s0: Flow control is on for TX and on for RX
[159773.152452] tg3 0000:01:00.0 enp1s0: Link is down
[159779.157332] tg3 0000:01:00.0 enp1s0: Link is up at 1000 Mbps, full duplex
[159779.157334] tg3 0000:01:00.0 enp1s0: Flow control is on for TX and on for RX
[159780.324591] tg3 0000:01:00.0 enp1s0: Link is down
[159783.204587] tg3 0000:01:00.0 enp1s0: Link is up at 1000 Mbps, full duplex
[159783.204599] tg3 0000:01:00.0 enp1s0: Flow control is on for TX and on for RX
[159784.367819] tg3 0000:01:00.0 enp1s0: Link is down
[159787.230882] tg3 0000:01:00.0 enp1s0: Link is up at 1000 Mbps, full duplex
[159787.230895] tg3 0000:01:00.0 enp1s0: Flow control is on for TX and on for RX
[159788.394290] tg3 0000:01:00.0 enp1s0: Link is down
...

以下是我尝试过的:

updated /etc/default/grub to add GRUP_CMDLINE_LINUX_DEFAULT="iommu=soft" then sudo update-grub and reboot.
No difference that I can see.

> sudo ethtool -s enp1s0 speed 100 duplex full
... works and immediately connects at 100.
> sudo ethtool -s enp1s0 speed 1000 duplex full
... switches between "connecting" and "cable disconnected", shows the "link is up/link is down" messages from the dmesg output above.

> sudo ethtool -K enp1s0 highdma (on/off)
No difference that I can see.

任何帮助是极大的赞赏!

编辑:我可以确认这是驱动程序或硬件问题,因为当达到 1000 时:

> ip link | grep enp
2: enp1s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000

当达到 100 时

> ip link | grep enp
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000

(并且此评论说 NO-CARRIER 是驱动程序或硬件:https://bugzilla.gnome.org/show_bug.cgi?id=792506#c5)……所有这些都证实了 Fabby 所说的话。我想我运气不好。

编辑:这个问题似乎是同一个问题,并指出该卡在内核 4.14 下工作,但在 4.15 下停止工作。uname -r告诉我我正在运行 4.15.0-55-generic - 所以这似乎合适。我对内核了解不够,无法更新/维护/验证更新是否有帮助。但那将是一个不同的问题,感谢您对这个问题的帮助!

答案1

您找到的所有答案都说是电缆的问题,因为 99% 的情况都是电缆的问题。

但问题确实出在硬件层面,而且由于您的电缆和交换机似乎检查无误,因此您需要考虑以下问题:

  • 固件(我检查过:此卡有内置支持)
  • PC 内部的实际连接器

因此,您遇到了硬件问题或固件中存在错误,而这两个问题都与此主题无关​​。

然而现在只需将速度固定在 100M,每次x收到内核更新后,再尝试 1G或者只是更换连接器...

相关内容