From owner-freebsd-bugs@FreeBSD.ORG Thu Jan 13 14:30:11 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 119171065695 for ; Thu, 13 Jan 2011 14:30:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C77068FC0C for ; Thu, 13 Jan 2011 14:30:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p0DEUA5W080388 for ; Thu, 13 Jan 2011 14:30:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p0DEUAJZ080386; Thu, 13 Jan 2011 14:30:10 GMT (envelope-from gnats) Resent-Date: Thu, 13 Jan 2011 14:30:10 GMT Resent-Message-Id: <201101131430.p0DEUAJZ080386@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Steinar Haug Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44ACD1065670 for ; Thu, 13 Jan 2011 14:23:31 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 1957E8FC18 for ; Thu, 13 Jan 2011 14:23:31 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p0DENUoE097813 for ; Thu, 13 Jan 2011 14:23:30 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p0DENUNu097802; Thu, 13 Jan 2011 14:23:30 GMT (envelope-from nobody) Message-Id: <201101131423.p0DENUNu097802@red.freebsd.org> Date: Thu, 13 Jan 2011 14:23:30 GMT From: Steinar Haug To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/153951: Intel 10GBase-LR Ethernet card detected as 10GBase-SR X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 14:30:11 -0000 >Number: 153951 >Category: kern >Synopsis: Intel 10GBase-LR Ethernet card detected as 10GBase-SR >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jan 13 14:30:10 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Steinar Haug >Release: 8.2-RC1 >Organization: Nethelp Consulting >Environment: FreeBSD sniffy.lab.ventelo.net 8.2-RC1 FreeBSD 8.2-RC1 #0: Thu Jan 13 14:41:42 CET 2011 sthaug@sniffy.lab.ventelo.net:/usr/src/sys/amd64/compile/GENERIC amd64 >Description: 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 >How-To-Repeat: Insert Intel X520-LR1 Ethernet card into server, compile kernel with ixgbe driver, reboot, type ifconfig, look at the values for the detected ixN card. >Fix: Fix pasted in so space/tabs won't be correct: --- 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 : >Release-Note: >Audit-Trail: >Unformatted: