diff options
author | 2008-10-07 20:41:05 +0000 | |
---|---|---|
committer | 2008-10-07 20:41:05 +0000 | |
commit | 7d6c3be97819f3da7484f4a3f00dcfbe616559d0 (patch) | |
tree | 09208975f936bb6475a570370e9a9bba29635f80 | |
parent | Fix memory leak bug during scope evaluation (now without introducing a bug (diff) | |
download | wireguard-openbsd-7d6c3be97819f3da7484f4a3f00dcfbe616559d0.tar.xz wireguard-openbsd-7d6c3be97819f3da7484f4a3f00dcfbe616559d0.zip |
Make sure page 0 is selected when we initialize the PHY. Fixes problems
with the eephy(4) that attaches to nfe(4) on machines like the Sun Ultra 40.
ok deraadt@
-rw-r--r-- | sys/dev/mii/eephy.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/mii/eephy.c b/sys/dev/mii/eephy.c index 617bae5abef..19ae3f5f557 100644 --- a/sys/dev/mii/eephy.c +++ b/sys/dev/mii/eephy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eephy.c,v 1.45 2008/09/09 00:25:55 brad Exp $ */ +/* $OpenBSD: eephy.c,v 1.46 2008/10/07 20:41:05 kettenis Exp $ */ /* * Principal Author: Parag Patel * Copyright (c) 2001 @@ -151,6 +151,9 @@ eephyattach(struct device *parent, struct device *self, void *aux) /* XXX No loopback support yet, although the hardware can do it. */ sc->mii_flags |= MIIF_NOLOOP; + /* Make sure page 0 is selected. */ + PHY_WRITE(sc, E1000_EADR, 0); + /* Switch to copper-only mode if necessary. */ if (sc->mii_model == MII_MODEL_MARVELL_E1111 && (sc->mii_flags & MIIF_HAVEFIBER) == 0) { |