From nobody@FreeBSD.org  Sat Nov 10 01:09:01 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 1E38B435
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 10 Nov 2012 01:09:01 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id DEF528FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 10 Nov 2012 01:09:00 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qAA190b9010331
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 10 Nov 2012 01:09:00 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id qAA1905v010330;
	Sat, 10 Nov 2012 01:09:00 GMT
	(envelope-from nobody)
Message-Id: <201211100109.qAA1905v010330@red.freebsd.org>
Date: Sat, 10 Nov 2012 01:09:00 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [cxgbe] Doesn't detect link-up after driver is first loaded
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         173516
>Category:       kern
>Synopsis:       [cxgbe] Doesn't detect link-up after driver is first loaded
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 10 01:10:00 UTC 2012
>Closed-Date:    Tue Mar 18 18:42:56 UTC 2014
>Last-Modified:  Tue Mar 18 18:42:56 UTC 2014
>Originator:     Garrett Cooper
>Release:        9.1-PRERELEASE
>Organization:
EMC Isilon
>Environment:
FreeBSD wf158.west.isilon.com 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #2: Tue Nov  6 14:00:42 PST 2012     root@wf158.west.isilon.com:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
Doing

kldload cxgbe
ifconfig cxgbe

doesn't show an up state:

# kldstat -v | grep cxgbe && echo found || echo not found
not found
# kldload if_cxgbe
# kldstat -v | grep cxgbe && echo found || echo not found
 3    1 0xffffffff81612000 20a42    if_cxgbe.ko (/boot/kernel/if_cxgbe.ko)
                478 t4nex/cxgbe
found
# ifconfig cxgbe0
cxgbe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=6c07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 00:07:43:13:47:40
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-SR <full-duplex>
        status: no carrier
# ifconfig cxgbe1
cxgbe1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=6c07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 00:07:43:13:47:48
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-SR <full-duplex>
        status: no carrier

Only if I do an ifconfig up does the driver actually detect link-up:

root@wf158:~ # ifconfig cxgbe1 up
root@wf158:~ # ifconfig cxgbe0 up
root@wf158:~ # ifconfig cxgbe1
cxgbe1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=6c07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 00:07:43:13:47:48
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-SR <full-duplex>
        status: active
root@wf158:~ # ifconfig cxgbe0
cxgbe0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=6c07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 00:07:43:13:47:40
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-SR <full-duplex>
        status: active
>How-To-Repeat:
kldload if_cxgbe
ifconfig cxgbe
>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: np 
State-Changed-When: Tue Mar 18 18:39:37 UTC 2014 
State-Changed-Why:  
This is as designed.  The driver powers up the PHY only when the link 
is administratively up.  So you do need an ifconfig up in order for 
link state to be reported accurately. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173516 
>Unformatted:
