Convert igb driver to use new set_phys_id ethtool interface. Signed-off-by: Stephen Hemminger --- a/drivers/net/igb/igb_ethtool.c 2011-04-04 10:48:11.725482218 -0700 +++ b/drivers/net/igb/igb_ethtool.c 2011-04-04 10:50:38.243512749 -0700 @@ -1963,29 +1963,26 @@ static int igb_set_wol(struct net_device /* bit defines for adapter->led_status */ #define IGB_LED_ON 0 -static int igb_phys_id(struct net_device *netdev, u32 data) +static int igb_set_phys_id(struct net_device *netdev, + enum ethtool_phys_id_state state) { struct igb_adapter *adapter = netdev_priv(netdev); struct e1000_hw *hw = &adapter->hw; - unsigned long timeout; - timeout = data * 1000; + switch (state) { + case ETHTOOL_ID_ACTIVE: + igb_blink_led(hw); + return 0; + + case ETHTOOL_ID_INACTIVE: + igb_led_off(hw); + clear_bit(IGB_LED_ON, &adapter->led_status); + igb_cleanup_led(hw); + return 0; - /* - * msleep_interruptable only accepts unsigned int so we are limited - * in how long a duration we can wait - */ - if (!timeout || timeout > UINT_MAX) - timeout = UINT_MAX; - - igb_blink_led(hw); - msleep_interruptible(timeout); - - igb_led_off(hw); - clear_bit(IGB_LED_ON, &adapter->led_status); - igb_cleanup_led(hw); - - return 0; + default: + return -EINVAL; + } } static int igb_set_coalesce(struct net_device *netdev, @@ -2215,7 +2212,7 @@ static const struct ethtool_ops igb_etht .set_tso = igb_set_tso, .self_test = igb_diag_test, .get_strings = igb_get_strings, - .phys_id = igb_phys_id, + .set_phys_id = igb_set_phys_id, .get_sset_count = igb_get_sset_count, .get_ethtool_stats = igb_get_ethtool_stats, .get_coalesce = igb_get_coalesce, -- 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