Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci While DM9102A boards tend to have ISV-format SRO...
details: https://anonhg.NetBSD.org/src/rev/2291a312e944
branches: trunk
changeset: 486714:2291a312e944
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat May 27 19:42:06 2000 +0000
description:
While DM9102A boards tend to have ISV-format SROMs (likely to describe
the HomePNA PHY typically connected to the external MII interface),
DM9102 implementations (often found on motherboards) do not. Handle
this.
diffstat:
sys/dev/pci/if_tlp_pci.c | 25 +++++++++++++++++--------
1 files changed, 17 insertions(+), 8 deletions(-)
diffs (42 lines):
diff -r 576861e06538 -r 2291a312e944 sys/dev/pci/if_tlp_pci.c
--- a/sys/dev/pci/if_tlp_pci.c Sat May 27 19:12:03 2000 +0000
+++ b/sys/dev/pci/if_tlp_pci.c Sat May 27 19:42:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tlp_pci.c,v 1.38 2000/05/26 16:38:14 thorpej Exp $ */
+/* $NetBSD: if_tlp_pci.c,v 1.39 2000/05/27 19:42:06 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -822,16 +822,25 @@
case TULIP_CHIP_DM9102:
case TULIP_CHIP_DM9102A:
- if (tlp_isv_srom_enaddr(sc, enaddr)) {
- printf("%s: SROM not in ISV format\n",
- sc->sc_dev.dv_xname);
- goto cant_cope;
- }
+ /*
+ * Some boards with the Davicom chip have an ISV
+ * SROM (mostly DM9102A boards -- trying to describe
+ * the HomePNA PHY, probably) although the data in
+ * them is generally wrong. Check for ISV format
+ * and grab the Ethernet address that way, and if
+ * that fails, fall back on grabbing it from an
+ * observed offset of 20 (which is where it would
+ * be in an ISV SROM anyhow, tho ISV can cope with
+ * multi-port boards).
+ */
+ if (tlp_isv_srom_enaddr(sc, enaddr))
+ memcpy(enaddr, &sc->sc_srom[20], ETHER_ADDR_LEN);
/*
* Davicom chips all have an internal MII interface
- * and a built-in PHY. DM9102A also has a HomePNA
- * interface on an external MII interface.
+ * and a built-in PHY. DM9102A also has a an external
+ * MII interface, usually with a HomePNA PHY attached
+ * to it.
*/
sc->sc_mediasw = &tlp_dm9102_mediasw;
break;
Home |
Main Index |
Thread Index |
Old Index