Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic gem_init(): Don't call gem_mii_statchg() directly...
details: https://anonhg.NetBSD.org/src/rev/02732edb5287
branches: trunk
changeset: 516303:02732edb5287
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Oct 20 18:25:52 2001 +0000
description:
gem_init(): Don't call gem_mii_statchg() directly. Instead, call
gem_mediachange(). This will cause gem_mii_statchg() to be called
by the MII layer with the correct MII media state, so that speed
duplex parameters will be set properly.
diffstat:
sys/dev/ic/gem.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diffs (31 lines):
diff -r ced5a16970d4 -r 02732edb5287 sys/dev/ic/gem.c
--- a/sys/dev/ic/gem.c Sat Oct 20 17:44:58 2001 +0000
+++ b/sys/dev/ic/gem.c Sat Oct 20 18:25:52 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gem.c,v 1.7 2001/10/18 15:19:21 thorpej Exp $ */
+/* $NetBSD: gem.c,v 1.8 2001/10/20 18:25:52 thorpej Exp $ */
/*
*
@@ -785,10 +785,7 @@
bus_space_write_4(t, h, GEM_RX_BLANKING, (2<<12)|6);
/* step 11. Configure Media */
- gem_mii_statchg(&sc->sc_dev);
-
-/* XXXX Serial link needs a whole different setup. */
-
+ (void) gem_mediachange(ifp);
/* step 12. RX_MAC Configuration Register */
v = bus_space_read_4(t, h, GEM_MAC_RX_CONFIG);
@@ -1644,8 +1641,7 @@
{
struct gem_softc *sc = ifp->if_softc;
- if (IFM_TYPE(sc->sc_media.ifm_media) != IFM_ETHER)
- return (EINVAL);
+ /* XXX Add support for serial media. */
return (mii_mediachg(&sc->sc_mii));
}
Home |
Main Index |
Thread Index |
Old Index