diff options
author | 2018-04-07 22:43:12 +0000 | |
---|---|---|
committer | 2018-04-07 22:43:12 +0000 | |
commit | 3e3b57b37fe0798996f0aabac34d2daa088ef7a7 (patch) | |
tree | e7648d11b644f6b18c69e19215f16fc05acdddbe | |
parent | Only register ourselves as the time-of-day clock device if no time-of-day (diff) | |
download | wireguard-openbsd-3e3b57b37fe0798996f0aabac34d2daa088ef7a7.tar.xz wireguard-openbsd-3e3b57b37fe0798996f0aabac34d2daa088ef7a7.zip |
Only attach a single PHY if the PHY address isn't specified. This prevents
PHYs that respond at the broadcast address 0 and some other address from
attaching twice and isolating themselves from the interface.
This makes the network interface on the Theobrama Systems RK3399-Q7 SoM
that has a Micrel KZS9031 PHY work.
ok patrick@
-rw-r--r-- | sys/dev/ic/dwc_gmac.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/dwc_gmac.c b/sys/dev/ic/dwc_gmac.c index 4a511a0cb0f..78fdbf6d301 100644 --- a/sys/dev/ic/dwc_gmac.c +++ b/sys/dev/ic/dwc_gmac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dwc_gmac.c,v 1.8 2017/06/29 17:36:16 deraadt Exp $ */ +/* $OpenBSD: dwc_gmac.c,v 1.9 2018/04/07 22:43:12 kettenis Exp $ */ /* $NetBSD: dwc_gmac.c,v 1.34 2015/08/21 20:12:29 jmcneill Exp $ */ /*- @@ -222,8 +222,8 @@ dwc_gmac_attach(struct dwc_gmac_softc *sc, uint32_t mii_clk, int phyloc) ifmedia_init(&mii->mii_media, 0, dwc_gmac_ifmedia_upd, dwc_gmac_ifmedia_sts); - mii_attach((void *)sc, mii, 0xffffffff, phyloc, MII_OFFSET_ANY, - MIIF_DOPAUSE); + mii_attach((void *)sc, mii, 0xffffffff, phyloc, + (phyloc == MII_PHY_ANY) ? 0 : MII_OFFSET_ANY, MIIF_DOPAUSE); if (LIST_EMPTY(&mii->mii_phys)) { printf("%s: no PHY found!\n", sc->sc_dev.dv_xname); |