From owner-freebsd-current@FreeBSD.ORG Thu Jan 13 14:43:33 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2E9410656B0 for ; Thu, 13 Jan 2011 14:43:33 +0000 (UTC) (envelope-from sthaug@nethelp.no) Received: from bizet.nethelp.no (bizet.nethelp.no [195.1.209.33]) by mx1.freebsd.org (Postfix) with SMTP id 518318FC20 for ; Thu, 13 Jan 2011 14:43:32 +0000 (UTC) Received: (qmail 33948 invoked from network); 13 Jan 2011 14:16:52 -0000 Received: from bizet.nethelp.no (HELO localhost) (195.1.209.33) by bizet.nethelp.no with SMTP; 13 Jan 2011 14:16:52 -0000 Date: Thu, 13 Jan 2011 15:16:52 +0100 (CET) Message-Id: <20110113.151652.104127547.sthaug@nethelp.no> To: freebsd-net@freebsd.org, freebsd-current@freebsd.org From: sthaug@nethelp.no X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Intel 10GBase-LR Ethernet card detected as 10GBase-SR X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 14:43:34 -0000 I have a server with an Intel X520-LR1 Ethernet card, which is a 10GBase-LR card: http://ark.intel.com/Product.aspx?id=41164 The card contains the Intel 82599ES controller: http://ark.intel.com/Product.aspx?id=41282 pciconf -lv shows: ix0@pci0:28:0:0: class=0x020000 card=0x00068086 chip=0x10fb8086 rev=0x01 hdr=0x00 vendor = 'Intel Corporation' class = network subclass = ethernet where /sys/dev/ixgbe/ixgbe_type.h has the PCI ID definition: #define IXGBE_DEV_ID_82599_SFP 0x10FB The problem is that this card is shown by ifconfig as a 10GBase-SR card: % ifconfig ix0 ix0: flags=8843 metric 0 mtu 1500 options=1bb ether 00:1b:21:7c:7b:94 media: Ethernet autoselect (10Gbase-SR ) status: active I believe this is due to the following code in /sys/dev/ixgbe/ixgbe.c line 423, routine ixgbe_attach(): case IXGBE_DEV_ID_82599_SFP: adapter->optics = IFM_10G_SR; I'm looking at version 1.17.2.12.2.1, from 8.2-RC1, but I see this code is the same in version 1.45, from HEAD: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/ixgbe/ixgbe.c?rev=1.45;content-type=text/plain I made a 1-line patch to the 8.2-RC1 code, enclosed below, and now have ifconfig showing the expected value: y% ifconfig ix0 ix0: flags=8843 metric 0 mtu 1500 options=1bb ether 00:1b:21:7c:7b:94 media: Ethernet autoselect (10Gbase-LR ) status: active Steinar Haug, Nethelp consulting, sthaug@nethelp.no ---------------------------------------------------------------------- --- ixgbe.c.orig 2010-12-21 18:09:25.000000000 +0100 +++ ixgbe.c 2011-01-13 14:31:14.000000000 +0100 @@ -421,7 +421,7 @@ adapter->optics = IFM_10G_LR; break; case IXGBE_DEV_ID_82599_SFP: - adapter->optics = IFM_10G_SR; + adapter->optics = IFM_10G_LR; ixgbe_num_segs = IXGBE_82599_SCATTER; break; case IXGBE_DEV_ID_82598_DA_DUAL_PORT :