diff options
author | Ajit Khaparde <ajitk@serverengines.com> | 2009-11-29 12:57:46 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-02 03:50:26 -0500 |
commit | 0dffc83e5b831df1df83dfe32a0c267347f9950b (patch) | |
tree | dad072dd1c206cdcb0e55ccfa92276a1bca54123 /drivers/net/benet/be_main.c | |
parent | b7b83ac39a177741a378d728d82e87de9b0a01a5 (diff) |
be2net: fix unnecessary access to hardware to get link, port info
Every time while doing ethtool->get_settings we are accessing
the hardware to get link status and port information.
This is not necessary. We now use the cached copy for this info
and update it when the link status changes.
From: Suresh R <sureshr@serverengines.com>
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be_main.c')
-rw-r--r-- | drivers/net/benet/be_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index f3e97ab3321d..e291b1b87532 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -220,6 +220,7 @@ void be_link_status_update(struct be_adapter *adapter, bool link_up) | |||
220 | 220 | ||
221 | /* If link came up or went down */ | 221 | /* If link came up or went down */ |
222 | if (adapter->link_up != link_up) { | 222 | if (adapter->link_up != link_up) { |
223 | adapter->link_speed = -1; | ||
223 | if (link_up) { | 224 | if (link_up) { |
224 | netif_start_queue(netdev); | 225 | netif_start_queue(netdev); |
225 | netif_carrier_on(netdev); | 226 | netif_carrier_on(netdev); |
@@ -1674,6 +1675,8 @@ static int be_setup(struct be_adapter *adapter) | |||
1674 | if (status != 0) | 1675 | if (status != 0) |
1675 | goto rx_qs_destroy; | 1676 | goto rx_qs_destroy; |
1676 | 1677 | ||
1678 | adapter->link_speed = -1; | ||
1679 | |||
1677 | return 0; | 1680 | return 0; |
1678 | 1681 | ||
1679 | rx_qs_destroy: | 1682 | rx_qs_destroy: |