diff options
author | Malli Chilakala <mallikarjuna.chilakala@intel.com> | 2005-06-17 20:43:56 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-27 00:34:25 -0400 |
commit | d439d4b7ac24b341a40a98995f6a6d3ef586eaf7 (patch) | |
tree | b2b38ecc9e3d21dec39da63f3e37b8642a121bee | |
parent | 683a38f374d65128c8dd392a724513f9b8818bf7 (diff) |
[PATCH] e1000: Enable ethtool phys_id feature for 82573 controllers
Enable ethtool phys_id feature for 82573 controllers
Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
-rw-r--r-- | drivers/net/e1000/e1000_ethtool.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index a8a2a63a47a2..f133ff0b0b94 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
@@ -1625,17 +1625,26 @@ e1000_phys_id(struct net_device *netdev, uint32_t data) | |||
1625 | if(!data || data > (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ)) | 1625 | if(!data || data > (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ)) |
1626 | data = (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ); | 1626 | data = (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ); |
1627 | 1627 | ||
1628 | if(!adapter->blink_timer.function) { | 1628 | if(adapter->hw.mac_type < e1000_82573) { |
1629 | init_timer(&adapter->blink_timer); | 1629 | if(!adapter->blink_timer.function) { |
1630 | adapter->blink_timer.function = e1000_led_blink_callback; | 1630 | init_timer(&adapter->blink_timer); |
1631 | adapter->blink_timer.data = (unsigned long) adapter; | 1631 | adapter->blink_timer.function = e1000_led_blink_callback; |
1632 | adapter->blink_timer.data = (unsigned long) adapter; | ||
1633 | } | ||
1634 | e1000_setup_led(&adapter->hw); | ||
1635 | mod_timer(&adapter->blink_timer, jiffies); | ||
1636 | msleep_interruptible(data * 1000); | ||
1637 | del_timer_sync(&adapter->blink_timer); | ||
1638 | } | ||
1639 | else { | ||
1640 | E1000_WRITE_REG(&adapter->hw, LEDCTL, (E1000_LEDCTL_LED2_BLINK_RATE | | ||
1641 | E1000_LEDCTL_LED1_BLINK | E1000_LEDCTL_LED2_BLINK | | ||
1642 | (E1000_LEDCTL_MODE_LED_ON << E1000_LEDCTL_LED2_MODE_SHIFT) | | ||
1643 | (E1000_LEDCTL_MODE_LINK_ACTIVITY << E1000_LEDCTL_LED1_MODE_SHIFT) | | ||
1644 | (E1000_LEDCTL_MODE_LED_OFF << E1000_LEDCTL_LED0_MODE_SHIFT))); | ||
1645 | msleep_interruptible(data * 1000); | ||
1632 | } | 1646 | } |
1633 | 1647 | ||
1634 | e1000_setup_led(&adapter->hw); | ||
1635 | mod_timer(&adapter->blink_timer, jiffies); | ||
1636 | |||
1637 | msleep_interruptible(data * 1000); | ||
1638 | del_timer_sync(&adapter->blink_timer); | ||
1639 | e1000_led_off(&adapter->hw); | 1648 | e1000_led_off(&adapter->hw); |
1640 | clear_bit(E1000_LED_ON, &adapter->led_status); | 1649 | clear_bit(E1000_LED_ON, &adapter->led_status); |
1641 | e1000_cleanup_led(&adapter->hw); | 1650 | e1000_cleanup_led(&adapter->hw); |