aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_82598.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-04-16 20:35:26 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-16 20:35:26 -0400
commita54bfa40fd16aeb90bc556189221576f746f8567 (patch)
tree176bb7a99ffab5f42f0dd4e9671f335be3f3efa0 /drivers/net/ixgbe/ixgbe_82598.c
parentfe957c40ec5e2763b9977c565beab3bde3aaf85b (diff)
parent134ffb4cad92a6aa534e55a9be145bca780a32c1 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_82598.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_82598.c59
1 files changed, 2 insertions, 57 deletions
diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c
index a7ae4d45b53d..03eb54f4f1cc 100644
--- a/drivers/net/ixgbe/ixgbe_82598.c
+++ b/drivers/net/ixgbe/ixgbe_82598.c
@@ -921,61 +921,6 @@ static s32 ixgbe_clear_vfta_82598(struct ixgbe_hw *hw)
921} 921}
922 922
923/** 923/**
924 * ixgbe_blink_led_start_82598 - Blink LED based on index.
925 * @hw: pointer to hardware structure
926 * @index: led number to blink
927 **/
928static s32 ixgbe_blink_led_start_82598(struct ixgbe_hw *hw, u32 index)
929{
930 ixgbe_link_speed speed = 0;
931 bool link_up = 0;
932 u32 autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC);
933 u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);
934
935 /*
936 * Link must be up to auto-blink the LEDs on the 82598EB MAC;
937 * force it if link is down.
938 */
939 hw->mac.ops.check_link(hw, &speed, &link_up, false);
940
941 if (!link_up) {
942 autoc_reg |= IXGBE_AUTOC_FLU;
943 IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc_reg);
944 msleep(10);
945 }
946
947 led_reg &= ~IXGBE_LED_MODE_MASK(index);
948 led_reg |= IXGBE_LED_BLINK(index);
949 IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, led_reg);
950 IXGBE_WRITE_FLUSH(hw);
951
952 return 0;
953}
954
955/**
956 * ixgbe_blink_led_stop_82598 - Stop blinking LED based on index.
957 * @hw: pointer to hardware structure
958 * @index: led number to stop blinking
959 **/
960static s32 ixgbe_blink_led_stop_82598(struct ixgbe_hw *hw, u32 index)
961{
962 u32 autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC);
963 u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);
964
965 autoc_reg &= ~IXGBE_AUTOC_FLU;
966 autoc_reg |= IXGBE_AUTOC_AN_RESTART;
967 IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc_reg);
968
969 led_reg &= ~IXGBE_LED_MODE_MASK(index);
970 led_reg &= ~IXGBE_LED_BLINK(index);
971 led_reg |= IXGBE_LED_LINK_ACTIVE << IXGBE_LED_MODE_SHIFT(index);
972 IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, led_reg);
973 IXGBE_WRITE_FLUSH(hw);
974
975 return 0;
976}
977
978/**
979 * ixgbe_read_analog_reg8_82598 - Reads 8 bit Atlas analog register 924 * ixgbe_read_analog_reg8_82598 - Reads 8 bit Atlas analog register
980 * @hw: pointer to hardware structure 925 * @hw: pointer to hardware structure
981 * @reg: analog register to read 926 * @reg: analog register to read
@@ -1197,8 +1142,8 @@ static struct ixgbe_mac_operations mac_ops_82598 = {
1197 .get_link_capabilities = &ixgbe_get_link_capabilities_82598, 1142 .get_link_capabilities = &ixgbe_get_link_capabilities_82598,
1198 .led_on = &ixgbe_led_on_generic, 1143 .led_on = &ixgbe_led_on_generic,
1199 .led_off = &ixgbe_led_off_generic, 1144 .led_off = &ixgbe_led_off_generic,
1200 .blink_led_start = &ixgbe_blink_led_start_82598, 1145 .blink_led_start = &ixgbe_blink_led_start_generic,
1201 .blink_led_stop = &ixgbe_blink_led_stop_82598, 1146 .blink_led_stop = &ixgbe_blink_led_stop_generic,
1202 .set_rar = &ixgbe_set_rar_generic, 1147 .set_rar = &ixgbe_set_rar_generic,
1203 .clear_rar = &ixgbe_clear_rar_generic, 1148 .clear_rar = &ixgbe_clear_rar_generic,
1204 .set_vmdq = &ixgbe_set_vmdq_82598, 1149 .set_vmdq = &ixgbe_set_vmdq_82598,