Patchwork ixgbe: Remove not used blink_led_start/stop code

login
register
mail settings
Submitter Yinghai Lu
Date April 12, 2011, 11:30 p.m.
Message ID <4DA4E099.2080206@kernel.org>
Download mbox | patch
Permalink /patch/90884/
State Awaiting Upstream
Delegated to: David Miller
Headers show

Comments

Yinghai Lu - April 12, 2011, 11:30 p.m.
There is no user for those code.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 drivers/net/ixgbe/ixgbe_82598.c  |    2 -
 drivers/net/ixgbe/ixgbe_82599.c  |    2 -
 drivers/net/ixgbe/ixgbe_common.c |   56 ---------------------------------------
 drivers/net/ixgbe/ixgbe_common.h |    2 -
 drivers/net/ixgbe/ixgbe_type.h   |    2 -
 drivers/net/ixgbe/ixgbe_x540.c   |    2 -
 6 files changed, 66 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jeff Kirsher - April 13, 2011, 12:29 a.m.
On Tue, 2011-04-12 at 16:30 -0700, Yinghai Lu wrote:
> There is no user for those code.
> 
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> 
> ---
>  drivers/net/ixgbe/ixgbe_82598.c  |    2 -
>  drivers/net/ixgbe/ixgbe_82599.c  |    2 -
>  drivers/net/ixgbe/ixgbe_common.c |   56
> ---------------------------------------
>  drivers/net/ixgbe/ixgbe_common.h |    2 -
>  drivers/net/ixgbe/ixgbe_type.h   |    2 -
>  drivers/net/ixgbe/ixgbe_x540.c   |    2 -
>  6 files changed, 66 deletions(-) 

Thanks for the patch, I have added the patch to my queue of ixgbe
patches.

Patch

Index: linux-2.6/drivers/net/ixgbe/ixgbe_82598.c
===================================================================
--- linux-2.6.orig/drivers/net/ixgbe/ixgbe_82598.c
+++ linux-2.6/drivers/net/ixgbe/ixgbe_82598.c
@@ -1207,8 +1207,6 @@  static struct ixgbe_mac_operations mac_o
 	.get_link_capabilities	= &ixgbe_get_link_capabilities_82598,
 	.led_on			= &ixgbe_led_on_generic,
 	.led_off		= &ixgbe_led_off_generic,
-	.blink_led_start	= &ixgbe_blink_led_start_generic,
-	.blink_led_stop		= &ixgbe_blink_led_stop_generic,
 	.set_rar		= &ixgbe_set_rar_generic,
 	.clear_rar		= &ixgbe_clear_rar_generic,
 	.set_vmdq		= &ixgbe_set_vmdq_82598,
Index: linux-2.6/drivers/net/ixgbe/ixgbe_82599.c
===================================================================
--- linux-2.6.orig/drivers/net/ixgbe/ixgbe_82599.c
+++ linux-2.6/drivers/net/ixgbe/ixgbe_82599.c
@@ -2052,8 +2052,6 @@  static struct ixgbe_mac_operations mac_o
 	.get_link_capabilities  = &ixgbe_get_link_capabilities_82599,
 	.led_on                 = &ixgbe_led_on_generic,
 	.led_off                = &ixgbe_led_off_generic,
-	.blink_led_start        = &ixgbe_blink_led_start_generic,
-	.blink_led_stop         = &ixgbe_blink_led_stop_generic,
 	.set_rar                = &ixgbe_set_rar_generic,
 	.clear_rar              = &ixgbe_clear_rar_generic,
 	.set_vmdq               = &ixgbe_set_vmdq_generic,
Index: linux-2.6/drivers/net/ixgbe/ixgbe_common.c
===================================================================
--- linux-2.6.orig/drivers/net/ixgbe/ixgbe_common.c
+++ linux-2.6/drivers/net/ixgbe/ixgbe_common.c
@@ -2242,62 +2242,6 @@  s32 ixgbe_enable_rx_dma_generic(struct i
 }
 
 /**
- *  ixgbe_blink_led_start_generic - Blink LED based on index.
- *  @hw: pointer to hardware structure
- *  @index: led number to blink
- **/
-s32 ixgbe_blink_led_start_generic(struct ixgbe_hw *hw, u32 index)
-{
-	ixgbe_link_speed speed = 0;
-	bool link_up = 0;
-	u32 autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC);
-	u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);
-
-	/*
-	 * Link must be up to auto-blink the LEDs;
-	 * Force it if link is down.
-	 */
-	hw->mac.ops.check_link(hw, &speed, &link_up, false);
-
-	if (!link_up) {
-		autoc_reg |= IXGBE_AUTOC_AN_RESTART;
-		autoc_reg |= IXGBE_AUTOC_FLU;
-		IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc_reg);
-		msleep(10);
-	}
-
-	led_reg &= ~IXGBE_LED_MODE_MASK(index);
-	led_reg |= IXGBE_LED_BLINK(index);
-	IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, led_reg);
-	IXGBE_WRITE_FLUSH(hw);
-
-	return 0;
-}
-
-/**
- *  ixgbe_blink_led_stop_generic - Stop blinking LED based on index.
- *  @hw: pointer to hardware structure
- *  @index: led number to stop blinking
- **/
-s32 ixgbe_blink_led_stop_generic(struct ixgbe_hw *hw, u32 index)
-{
-	u32 autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC);
-	u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);
-
-	autoc_reg &= ~IXGBE_AUTOC_FLU;
-	autoc_reg |= IXGBE_AUTOC_AN_RESTART;
-	IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc_reg);
-
-	led_reg &= ~IXGBE_LED_MODE_MASK(index);
-	led_reg &= ~IXGBE_LED_BLINK(index);
-	led_reg |= IXGBE_LED_LINK_ACTIVE << IXGBE_LED_MODE_SHIFT(index);
-	IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, led_reg);
-	IXGBE_WRITE_FLUSH(hw);
-
-	return 0;
-}
-
-/**
  *  ixgbe_get_san_mac_addr_offset - Get SAN MAC address offset from the EEPROM
  *  @hw: pointer to hardware structure
  *  @san_mac_offset: SAN MAC address offset
Index: linux-2.6/drivers/net/ixgbe/ixgbe_common.h
===================================================================
--- linux-2.6.orig/drivers/net/ixgbe/ixgbe_common.h
+++ linux-2.6/drivers/net/ixgbe/ixgbe_common.h
@@ -85,8 +85,6 @@  s32 ixgbe_check_mac_link_generic(struct
                                  bool *link_up, bool link_up_wait_to_complete);
 s32 ixgbe_get_wwn_prefix_generic(struct ixgbe_hw *hw, u16 *wwnn_prefix,
                                  u16 *wwpn_prefix);
-s32 ixgbe_blink_led_start_generic(struct ixgbe_hw *hw, u32 index);
-s32 ixgbe_blink_led_stop_generic(struct ixgbe_hw *hw, u32 index);
 void ixgbe_set_mac_anti_spoofing(struct ixgbe_hw *hw, bool enable, int pf);
 void ixgbe_set_vlan_anti_spoofing(struct ixgbe_hw *hw, bool enable, int vf);
 
Index: linux-2.6/drivers/net/ixgbe/ixgbe_type.h
===================================================================
--- linux-2.6.orig/drivers/net/ixgbe/ixgbe_type.h
+++ linux-2.6/drivers/net/ixgbe/ixgbe_type.h
@@ -2530,8 +2530,6 @@  struct ixgbe_mac_operations {
 	/* LED */
 	s32 (*led_on)(struct ixgbe_hw *, u32);
 	s32 (*led_off)(struct ixgbe_hw *, u32);
-	s32 (*blink_led_start)(struct ixgbe_hw *, u32);
-	s32 (*blink_led_stop)(struct ixgbe_hw *, u32);
 
 	/* RAR, Multicast, VLAN */
 	s32 (*set_rar)(struct ixgbe_hw *, u32, u8 *, u32, u32);
Index: linux-2.6/drivers/net/ixgbe/ixgbe_x540.c
===================================================================
--- linux-2.6.orig/drivers/net/ixgbe/ixgbe_x540.c
+++ linux-2.6/drivers/net/ixgbe/ixgbe_x540.c
@@ -681,8 +681,6 @@  static struct ixgbe_mac_operations mac_o
 	.get_link_capabilities  = &ixgbe_get_copper_link_capabilities_generic,
 	.led_on                 = &ixgbe_led_on_generic,
 	.led_off                = &ixgbe_led_off_generic,
-	.blink_led_start        = &ixgbe_blink_led_start_generic,
-	.blink_led_stop         = &ixgbe_blink_led_stop_generic,
 	.set_rar                = &ixgbe_set_rar_generic,
 	.clear_rar              = &ixgbe_clear_rar_generic,
 	.set_vmdq               = &ixgbe_set_vmdq_generic,