net: sun8i_emac: Fix PHY initialization
authorSamuel Holland <samuel@sholland.org>
Sun, 28 Jan 2018 05:53:20 +0000 (23:53 -0600)
committerJagan Teki <jagan@amarulasolutions.com>
Tue, 13 Mar 2018 15:46:51 +0000 (21:16 +0530)
commit2d53018a0ef268ba73aebe2441f1fd7c65533d78
tree26ecbb33557887a9bd7aea8de7f5f3eb6489b05b
parentb0b0d22f1a11b656e1a72f0e178f968b14be7ff3
net: sun8i_emac: Fix PHY initialization

The previous code tried to update the PHY parameters without waiting for
autonegotiation to complete. This caused wrong values to be written to
the EMAC in sun8i_adjust_link(). As a result, any commands that called
eth_start() before autonegotiation completed would find the network
nonfunctional. Fix this by using the correct function to start up the
PHY.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
drivers/net/sun8i_emac.c