diff options
author | Doug Berger <opendmb@gmail.com> | 2017-10-25 15:04:13 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-26 10:14:54 +0900 |
commit | 28c2d1a7a0bfdf3617800d2beae1c67983c03d15 (patch) | |
tree | 1ff3dd64755b3423e516787c2ac40c472dd65995 /samples/bpf/tracex6_user.c | |
parent | 4fd6dc98c19369d24c4a4819b27c114948720d16 (diff) |
net: bcmgenet: enable loopback during UniMAC sw_reset
It is necessary for the UniMAC to be clocked at least 5 cycles
while the sw_reset is asserted to ensure a clean reset.
It was discovered that this condition was not being met when
connected to an external RGMII PHY that disabled the Rx clock in
the Power Save state.
This commit modifies the reset_umac function to place the (RG)MII
interface into a local loopback mode where the Rx clock comes
from the GENET sourced Tx clk during the sw_reset to ensure the
presence and stability of the clock.
In addition, it turns out that the sw_reset of the UniMAC is not
self clearing, but this was masked by a bug in the timeout code.
The sw_reset is now explicitly cleared by zeroing the UMAC_CMD
register before returning from reset_umac which makes it no
longer necessary to do so in init_umac and makes the clearing of
CMD_TX_EN and CMD_RX_EN by umac_enable_set redundant. The
timeout code (and its associated bug) are removed so reset_umac
no longer needs to return a result, and that means init_umac
that calls reset_umac does not need to as well.
Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file")
Signed-off-by: Doug Berger <opendmb@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/bpf/tracex6_user.c')
0 files changed, 0 insertions, 0 deletions