From nobody@FreeBSD.org  Wed Nov 13 10:20:31 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 7823767F
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 13 Nov 2013 10:20:31 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 68CA824B5
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 13 Nov 2013 10:20:31 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rADAKVPl031492
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 13 Nov 2013 10:20:31 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rADAKVL6031491;
	Wed, 13 Nov 2013 10:20:31 GMT
	(envelope-from nobody)
Message-Id: <201311131020.rADAKVL6031491@oldred.freebsd.org>
Date: Wed, 13 Nov 2013 10:20:31 GMT
From: Vladimir Pushkar <vladimir.pushkar@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Incorrect ifconfig media on INTEL X520-T2 10G Dual-port Ethernet Server Adapter, RJ45/2
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         183920
>Category:       kern
>Synopsis:       [ixgbe] [patch] Incorrect ifconfig media on INTEL X520-T2 10G Dual-port Ethernet Server Adapter, RJ45/2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-net
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 13 10:30:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Sun May 04 05:22:46 UTC 2014
>Originator:     Vladimir Pushkar
>Release:        9.2-STABLE
>Organization:
Dune HD
>Environment:
FreeBSD storage.ua.dune-hd.com 9.2-STABLE FreeBSD 9.2-STABLE #5: Wed Nov  6 13:01:31 UTC 2013     root@storage.ua.dune-hd.com:/usr/obj/usr/src/sys/STORAGE  amd64

>Description:
Incorrect media (1000baseSX instead of 1000baseT) shown in ifconfig
with INTEL X520-T2 10G Dual-port Ethernet Server Adapter, RJ45/2 when
connecting to the gigabit switch with copper ports:

ix0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=407bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO>
	ether 00:1e:67:07:80:d8
	media: Ethernet autoselect (1000baseSX <full-duplex>)
	status: active
ix1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=407bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO>
	ether 00:1e:67:07:80:d8
	media: Ethernet autoselect (1000baseSX <full-duplex>)
	status: active

Current network adapter doesn't have optic ports or modules, only built-
in copper ports. That's why can't gather this interfaces with other
gigabit in lagg with lacp (but this is another problem fixed in PR: 176097).
>How-To-Repeat:
Simply ifconfig ixX up, where X is the number of interface.
>Fix:
Quick and dirty hack is to replace the IFM_1000_SX with IFM_1000_T in ixgbe.c:
--- /root/ixgbe.c	2013-11-06 12:42:31.993273871 +0000
+++ /sys/dev/ixgbe/ixgbe.c	2013-11-06 12:58:05.657453811 +0000
@@ -1693,7 +1693,7 @@
 			ifmr->ifm_active |= IFM_100_TX | IFM_FDX;
 			break;
 		case IXGBE_LINK_SPEED_1GB_FULL:
-			ifmr->ifm_active |= IFM_1000_SX | IFM_FDX;
+			ifmr->ifm_active |= IFM_1000_T | IFM_FDX;
 			break;
 		case IXGBE_LINK_SPEED_10GB_FULL:
 			ifmr->ifm_active |= adapter->optics | IFM_FDX;


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun May 4 05:21:46 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer(s). 

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