Commit 099e1cb7 authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller

igb: make serdes power down available for 82575 in addition to 82576 parts

There was a serdes power down workaround that was originally added for
82576 fiber.  However it has also been found that this workaround is needed
for serdes connections as well.  In addition it is also needed for 82575
serdes so we we need to remove the checks restricting it to 82576.
Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dcc3ae9a
...@@ -866,8 +866,7 @@ void igb_shutdown_fiber_serdes_link_82575(struct e1000_hw *hw) ...@@ -866,8 +866,7 @@ void igb_shutdown_fiber_serdes_link_82575(struct e1000_hw *hw)
{ {
u32 reg; u32 reg;
if (hw->mac.type != e1000_82576 || if (hw->phy.media_type != e1000_media_type_internal_serdes)
hw->phy.media_type != e1000_media_type_internal_serdes)
return; return;
/* if the management interface is not enabled, then power down */ /* if the management interface is not enabled, then power down */
...@@ -1228,10 +1227,6 @@ out: ...@@ -1228,10 +1227,6 @@ out:
static bool igb_sgmii_active_82575(struct e1000_hw *hw) static bool igb_sgmii_active_82575(struct e1000_hw *hw)
{ {
struct e1000_dev_spec_82575 *dev_spec = &hw->dev_spec._82575; struct e1000_dev_spec_82575 *dev_spec = &hw->dev_spec._82575;
if (hw->mac.type != e1000_82575 && hw->mac.type != e1000_82576)
return false;
return dev_spec->sgmii_active; return dev_spec->sgmii_active;
} }
......
...@@ -32,6 +32,11 @@ void igb_update_mc_addr_list(struct e1000_hw*, u8*, u32, u32, u32); ...@@ -32,6 +32,11 @@ void igb_update_mc_addr_list(struct e1000_hw*, u8*, u32, u32, u32);
extern void igb_shutdown_fiber_serdes_link_82575(struct e1000_hw *hw); extern void igb_shutdown_fiber_serdes_link_82575(struct e1000_hw *hw);
extern void igb_rx_fifo_flush_82575(struct e1000_hw *hw); extern void igb_rx_fifo_flush_82575(struct e1000_hw *hw);
#define ID_LED_DEFAULT_82575_SERDES ((ID_LED_DEF1_DEF2 << 12) | \
(ID_LED_DEF1_DEF2 << 8) | \
(ID_LED_DEF1_DEF2 << 4) | \
(ID_LED_OFF1_ON2))
#define E1000_RAR_ENTRIES_82575 16 #define E1000_RAR_ENTRIES_82575 16
#define E1000_RAR_ENTRIES_82576 24 #define E1000_RAR_ENTRIES_82576 24
......
...@@ -1064,9 +1064,17 @@ static s32 igb_valid_led_default(struct e1000_hw *hw, u16 *data) ...@@ -1064,9 +1064,17 @@ static s32 igb_valid_led_default(struct e1000_hw *hw, u16 *data)
goto out; goto out;
} }
if (*data == ID_LED_RESERVED_0000 || *data == ID_LED_RESERVED_FFFF) if (*data == ID_LED_RESERVED_0000 || *data == ID_LED_RESERVED_FFFF) {
*data = ID_LED_DEFAULT; switch(hw->phy.media_type) {
case e1000_media_type_internal_serdes:
*data = ID_LED_DEFAULT_82575_SERDES;
break;
case e1000_media_type_copper:
default:
*data = ID_LED_DEFAULT;
break;
}
}
out: out:
return ret_val; return ret_val;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment