ftgmac100: Cleanup speed/duplex tracking and fix duplex config
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 5 Apr 2017 02:28:45 +0000 (12:28 +1000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Apr 2017 19:38:04 +0000 (12:38 -0700)
commit51764777354664b20963359ad3b78e564d14e1a5
tree01ab3f62d26708f4b406284c18082f4712708624
parent8396e1cb0b9f7505b0cd56e26df35279cb3bc1cb
ftgmac100: Cleanup speed/duplex tracking and fix duplex config

Keep track of both the current speed and duplex settings
instead of only speed and properly apply the duplex setting
to the HW.

This reworks the adjust_link() function to also avoid trying
to reconfigure the HW when there is no link and to display
the link state to the user.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/faraday/ftgmac100.c