# HG changeset patch # User Saso Kiselkov # Date 1364930232 14400 # Node ID e0554f834eb0ec759c6848de29f693abea7f6c38 # Parent 29315ace9c5bb29d2386d43a98fafb9e3fa7c9c7 3667 Allow ixgbe to use unsupported SFP modules Reviewed by: Keith Wesolowski Reviewed by: Richard Lowe Approved by: Dan McDonald diff -r 29315ace9c5b -r e0554f834eb0 usr/src/uts/common/io/ixgbe/ixgbe.conf --- a/usr/src/uts/common/io/ixgbe/ixgbe.conf Thu Mar 28 00:04:59 2013 +0400 +++ b/usr/src/uts/common/io/ixgbe/ixgbe.conf Tue Apr 02 15:17:12 2013 -0400 @@ -24,6 +24,8 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2013 Saso Kiselkov. All rights reserved. +# # # Driver.conf file for Intel 10GbE PCIE NIC Driver (ixgbe) # @@ -70,6 +72,12 @@ # Allowed values: 1 - 64 (for Intel 82599 10Gb ethernet controller) # Default value: 1 # +# allow_unsupported_sfp +# Allow use of unsupported (non-Intel) SFP modules in adapters with +# pluggable optics +# Allowed values: 0 - 1 +# Default value: 0 +# # -------- How to set parameters for a particular interface --------- # The example below shows how to locate the device path and set a parameter # for a particular ixgbe interface. (Using flow_control as an example) diff -r 29315ace9c5b -r e0554f834eb0 usr/src/uts/common/io/ixgbe/ixgbe_main.c --- a/usr/src/uts/common/io/ixgbe/ixgbe_main.c Thu Mar 28 00:04:59 2013 +0400 +++ b/usr/src/uts/common/io/ixgbe/ixgbe_main.c Tue Apr 02 15:17:12 2013 -0400 @@ -27,6 +27,7 @@ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright 2012 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2013 Saso Kiselkov. All rights reserved. */ #include "ixgbe_sw.h" @@ -3172,6 +3173,9 @@ */ if (hw->mac.type == ixgbe_mac_82599EB || hw->mac.type == ixgbe_mac_X540) ixgbe->intr_throttling[0] = ixgbe->intr_throttling[0] & 0xFF8; + + hw->allow_unsupported_sfp = ixgbe_get_prop(ixgbe, + PROP_ALLOW_UNSUPPORTED_SFP, 0, 1, DEFAULT_ALLOW_UNSUPPORTED_SFP); } static void diff -r 29315ace9c5b -r e0554f834eb0 usr/src/uts/common/io/ixgbe/ixgbe_phy.c --- a/usr/src/uts/common/io/ixgbe/ixgbe_phy.c Thu Mar 28 00:04:59 2013 +0400 +++ b/usr/src/uts/common/io/ixgbe/ixgbe_phy.c Tue Apr 02 15:17:12 2013 -0400 @@ -1214,7 +1214,8 @@ "untested modules.\n", status); status = IXGBE_SUCCESS; } else { - DEBUGOUT("SFP+ module not supported\n"); + EWARN(hw, "SFP+ module not supported\n", + status); hw->phy.type = ixgbe_phy_sfp_unsupported; status = IXGBE_ERR_SFP_NOT_SUPPORTED; diff -r 29315ace9c5b -r e0554f834eb0 usr/src/uts/common/io/ixgbe/ixgbe_sw.h --- a/usr/src/uts/common/io/ixgbe/ixgbe_sw.h Thu Mar 28 00:04:59 2013 +0400 +++ b/usr/src/uts/common/io/ixgbe/ixgbe_sw.h Tue Apr 02 15:17:12 2013 -0400 @@ -25,6 +25,7 @@ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013 Saso Kiselkov. All rights reserved. */ #ifndef _IXGBE_SW_H @@ -166,6 +167,7 @@ #define DEFAULT_MR_ENABLE B_TRUE #define DEFAULT_TX_HEAD_WB_ENABLE B_TRUE #define DEFAULT_RELAX_ORDER_ENABLE B_TRUE +#define DEFAULT_ALLOW_UNSUPPORTED_SFP B_FALSE #define IXGBE_LSO_MAXLEN 65535 @@ -232,6 +234,7 @@ #define PROP_RX_LIMIT_PER_INTR "rx_limit_per_intr" #define PROP_INTR_THROTTLING "intr_throttling" #define PROP_FM_CAPABLE "fm_capable" +#define PROP_ALLOW_UNSUPPORTED_SFP "allow_unsupported_sfp" #define IXGBE_LB_NONE 0 #define IXGBE_LB_EXTERNAL 1