Date: Thu, 10 Jun 2010 15:04:37 -0400 From: Alexander Sack <pisymbol@gmail.com> To: Jack Vogel <jfvogel@gmail.com> Cc: Juli Mallett <jmallett@freebsd.org>, freebsd-net@freebsd.org Subject: Re: Dual-rate transceivers with ixgbe? Message-ID: <AANLkTikjs42mE5QHnSvZ9x9DI1xfYowvIES-DRORz6hH@mail.gmail.com> In-Reply-To: <AANLkTikqjQic_M3mX7OTx-V0OJxbk4vzxajPmHmIUAKa@mail.gmail.com> References: <AANLkTinO9NZ8F9TeS68I2ULQgdlMGzlXkinCsywWosAM@mail.gmail.com> <AANLkTinS607kd3wc3F2WWmA6Zk9KL4GhscxEHPtcvxA5@mail.gmail.com> <AANLkTimkxOn9h6SAkTPDqfUM9kl2CZiFrZC_BuNDfRyB@mail.gmail.com> <AANLkTikcQMXk8UebmaynOeeInGiwx8yr0NMGE1yJfm8u@mail.gmail.com> <AANLkTil_YRvU54qHtIMO7mP4yYjojeHVrCHaRcl2K2Ug@mail.gmail.com> <AANLkTim5Ao9nSh6T6HF7NztLgvbTzxuVyr8lSXAJ7bMo@mail.gmail.com> <AANLkTim9-Za5mzLTw7MDAHY_TuIQsQ0SF0_1xpxyGY7v@mail.gmail.com> <AANLkTik-V2frmirwBLtg4RemdEVvPhUmVsOP7CqEkvUi@mail.gmail.com> <AANLkTikqjQic_M3mX7OTx-V0OJxbk4vzxajPmHmIUAKa@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Thu, Jun 10, 2010 at 1:58 PM, Jack Vogel <jfvogel@gmail.com> wrote:
> I believe I've explained this once before. The limitation code is put in
> explicitly
> because its what we support and all we support, we know that some hardware
> out there will not work, some may.
>
> If you buy the hardware you would be wise to make sure you get what's
> supported,
> but please don't ask me how to hack around it or what it means when you have
> problems when you do. In the first place I dont have the time, second, I
> do not
> have the hardware or means to test that, and finally I need to abide by what
> my
> management tells me... you do all want me to keep my job yes? :)
I certainly do Jack! LOL.
However, would it be possible to please make this a kenv tunable in
the driver? Its kinda stupid I have to recompile to add a SFP. It
can certainly be an unsupported feature by you.
Patch attached. Tested with CURRENT driver on a 7.2-amd64-release
machine. If you set the tunable to 1, ixgbe loads without issue. If
you leave it to zero (default), it will not attach to unsupported
SFPs.
I also added DEBUGOUT6 since it was missing and caused a compilation
failure when I turned on in-driver debugging.
What do you think?
-aps
[-- Attachment #2 --]
Index: ixgbe.c
===================================================================
--- ixgbe.c (revision 208950)
+++ ixgbe.c (working copy)
@@ -284,6 +284,13 @@
static int ixgbe_rxd = PERFORM_RXD;
TUNABLE_INT("hw.ixgbe.rxd", &ixgbe_rxd);
+/*
+ * Allow configuration of unsupported SFPs.
+ * Use at your own risk.
+ */
+int ixgbe_allow_unsupported_sfp = 0;
+TUNABLE_INT("hw.ixgbe.allow_unsupported_sfp", &ixgbe_allow_unsupported_sfp);
+
/* Keep running tab on them for sanity check */
static int ixgbe_total_ports;
Index: ixgbe_phy.c
===================================================================
--- ixgbe_phy.c (revision 208950)
+++ ixgbe_phy.c (working copy)
@@ -49,6 +49,8 @@
static bool ixgbe_get_i2c_data(u32 *i2cctl);
void ixgbe_i2c_bus_clear(struct ixgbe_hw *hw);
+extern int ixgbe_allow_unsupported_sfp;
+
/**
* ixgbe_init_phy_ops_generic - Inits PHY function ptrs
* @hw: pointer to the hardware structure
@@ -1106,7 +1108,8 @@
}
ixgbe_get_device_caps(hw, &enforce_sfp);
- if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP)) {
+ if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP) &&
+ (ixgbe_allow_unsupported_sfp == 0)) {
/* Make sure we're a supported PHY type */
if (hw->phy.type == ixgbe_phy_sfp_intel) {
status = IXGBE_SUCCESS;
Index: ixgbe_osdep.h
===================================================================
--- ixgbe_osdep.h (revision 208950)
+++ ixgbe_osdep.h (working copy)
@@ -67,6 +67,7 @@
#define DEBUGOUT1(S,A) printf(S "\n",A)
#define DEBUGOUT2(S,A,B) printf(S "\n",A,B)
#define DEBUGOUT3(S,A,B,C) printf(S "\n",A,B,C)
+ #define DEBUGOUT6(S,A,B,C,D,E,F) printf(S "\n",A,B,C,D,E,F)
#define DEBUGOUT7(S,A,B,C,D,E,F,G) printf(S "\n",A,B,C,D,E,F,G)
#else
#define DEBUGOUT(S)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikjs42mE5QHnSvZ9x9DI1xfYowvIES-DRORz6hH>
