diff options
author | PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com> | 2009-04-08 09:20:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-11 04:43:12 -0400 |
commit | 87c1201708381c2791caa78a2caf217778633277 (patch) | |
tree | befc0d49e977c162cba5d1ec2996be25342afe96 /drivers/net/ixgbe/ixgbe_82599.c | |
parent | d543103a0c75edc0a7a08dfd796de67466a15dfb (diff) |
ixgbe: Move the LED blink code to common, since 82599 also uses it
The LED blink code is common for 82599 as well. It should be moved to
ixgbe_common.c so both devices can use it, and not have it duplicated.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_82599.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_82599.c | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c index beae7e012609..29771fbaa42d 100644 --- a/drivers/net/ixgbe/ixgbe_82599.c +++ b/drivers/net/ixgbe/ixgbe_82599.c | |||
@@ -68,8 +68,6 @@ s32 ixgbe_clear_vmdq_82599(struct ixgbe_hw *hw, u32 rar, u32 vmdq); | |||
68 | s32 ixgbe_set_vfta_82599(struct ixgbe_hw *hw, u32 vlan, | 68 | s32 ixgbe_set_vfta_82599(struct ixgbe_hw *hw, u32 vlan, |
69 | u32 vind, bool vlan_on); | 69 | u32 vind, bool vlan_on); |
70 | s32 ixgbe_clear_vfta_82599(struct ixgbe_hw *hw); | 70 | s32 ixgbe_clear_vfta_82599(struct ixgbe_hw *hw); |
71 | s32 ixgbe_blink_led_stop_82599(struct ixgbe_hw *hw, u32 index); | ||
72 | s32 ixgbe_blink_led_start_82599(struct ixgbe_hw *hw, u32 index); | ||
73 | s32 ixgbe_init_uta_tables_82599(struct ixgbe_hw *hw); | 71 | s32 ixgbe_init_uta_tables_82599(struct ixgbe_hw *hw); |
74 | s32 ixgbe_read_analog_reg8_82599(struct ixgbe_hw *hw, u32 reg, u8 *val); | 72 | s32 ixgbe_read_analog_reg8_82599(struct ixgbe_hw *hw, u32 reg, u8 *val); |
75 | s32 ixgbe_write_analog_reg8_82599(struct ixgbe_hw *hw, u32 reg, u8 val); | 73 | s32 ixgbe_write_analog_reg8_82599(struct ixgbe_hw *hw, u32 reg, u8 val); |
@@ -991,40 +989,6 @@ s32 ixgbe_clear_vfta_82599(struct ixgbe_hw *hw) | |||
991 | } | 989 | } |
992 | 990 | ||
993 | /** | 991 | /** |
994 | * ixgbe_blink_led_start_82599 - Blink LED based on index. | ||
995 | * @hw: pointer to hardware structure | ||
996 | * @index: led number to blink | ||
997 | **/ | ||
998 | s32 ixgbe_blink_led_start_82599(struct ixgbe_hw *hw, u32 index) | ||
999 | { | ||
1000 | u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL); | ||
1001 | |||
1002 | led_reg &= ~IXGBE_LED_MODE_MASK(index); | ||
1003 | led_reg |= IXGBE_LED_BLINK(index); | ||
1004 | IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, led_reg); | ||
1005 | IXGBE_WRITE_FLUSH(hw); | ||
1006 | |||
1007 | return 0; | ||
1008 | } | ||
1009 | |||
1010 | /** | ||
1011 | * ixgbe_blink_led_stop_82599 - Stop blinking LED based on index. | ||
1012 | * @hw: pointer to hardware structure | ||
1013 | * @index: led number to stop blinking | ||
1014 | **/ | ||
1015 | s32 ixgbe_blink_led_stop_82599(struct ixgbe_hw *hw, u32 index) | ||
1016 | { | ||
1017 | u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL); | ||
1018 | |||
1019 | led_reg &= ~IXGBE_LED_MODE_MASK(index); | ||
1020 | led_reg &= ~IXGBE_LED_BLINK(index); | ||
1021 | IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, led_reg); | ||
1022 | IXGBE_WRITE_FLUSH(hw); | ||
1023 | |||
1024 | return 0; | ||
1025 | } | ||
1026 | |||
1027 | /** | ||
1028 | * ixgbe_init_uta_tables_82599 - Initialize the Unicast Table Array | 992 | * ixgbe_init_uta_tables_82599 - Initialize the Unicast Table Array |
1029 | * @hw: pointer to hardware structure | 993 | * @hw: pointer to hardware structure |
1030 | **/ | 994 | **/ |
@@ -1243,8 +1207,8 @@ static struct ixgbe_mac_operations mac_ops_82599 = { | |||
1243 | .get_link_capabilities = &ixgbe_get_link_capabilities_82599, | 1207 | .get_link_capabilities = &ixgbe_get_link_capabilities_82599, |
1244 | .led_on = &ixgbe_led_on_generic, | 1208 | .led_on = &ixgbe_led_on_generic, |
1245 | .led_off = &ixgbe_led_off_generic, | 1209 | .led_off = &ixgbe_led_off_generic, |
1246 | .blink_led_start = &ixgbe_blink_led_start_82599, | 1210 | .blink_led_start = &ixgbe_blink_led_start_generic, |
1247 | .blink_led_stop = &ixgbe_blink_led_stop_82599, | 1211 | .blink_led_stop = &ixgbe_blink_led_stop_generic, |
1248 | .set_rar = &ixgbe_set_rar_generic, | 1212 | .set_rar = &ixgbe_set_rar_generic, |
1249 | .clear_rar = &ixgbe_clear_rar_generic, | 1213 | .clear_rar = &ixgbe_clear_rar_generic, |
1250 | .set_vmdq = &ixgbe_set_vmdq_82599, | 1214 | .set_vmdq = &ixgbe_set_vmdq_82599, |