aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_82598.c
diff options
context:
space:
mode:
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 de4db0dc7879..4791238c3f6e 100644
--- a/drivers/net/ixgbe/ixgbe_82598.c
+++ b/drivers/net/ixgbe/ixgbe_82598.c
@@ -885,61 +885,6 @@ static s32 ixgbe_clear_vfta_82598(struct ixgbe_hw *hw)
885} 885}
886 886
887/** 887/**
888 * ixgbe_blink_led_start_82598 - Blink LED based on index.
889 * @hw: pointer to hardware structure
890 * @index: led number to blink
891 **/
892static s32 ixgbe_blink_led_start_82598(struct ixgbe_hw *hw, u32 index)
893{
894 ixgbe_link_speed speed = 0;
895 bool link_up = 0;
896 u32 autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC);
897 u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);
898
899 /*
900 * Link must be up to auto-blink the LEDs on the 82598EB MAC;
901 * force it if link is down.
902 */
903 hw->mac.ops.check_link(hw, &speed, &link_up, false);
904
905 if (!link_up) {
906 autoc_reg |= IXGBE_AUTOC_FLU;
907 IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc_reg);
908 msleep(10);
909 }
910
911 led_reg &= ~IXGBE_LED_MODE_MASK(index);
912 led_reg |= IXGBE_LED_BLINK(index);
913 IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, led_reg);
914 IXGBE_WRITE_FLUSH(hw);
915
916 return 0;
917}
918
919/**
920 * ixgbe_blink_led_stop_82598 - Stop blinking LED based on index.
921 * @hw: pointer to hardware structure
922 * @index: led number to stop blinking
923 **/
924static s32 ixgbe_blink_led_stop_82598(struct ixgbe_hw *hw, u32 index)
925{
926 u32 autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC);
927 u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);
928
929 autoc_reg &= ~IXGBE_AUTOC_FLU;
930 autoc_reg |= IXGBE_AUTOC_AN_RESTART;
931 IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc_reg);
932
933 led_reg &= ~IXGBE_LED_MODE_MASK(index);
934 led_reg &= ~IXGBE_LED_BLINK(index);
935 led_reg |= IXGBE_LED_LINK_ACTIVE << IXGBE_LED_MODE_SHIFT(index);
936 IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, led_reg);
937 IXGBE_WRITE_FLUSH(hw);
938
939 return 0;
940}
941
942/**
943 * ixgbe_read_analog_reg8_82598 - Reads 8 bit Atlas analog register 888 * ixgbe_read_analog_reg8_82598 - Reads 8 bit Atlas analog register
944 * @hw: pointer to hardware structure 889 * @hw: pointer to hardware structure
945 * @reg: analog register to read 890 * @reg: analog register to read
@@ -1128,8 +1073,8 @@ static struct ixgbe_mac_operations mac_ops_82598 = {
1128 .get_link_capabilities = &ixgbe_get_link_capabilities_82598, 1073 .get_link_capabilities = &ixgbe_get_link_capabilities_82598,
1129 .led_on = &ixgbe_led_on_generic, 1074 .led_on = &ixgbe_led_on_generic,
1130 .led_off = &ixgbe_led_off_generic, 1075 .led_off = &ixgbe_led_off_generic,
1131 .blink_led_start = &ixgbe_blink_led_start_82598, 1076 .blink_led_start = &ixgbe_blink_led_start_generic,
1132 .blink_led_stop = &ixgbe_blink_led_stop_82598, 1077 .blink_led_stop = &ixgbe_blink_led_stop_generic,
1133 .set_rar = &ixgbe_set_rar_generic, 1078 .set_rar = &ixgbe_set_rar_generic,
1134 .clear_rar = &ixgbe_clear_rar_generic, 1079 .clear_rar = &ixgbe_clear_rar_generic,
1135 .set_vmdq = &ixgbe_set_vmdq_82598, 1080 .set_vmdq = &ixgbe_set_vmdq_82598,