Bug 215101

Summary: [ixgbe] Intel X552 SFP+ fails to initialize when no SFP module is plugged in
Product: Base System Reporter: Mike Belopuhov <mike>
Component: kernAssignee: Kevin Bowling <kbowling>
Status: Closed Unable to Reproduce    
Severity: Affects Many People CC: jeffrey.e.pieper, kbowling
Priority: --- Keywords: IntelNetworking, patch
Version: CURRENT   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
Fix none

Description Mike Belopuhov 2016-12-06 16:39:21 UTC
Created attachment 177725 [details]
Fix

Due to the insufficient error handling Intel X552 SFP+ (8086:15ac)
will fail to initialize on boot when no modules are plugged in and
become completely unusable afterwards.

I have discovered this bug on OpenBSD when updating our driver so
there's a chance that this is not an issue on FreeBSD (I haven't
tested), so you may consider this just a heads up.

I'm attaching the fix that makes it operational on OpenBSD.  This
chunk is based on the similar one for 82599.  Setting PHY type to
"ixgbe_phy_none" will come in handy during "ifconfig up" since
ixgbe_init[_locked] will re-do the PHY/SFP initialization if the
PHY type has been previously set to "none".

Cheers,
Mike
Comment 1 Sean Bruno freebsd_committer freebsd_triage 2016-12-13 21:05:24 UTC
Ah, interesting.  I'll take a look at this one.
Comment 2 Jeff Pieper 2016-12-14 00:01:46 UTC
I cannot reproduce this using 12-CURRENT with a static driver on a production Supermicro X552:

ix0@pci0:4:0:0: class=0x020000 card=0x15ac15d9 chip=0x15ac8086 rev=0x00 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Ethernet Connection X552 10 GbE SFP+'
    class      = network
    subclass   = ethernet
ix1@pci0:4:0:1: class=0x020000 card=0x15ac15d9 chip=0x15ac8086 rev=0x00 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Ethernet Connection X552 10 GbE SFP+'
    class      = network
    subclass   = ethernet


uname -a: FreeBSD u0823 12.0-CURRENT FreeBSD 12.0-CURRENT #0: Tue Dec 13 23:36:46 UTC 2016     root@s254:/usr/obj/diskless/os/FreeBSD/12-CURRENT_2016-11-30_static/usr/src/sys/VALIDATION  amd64

at boot:

ix0: <Intel(R) PRO/10GbE PCI-Express Network Driver, Version - 3.1.13-k> mem 0xf9c00000-0xf9dfffff,0xf9e04000-0xf9e07fff irq 11 at device 0.0 on pci5
ix0: Using MSIX interrupts with 9 vectors
ix0: No SFP+ Module found
ix0: Ethernet address: 00:25:90:5d:ef:3c
ix0: netmap queues/slots: TX 8/2048, RX 8/2048
ix1: <Intel(R) PRO/10GbE PCI-Express Network Driver, Version - 3.1.13-k> mem 0xf9a00000-0xf9bfffff,0xf9e00000-0xf9e03fff irq 10 at device 0.1 on pci5
ix1: Using MSIX interrupts with 9 vectors
ix1: No SFP+ Module found
ix1: Ethernet address: 00:25:90:5d:ef:3d
ix1: netmap queues/slots: TX 8/2048, RX 8/2048

after boot:

ix0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=e407bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 00:25:90:5d:ef:3c
        inet 190.2.8.23 netmask 0xffff0000 broadcast 190.2.255.255
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: no carrier
ix1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=e407bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 00:25:90:5d:ef:3d
        inet 190.3.8.23 netmask 0xffff0000 broadcast 190.3.255.255
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: no carrier


Jeff
Comment 3 Jeff Pieper 2016-12-14 00:34:23 UTC
According to the submitter, plugging in media, and ifconfig down and up should repro it, but does not for me:

ix0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=e407bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 00:25:90:5d:ef:3c
        inet 190.2.8.23 netmask 0xffff0000 broadcast 190.2.255.255
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (Unknown <rxpause,txpause>)
        status: active
ix1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=e407bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 00:25:90:5d:ef:3d
        inet 190.3.8.23 netmask 0xffff0000 broadcast 190.3.255.255
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (Unknown <rxpause,txpause>)
        status: active

[root@u0823 ~]# ping 190.2.8.9
PING 190.2.8.9 (190.2.8.9): 56 data bytes
64 bytes from 190.2.8.9: icmp_seq=0 ttl=64 time=0.262 ms
64 bytes from 190.2.8.9: icmp_seq=1 ttl=64 time=0.132 ms
64 bytes from 190.2.8.9: icmp_seq=2 ttl=64 time=0.140 ms
64 bytes from 190.2.8.9: icmp_seq=3 ttl=64 time=0.114 ms
^C
--- 190.2.8.9 ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.114/0.162/0.262/0.058 ms
[root@u0823 ~]# ping 190.3.8.9
PING 190.3.8.9 (190.3.8.9): 56 data bytes
64 bytes from 190.3.8.9: icmp_seq=0 ttl=64 time=0.102 ms
64 bytes from 190.3.8.9: icmp_seq=1 ttl=64 time=0.089 ms
64 bytes from 190.3.8.9: icmp_seq=2 ttl=64 time=0.101 ms
64 bytes from 190.3.8.9: icmp_seq=3 ttl=64 time=0.125 ms
^C
--- 190.3.8.9 ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.089/0.104/0.125/0.013 ms

The media type isn't detected, but that is something we know about and will be addressed in the next commit.
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2021-05-14 22:30:37 UTC
^Triage: reassign to pool by assignee request.

To submitter: is this PR still valid?
Comment 5 Kevin Bowling freebsd_committer freebsd_triage 2023-08-14 03:22:53 UTC
I neither see this issue on an x552 and a lot of these are deployed with FreeBSD by Netgate.  I wonder if it is something specific about the OpenBSD driver?  I am closing this, but feel free to reopen if you can provide more details.