Project

General

Profile

Bug #3667 » ixgbe_unsupported_sfp.patch

Sašo Kiselkov, 2013-04-02 07:39 PM

View differences:

new/usr/src/uts/common/io/ixgbe/ixgbe.conf Tue Apr 2 00:07:41 2013
24 24
# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
25 25
# Use is subject to license terms.
26 26
#
27
# Copyright (c) 2013 Saso Kiselkov. All rights reserved.
27 28
#
29
#
28 30
# Driver.conf file for Intel 10GbE PCIE NIC Driver (ixgbe)
29 31
#
30 32
# -------------------- Jumbo Frame --------------------
......
70 72
#	Allowed values:	1 - 64 (for Intel 82599 10Gb ethernet controller)
71 73
#	Default value:	1
72 74
#
75
# allow_unsupported_sfp
76
#	Allow use of unsupported (non-Intel) SFP modules in adapters with
77
#	pluggable optics
78
#	Allowed values: 0 - 1
79
#	Default value: 0
80
#
73 81
# -------- How to set parameters for a particular interface ---------
74 82
# The example below shows how to locate the device path and set a parameter
75 83
# for a particular ixgbe interface. (Using flow_control as an example)
76
-- old/usr/src/uts/common/io/ixgbe/ixgbe_main.c	Tue Apr  2 00:07:41 2013
84
++ new/usr/src/uts/common/io/ixgbe/ixgbe_main.c	Tue Apr  2 00:07:41 2013
......
27 27
 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
28 28
 * Copyright (c) 2012, Joyent, Inc. All rights reserved.
29 29
 * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
30
 * Copyright (c) 2013 Saso Kiselkov. All rights reserved.
30 31
 */
31 32

  
32 33
#include "ixgbe_sw.h"
......
3172 3173
	 */
3173 3174
	if (hw->mac.type == ixgbe_mac_82599EB || hw->mac.type == ixgbe_mac_X540)
3174 3175
		ixgbe->intr_throttling[0] = ixgbe->intr_throttling[0] & 0xFF8;
3176

  
3177
	hw->allow_unsupported_sfp = ixgbe_get_prop(ixgbe,
3178
	    PROP_ALLOW_UNSUPPORTED_SFP, 0, 1, DEFAULT_ALLOW_UNSUPPORTED_SFP);
3175 3179
}
3176 3180

  
3177 3181
static void
3178
-- old/usr/src/uts/common/io/ixgbe/ixgbe_phy.c	Tue Apr  2 00:07:42 2013
3182
++ new/usr/src/uts/common/io/ixgbe/ixgbe_phy.c	Tue Apr  2 00:07:42 2013
......
1214 1214
					      "untested modules.\n", status);
1215 1215
					status = IXGBE_SUCCESS;
1216 1216
				} else {
1217
					DEBUGOUT("SFP+ module not supported\n");
1217
					EWARN(hw, "SFP+ module not supported\n",
1218
					      status);
1218 1219
					hw->phy.type =
1219 1220
						ixgbe_phy_sfp_unsupported;
1220 1221
					status = IXGBE_ERR_SFP_NOT_SUPPORTED;
1221
-- old/usr/src/uts/common/io/ixgbe/ixgbe_sw.h	Tue Apr  2 00:07:42 2013
1222
++ new/usr/src/uts/common/io/ixgbe/ixgbe_sw.h	Tue Apr  2 00:07:42 2013
......
25 25

  
26 26
/*
27 27
 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
28
 * Copyright (c) 2013 Saso Kiselkov. All rights reserved.
28 29
 */
29 30

  
30 31
#ifndef	_IXGBE_SW_H
......
166 167
#define	DEFAULT_MR_ENABLE		B_TRUE
167 168
#define	DEFAULT_TX_HEAD_WB_ENABLE	B_TRUE
168 169
#define	DEFAULT_RELAX_ORDER_ENABLE	B_TRUE
170
#define	DEFAULT_ALLOW_UNSUPPORTED_SFP	B_FALSE
169 171

  
170 172
#define	IXGBE_LSO_MAXLEN		65535
171 173

  
......
232 234
#define	PROP_RX_LIMIT_PER_INTR		"rx_limit_per_intr"
233 235
#define	PROP_INTR_THROTTLING		"intr_throttling"
234 236
#define	PROP_FM_CAPABLE			"fm_capable"
237
#define	PROP_ALLOW_UNSUPPORTED_SFP	"allow_unsupported_sfp"
235 238

  
236 239
#define	IXGBE_LB_NONE			0
237 240
#define	IXGBE_LB_EXTERNAL		1
(2-2/2)