From owner-freebsd-net@FreeBSD.ORG Thu Jun 10 21:12:35 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DF021065674; Thu, 10 Jun 2010 21:12:35 +0000 (UTC) (envelope-from aboyer@averesystems.com) Received: from zimbra.averesystems.com (75-149-8-243-Pennsylvania.hfc.comcastbusiness.net [75.149.8.243]) by mx1.freebsd.org (Postfix) with ESMTP id 01A7B8FC17; Thu, 10 Jun 2010 21:12:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zimbra.averesystems.com (Postfix) with ESMTP id 7F3408BC915; Thu, 10 Jun 2010 17:12:59 -0400 (EDT) X-Virus-Scanned: amavisd-new at averesystems.com Received: from zimbra.averesystems.com ([127.0.0.1]) by localhost (zimbra.averesystems.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A5erruFjJnzX; Thu, 10 Jun 2010 17:12:58 -0400 (EDT) Received: from riven.arriad.com (fw.arriad.com [10.0.0.16]) by zimbra.averesystems.com (Postfix) with ESMTPSA id 87BDE8BC048; Thu, 10 Jun 2010 17:12:58 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Andrew Boyer In-Reply-To: Date: Thu, 10 Jun 2010 17:12:32 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <82D310BD-48DE-4F79-84C6-356AB4F04C42@averesystems.com> References: To: Alexander Sack X-Mailer: Apple Mail (2.1078) Cc: Juli Mallett , freebsd-net@freebsd.org, Jack Vogel Subject: Re: Dual-rate transceivers with ixgbe? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2010 21:12:35 -0000 On Jun 10, 2010, at 3:59 PM, Alexander Sack wrote: >=20 >> One thing that the base driver probably ought to do is not fail in >> attach if there's an unrecognized SFP+ module. Since we get >> interrupts on module change (although this doesn't seem to always = work >> *entirely* right in the stock sources, mostly wrt stored values of >> AUTOC and the like) it should be possible to bring the interface up >> with the unsupported (and disabled) SFP+ module and do the SFP+ = module >> probing we already do on hot-swap. >=20 > Alright, let me see if I can test that. Let me rephrase so I validate > what you are saying: >=20 > The driver can come up with an unsupported module but disable the > interface (ifconfig shows the interface, etc.). >=20 > If you then hot-swap a supported SFP, it should come up then with a > ifconfig down/up cycle. Right? >=20 > As it stand now, if you load the driver with an unsupported module, it > will not attach at all causing you to reload the entire driver OR > reboot the box to have it reattach to the other SFP. >=20 We use this patch to allow the driver to attach when no module is = installed. This might be a starting point for you. I haven't tested it = without all of our other changes in place so my apologies if it doesn't = quite work. We only have Intel modules around for testing. -Andrew --- ixgbe.c 2010-06-10 16:53:08.000000000 -0400 +++ ixgbe.c 2010-06-10 16:55:26.000000000 -0400 @@ -566,7 +566,7 @@ } else if (error =3D=3D IXGBE_ERR_SFP_NOT_SUPPORTED) device_printf(dev,"Unsupported SFP+ Module\n"); =20 - if (error) { + if (error && error !=3D IXGBE_ERR_SFP_NOT_PRESENT) { error =3D EIO; device_printf(dev,"Hardware Initialization Failure\n"); goto err_late; --- ixgbe_82598.c 2010-06-10 16:53:24.000000000 -0400 +++ ixgbe_82598.c 2010-06-10 16:56:31.000000000 -0400 @@ -257,10 +257,6 @@ ret_val =3D ixgbe_get_sfp_init_sequence_offsets(hw, = &list_offset, = &data_offset); - if (ret_val !=3D IXGBE_SUCCESS) { - ret_val =3D IXGBE_ERR_SFP_NOT_SUPPORTED; - goto out; - } break; default: break; -------------------------------------------------- Andrew Boyer aboyer@averesystems.com