diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-10-07 20:41:06 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-10-07 20:41:06 +0000 |
commit | b272cb1d48e86c802db4d709c84cdc06f3ec6ac7 (patch) | |
tree | 23f6c7a6ed07d7f49827d701aa15f12d41e89ea0 | |
parent | 8a89181e4bcf2bd8137704fb663846d0da40d761 (diff) |
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) { |