]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
staging: octeon: refactor rgmii 10 mbps preamble error checking
authorAaro Koskinen <aaro.koskinen@iki.fi>
Thu, 11 Feb 2016 23:02:26 +0000 (01:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Feb 2016 03:40:02 +0000 (19:40 -0800)
commit710086dbbbeb8ac22dc04ad5c9426b8cabac735c
treee07d879a91a49d0653ed61f60a66b791c346f735
parent1d5047c981f2e5a0fe6003c98b9c742c349d75a3
staging: octeon: refactor rgmii 10 mbps preamble error checking

Refactor RGMII 10 Mbps preamble error checking. The current implementation
does not work correctly in phydev mode since only the link status changes
trigger the callback, and if we stay on 10 Mbps operation the periodic
checks for error counters are never done.

Provide a periodic worker also during the phydev operation, and notify
the link status changes through the phydev instead of the inband
status change interrupt. This also has the benefit that we don't need
to use legacy CVMX MDIO calls to check the PHY state, and we can avoid
races that trigger bogus "Using 10Mbps with software preamble removal"
logs when interfaces are being bringed up. It also avoids some corner-case
crashes when the in-band interrupt triggers while the interface is
being taken down.

Tested on EdgeRouter Lite & D-Link DSR-1000N.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/octeon/ethernet-mdio.c
drivers/staging/octeon/ethernet-rgmii.c
drivers/staging/octeon/ethernet.c
drivers/staging/octeon/octeon-ethernet.h