]> git.baikalelectronics.ru Git - kernel.git/commit
tg3: Pull the phy advertised speed and flow control settings on driver load
authorNithin Sujir <nsujir@broadcom.com>
Tue, 9 Apr 2013 08:48:08 +0000 (08:48 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Apr 2013 19:14:15 +0000 (15:14 -0400)
commitb5942610e65485c0c6afc726e72a71e2dfc31bc3
tree2a946df49bb3f20be00d0bcedce67a276c1c5057
parent92d22fdcffa0829b740077df39c35ecc61a5daae
tg3: Pull the phy advertised speed and flow control settings on driver load

Normally on driver load, we set the default settings for speed and flow
control. However, if the default setting is not compatible with the current link
state, we would autonegotiate and cause a link flap. To avoid this, we
pull the current advertised settings into the config.

A second scenario is if a user changes the speed/duplex/fc settings when
the interface is down. In this case we must not pull the settings from
the phy and overwrite user settings. We avoid that by checking the
USER_CONFIGURED flag.

Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/tg3.c
drivers/net/ethernet/broadcom/tg3.h