]> git.baikalelectronics.ru Git - kernel.git/commit
net-next: stmmac: dwmac-sun8i: ensure the EPHY is properly reseted
authorIcenowy Zheng <icenowy@aosc.io>
Sun, 4 Jun 2017 17:53:23 +0000 (01:53 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Jun 2017 15:03:52 +0000 (11:03 -0400)
commitdc0963e98fdc301d72a3e2e30d72fefffa21de3d
treeca2bbfa39779ef77ae83431c097ca77dcf34554c
parent079b3f404e6063adcfdc43c03c16291787d59527
net-next: stmmac: dwmac-sun8i: ensure the EPHY is properly reseted

The EPHY may be already enabled by bootloaders which have Ethernet
capability (e.g. current U-Boot). Thus it should be reseted properly
before doing the enabling sequence in the dwmac-sun8i driver, otherwise
the EMAC reset process may fail if no cable is plugged, and then fail
the dwmac-sun8i probing.

Tested on Orange Pi PC, One and Zero. All the boards fail to have
dwmac-sun8i probed with "EMAC reset timeout" without cable plugged
before, and with this fix they're now all able to successfully probe the
EMAC without cable plugged and then use the connection after a cable is
hot-plugged in.

Fixes: 6f537725a8e ("net-next: stmmac: Add dwmac-sun8i")
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Reviewed-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: is not as formal as Signed-off-by:. It is a record that the acker
Reviewed-by: is similar.
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c