summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/mii/rlphy.c9
-rw-r--r--sys/dev/pci/if_rl.c7
2 files changed, 12 insertions, 4 deletions
diff --git a/sys/dev/mii/rlphy.c b/sys/dev/mii/rlphy.c
index 061ece97d6f..e5e6ae40658 100644
--- a/sys/dev/mii/rlphy.c
+++ b/sys/dev/mii/rlphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rlphy.c,v 1.1 1998/11/18 20:11:31 jason Exp $ */
+/* $OpenBSD: rlphy.c,v 1.2 1998/11/20 02:42:14 jason Exp $ */
/*
* Copyright (c) 1998 Jason L. Wright (jason@thought.net)
@@ -207,11 +207,14 @@ void
rlphy_reset(sc)
struct mii_softc *sc;
{
- mii_phy_reset(sc);
+ int bmcr;
/*
* XXX The RTL8139 doesn't set the BMCR properly
* XXX after reset, which breaks autoneg.
*/
- PHY_WRITE(sc, MII_BMCR, BMCR_S100 | BMCR_AUTOEN | BMCR_FDX);
+
+ bmcr = PHY_READ(sc, MII_BMCR);
+ mii_phy_reset(sc);
+ PHY_WRITE(sc, MII_BMCR, bmcr);
}
diff --git a/sys/dev/pci/if_rl.c b/sys/dev/pci/if_rl.c
index 942f1f82f9b..c28c16fe3a4 100644
--- a/sys/dev/pci/if_rl.c
+++ b/sys/dev/pci/if_rl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rl.c,v 1.6 1998/11/19 07:01:55 jason Exp $ */
+/* $OpenBSD: if_rl.c,v 1.7 1998/11/20 02:42:15 jason Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1134,6 +1134,11 @@ static void rl_init(xsc)
CSR_WRITE_1(sc, RL_CFG1, RL_CFG1_DRVLOAD|RL_CFG1_FULLDUPLEX);
+ /*
+ * Set current media.
+ */
+ mii_mediachg(&sc->sc_mii);
+
ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &= ~IFF_OACTIVE;