Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184259
b: refs/heads/master
c: 3145535
h: refs/heads/master
i:
  184257: 7c9f1fa
  184255: 7c44901
v: v3
  • Loading branch information
Nick Nunley authored and David S. Miller committed Feb 17, 2010
1 parent bfbd192 commit cb1bf61
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 22939f0606e515799d83e1a29250917f94c8d07b
refs/heads/master: 3145535ac6e4769e587a38a67d888a10f24a7af9
1 change: 1 addition & 0 deletions trunk/drivers/net/igb/igb.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ extern void igb_unmap_and_free_tx_resource(struct igb_ring *,
struct igb_buffer *);
extern void igb_alloc_rx_buffers_adv(struct igb_ring *, int);
extern void igb_update_stats(struct igb_adapter *);
extern bool igb_has_link(struct igb_adapter *adapter);
extern void igb_set_ethtool_ops(struct net_device *);

static inline s32 igb_reset_phy(struct e1000_hw *hw)
Expand Down
20 changes: 19 additions & 1 deletion trunk/drivers/net/igb/igb_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,24 @@ static int igb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
return 0;
}

static u32 igb_get_link(struct net_device *netdev)
{
struct igb_adapter *adapter = netdev_priv(netdev);
struct e1000_mac_info *mac = &adapter->hw.mac;

/*
* If the link is not reported up to netdev, interrupts are disabled,
* and so the physical link state may have changed since we last
* looked. Set get_link_status to make sure that the true link
* state is interrogated, rather than pulling a cached and possibly
* stale link state from the driver.
*/
if (!netif_carrier_ok(netdev))
mac->get_link_status = 1;

return igb_has_link(adapter);
}

static void igb_get_pauseparam(struct net_device *netdev,
struct ethtool_pauseparam *pause)
{
Expand Down Expand Up @@ -2077,7 +2095,7 @@ static const struct ethtool_ops igb_ethtool_ops = {
.get_msglevel = igb_get_msglevel,
.set_msglevel = igb_set_msglevel,
.nway_reset = igb_nway_reset,
.get_link = ethtool_op_get_link,
.get_link = igb_get_link,
.get_eeprom_len = igb_get_eeprom_len,
.get_eeprom = igb_get_eeprom,
.set_eeprom = igb_set_eeprom,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3020,7 +3020,7 @@ static void igb_update_phy_info(unsigned long data)
* igb_has_link - check shared code for link and determine up/down
* @adapter: pointer to driver private info
**/
static bool igb_has_link(struct igb_adapter *adapter)
bool igb_has_link(struct igb_adapter *adapter)
{
struct e1000_hw *hw = &adapter->hw;
bool link_active = false;
Expand Down

0 comments on commit cb1bf61

Please sign in to comment.