diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-04 11:47:58 -0700 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-04 11:47:58 -0700 | 
| commit | 6ba74014c1ab0e37af7de6f64b4eccbbae3cb9e7 (patch) | |
| tree | 8f3892fc44f1e403675a6d7e88fda5c70e56ee4c /drivers/net/ixgbe/ixgbe_phy.c | |
| parent | 5abd9ccced7a726c817dd6b5b96bc933859138d1 (diff) | |
| parent | 3ff1c25927e3af61c6bf0e4ed959504058ae4565 (diff) | |
| download | olio-linux-3.10-6ba74014c1ab0e37af7de6f64b4eccbbae3cb9e7.tar.xz olio-linux-3.10-6ba74014c1ab0e37af7de6f64b4eccbbae3cb9e7.zip  | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1443 commits)
  phy/marvell: add 88ec048 support
  igb: Program MDICNFG register prior to PHY init
  e1000e: correct MAC-PHY interconnect register offset for 82579
  hso: Add new product ID
  can: Add driver for esd CAN-USB/2 device
  l2tp: fix export of header file for userspace
  can-raw: Fix skb_orphan_try handling
  Revert "net: remove zap_completion_queue"
  net: cleanup inclusion
  phy/marvell: add 88e1121 interface mode support
  u32: negative offset fix
  net: Fix a typo from "dev" to "ndev"
  igb: Use irq_synchronize per vector when using MSI-X
  ixgbevf: fix null pointer dereference due to filter being set for VLAN 0
  e1000e: Fix irq_synchronize in MSI-X case
  e1000e: register pm_qos request on hardware activation
  ip_fragment: fix subtracting PPPOE_SES_HLEN from mtu twice
  net: Add getsockopt support for TCP thin-streams
  cxgb4: update driver version
  cxgb4: add new PCI IDs
  ...
Manually fix up conflicts in:
 - drivers/net/e1000e/netdev.c: due to pm_qos registration
   infrastructure changes
 - drivers/net/phy/marvell.c: conflict between adding 88ec048 support
   and cleaning up the IDs
 - drivers/net/wireless/ipw2x00/ipw2100.c: trivial ipw2100_pm_qos_req
   conflict (registration change vs marking it static)
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_phy.c')
| -rw-r--r-- | drivers/net/ixgbe/ixgbe_phy.c | 33 | 
1 files changed, 29 insertions, 4 deletions
diff --git a/drivers/net/ixgbe/ixgbe_phy.c b/drivers/net/ixgbe/ixgbe_phy.c index 48325a5beff..6c0d42e33f2 100644 --- a/drivers/net/ixgbe/ixgbe_phy.c +++ b/drivers/net/ixgbe/ixgbe_phy.c @@ -577,6 +577,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)  		 * 6    SFP_SR/LR_CORE1 - 82599-specific  		 * 7    SFP_act_lmt_DA_CORE0 - 82599-specific  		 * 8    SFP_act_lmt_DA_CORE1 - 82599-specific +		 * 9    SFP_1g_cu_CORE0 - 82599-specific +		 * 10   SFP_1g_cu_CORE1 - 82599-specific  		 */  		if (hw->mac.type == ixgbe_mac_82598EB) {  			if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) @@ -625,6 +627,13 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)  				else  					hw->phy.sfp_type =  					              ixgbe_sfp_type_srlr_core1; +			else if (comp_codes_1g & IXGBE_SFF_1GBASET_CAPABLE) +				if (hw->bus.lan_id == 0) +					hw->phy.sfp_type = +						ixgbe_sfp_type_1g_cu_core0; +				else +					hw->phy.sfp_type = +						ixgbe_sfp_type_1g_cu_core1;  			else  				hw->phy.sfp_type = ixgbe_sfp_type_unknown;  		} @@ -696,8 +705,10 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)  			goto out;  		} -		/* 1G SFP modules are not supported */ -		if (comp_codes_10g == 0) { +		/* Verify supported 1G SFP modules */ +		if (comp_codes_10g == 0 && +		    !(hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1 || +		      hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0)) {  			hw->phy.type = ixgbe_phy_sfp_unsupported;  			status = IXGBE_ERR_SFP_NOT_SUPPORTED;  			goto out; @@ -711,7 +722,9 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)  		/* This is guaranteed to be 82599, no need to check for NULL */  		hw->mac.ops.get_device_caps(hw, &enforce_sfp); -		if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP)) { +		if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP) && +		    !((hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0) || +		      (hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1))) {  			/* Make sure we're a supported PHY type */  			if (hw->phy.type == ixgbe_phy_sfp_intel) {  				status = 0; @@ -742,6 +755,7 @@ s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,                                          u16 *data_offset)  {  	u16 sfp_id; +	u16 sfp_type = hw->phy.sfp_type;  	if (hw->phy.sfp_type == ixgbe_sfp_type_unknown)  		return IXGBE_ERR_SFP_NOT_SUPPORTED; @@ -753,6 +767,17 @@ s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,  	    (hw->phy.sfp_type == ixgbe_sfp_type_da_cu))  		return IXGBE_ERR_SFP_NOT_SUPPORTED; +	/* +	 * Limiting active cables and 1G Phys must be initialized as +	 * SR modules +	 */ +	if (sfp_type == ixgbe_sfp_type_da_act_lmt_core0 || +	    sfp_type == ixgbe_sfp_type_1g_cu_core0) +		sfp_type = ixgbe_sfp_type_srlr_core0; +	else if (sfp_type == ixgbe_sfp_type_da_act_lmt_core1 || +	         sfp_type == ixgbe_sfp_type_1g_cu_core1) +		sfp_type = ixgbe_sfp_type_srlr_core1; +  	/* Read offset to PHY init contents */  	hw->eeprom.ops.read(hw, IXGBE_PHY_INIT_OFFSET_NL, list_offset); @@ -769,7 +794,7 @@ s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,  	hw->eeprom.ops.read(hw, *list_offset, &sfp_id);  	while (sfp_id != IXGBE_PHY_INIT_END_NL) { -		if (sfp_id == hw->phy.sfp_type) { +		if (sfp_id == sfp_type) {  			(*list_offset)++;  			hw->eeprom.ops.read(hw, *list_offset, data_offset);  			if ((!*data_offset) || (*data_offset == 0xFFFF)) {  |