diff options
author | Claudiu Manoil <claudiu.manoil@freescale.com> | 2014-04-30 14:27:21 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-30 16:12:23 -0400 |
commit | 6ce29b0e2a04ea85617cd21099af67449a76f589 (patch) | |
tree | 646809dbccfa024bccc007e5d4449fff7cefaed0 /drivers/net/hyperv | |
parent | 0cda345d1b2201dd15591b163e3c92bad5191745 (diff) | |
download | op-kernel-dev-6ce29b0e2a04ea85617cd21099af67449a76f589.zip op-kernel-dev-6ce29b0e2a04ea85617cd21099af67449a76f589.tar.gz |
gianfar: Avoid unnecessary reg accesses in adjust_link()
For phy devices that don't issue interrupts upon link
state changes, phylib polls the link state resulting in
repeated calls to adjust_link(), even if the link state
didn't change. As a result, some mac registers are
repeatedly read and written with the same values, which
is not ok.
To fix this, adjust_link() has been refactored to check
first whether the link state has changed and to take action
only if needed, updating mac registers and local state
variables. The 'new_state' local flag, set if one of the
link params changed (link, speed or duplex), has been
rendered useless and removed by this refactoring.
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv')
0 files changed, 0 insertions, 0 deletions