summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-27 09:42:10 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-27 11:02:06 +0200
commite2e4bf4999648ed6c5e8c4ec59fbef0f0ca2a07d (patch)
tree29cc10a931ea1169a11e907ae15ccd02e0bfa37c
parentba0b05902bb3ee23afd5a2ee2ca589914f11beaa (diff)
downloadrtems-libbsd-e2e4bf4999648ed6c5e8c4ec59fbef0f0ca2a07d.tar.bz2
ffec: Avoid AXI bus issues due to a MAC reset
-rw-r--r--freebsd/sys/dev/ffec/if_ffec.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/freebsd/sys/dev/ffec/if_ffec.c b/freebsd/sys/dev/ffec/if_ffec.c
index 85a720fc..81440d52 100644
--- a/freebsd/sys/dev/ffec/if_ffec.c
+++ b/freebsd/sys/dev/ffec/if_ffec.c
@@ -1656,7 +1656,14 @@ ffec_attach(device_t dev)
ffec_get_hwaddr(sc, eaddr);
/* Reset the hardware. Disables all interrupts. */
- WR4(sc, FEC_ECR_REG, FEC_ECR_RESET);
+ if (sc->fectype & FECFLAG_AVB)
+ /*
+ * Avoid AXI bus issues due to a MAC reset, see Linux for more
+ * details.
+ */
+ WR4(sc, FEC_ECR_REG, 0);
+ else
+ WR4(sc, FEC_ECR_REG, FEC_ECR_RESET);
/* Setup interrupt handler. */
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET | INTR_MPSAFE,