From b272cb1d48e86c802db4d709c84cdc06f3ec6ac7 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Tue, 7 Oct 2008 20:41:06 +0000 Subject: 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@ --- sys/dev/mii/eephy.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/dev/mii/eephy.c') 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) { -- cgit v1.2.3