Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/mii Add support for Am79C87[45].
details: https://anonhg.NetBSD.org/src/rev/c1cfd21daf44
branches: trunk
changeset: 542308:c1cfd21daf44
user: matt <matt%NetBSD.org@localhost>
date: Sun Jan 26 06:25:08 2003 +0000
description:
Add support for Am79C87[45].
diffstat:
sys/dev/mii/acphy.c | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diffs (48 lines):
diff -r 16d50fccb624 -r c1cfd21daf44 sys/dev/mii/acphy.c
--- a/sys/dev/mii/acphy.c Sun Jan 26 06:21:03 2003 +0000
+++ b/sys/dev/mii/acphy.c Sun Jan 26 06:25:08 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acphy.c,v 1.11 2003/01/17 06:23:52 gendalia Exp $ */
+/* $NetBSD: acphy.c,v 1.12 2003/01/26 06:25:08 matt Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acphy.c,v 1.11 2003/01/17 06:23:52 gendalia Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acphy.c,v 1.12 2003/01/26 06:25:08 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -76,6 +76,10 @@
MII_STR_ALTIMA_AC101 },
{ MII_OUI_ALTIMA, MII_MODEL_ALTIMA_AC101L,
MII_STR_ALTIMA_AC101L },
+ { MII_OUI_ALTIMA, MII_MODEL_ALTIMA_Am79C874,
+ MII_STR_ALTIMA_Am79C874 },
+ { MII_OUI_ALTIMA, MII_MODEL_ALTIMA_Am79C875,
+ MII_STR_ALTIMA_Am79C875 },
/* XXX This is reported to work, but it's not from any data sheet. */
{ MII_OUI_ALTIMA, MII_MODEL_ALTIMA_ACXXX,
@@ -123,6 +127,18 @@
sc->mii_capabilities =
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
printf("%s: ", sc->mii_dev.dv_xname);
+
+#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
+ if (sc->mii_flags & MIIF_HAVEFIBER) {
+ ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, 0, sc->mii_inst),
+ MII_MEDIA_100_TX);
+ printf("100baseFX, ");
+ ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, IFM_FDX, sc->mii_inst),
+ MII_MEDIA_100_TX);
+ printf("100baseFX-FDX, ");
+ }
+#undef ADD
+
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
printf("no media present");
else
Home |
Main Index |
Thread Index |
Old Index