aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2005-02-20 18:44:45 +0000
committerWarner Losh <imp@FreeBSD.org>2005-02-20 18:44:45 +0000
commitb38c5039bd6055fa9bc7a77ec3fdbd3f0339fa88 (patch)
treef31df702698b1e81cc71c85b576c33b493dc30bf
parent0bc7d522b18a041b5638cd2e42a8b7332e8292d1 (diff)
Notes
-rw-r--r--sys/dev/ed/if_ed.c23
-rw-r--r--sys/dev/ed/if_edvar.h9
2 files changed, 27 insertions, 5 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index 07c6cd4b7cfc..e100e52f32fc 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -319,10 +319,12 @@ ed_attach(device_t dev)
#endif
printf("%s ", sc->isa16bit ? "(16 bit)" : "(8 bit)");
+#if defined(ED_HPP) || defined(ED_3C503)
printf("%s\n", (((sc->vendor == ED_VENDOR_3COM) ||
(sc->vendor == ED_VENDOR_HP)) &&
(ifp->if_flags & IFF_ALTPHYS)) ?
" tranceiver disabled" : "");
+#endif
}
return (0);
}
@@ -561,6 +563,7 @@ ed_init(void *xsc)
*/
ed_nic_outb(sc, ED_P0_TCR, 0);
+#ifdef ED_3C503
/*
* If this is a 3Com board, the tranceiver must be software enabled
* (there is no settable hardware default).
@@ -572,7 +575,7 @@ ed_init(void *xsc)
ed_asic_outb(sc, ED_3COM_CR, ED_3COM_CR_XSEL);
}
}
-
+#endif
#ifndef ED_NO_MIIBUS
if (sc->miibus != NULL) {
struct mii_data *mii;
@@ -719,6 +722,7 @@ outloop:
*/
if (sc->isa16bit) {
switch (sc->vendor) {
+#ifdef ED_3C503
/*
* For 16bit 3Com boards (which have 16k of
* memory), we have the xmit buffers in a
@@ -729,10 +733,12 @@ outloop:
ed_asic_outb(sc, ED_3COM_GACFR,
ED_3COM_GACFR_RSEL);
break;
-
+#endif
/*
* Enable 16bit access to shared memory on
* WD/SMC boards.
+ *
+ * XXX - same as ed_enable_16bit_access()
*/
case ED_VENDOR_WD_SMC:
ed_asic_outb(sc, ED_WD_LAAR,
@@ -757,11 +763,14 @@ outloop:
*/
if (sc->isa16bit) {
switch (sc->vendor) {
+#ifdef ED_3C503
case ED_VENDOR_3COM:
ed_asic_outb(sc, ED_3COM_GACFR,
ED_3COM_GACFR_RSEL | ED_3COM_GACFR_MBS0);
break;
+#endif
case ED_VENDOR_WD_SMC:
+ /* XXX - same as ed_disable_16bit_access() */
if (sc->chip_type == ED_CHIP_TYPE_WD790)
ed_asic_outb(sc, ED_WD_MSR, 0x00);
ed_asic_outb(sc, ED_WD_LAAR,
@@ -1228,9 +1237,12 @@ ed_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
/*
* An unfortunate hack to provide the (required) software
- * control of the tranceiver for 3Com boards. The ALTPHYS flag
- * disables the tranceiver if set.
+ * control of the tranceiver for 3Com/HP boards.
+ * The ALTPHYS flag disables the tranceiver if set.
+ *
+ * XXX - should use ifmedia.
*/
+#ifdef ED_3C503
if (sc->vendor == ED_VENDOR_3COM) {
if (ifp->if_flags & IFF_ALTPHYS) {
ed_asic_outb(sc, ED_3COM_CR, 0);
@@ -1238,8 +1250,9 @@ ed_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
ed_asic_outb(sc, ED_3COM_CR, ED_3COM_CR_XSEL);
}
}
+#endif
#ifdef ED_HPP
- else if (sc->vendor == ED_VENDOR_HP)
+ if (sc->vendor == ED_VENDOR_HP)
ed_hpp_set_physical_link(sc);
#endif
break;
diff --git a/sys/dev/ed/if_edvar.h b/sys/dev/ed/if_edvar.h
index c202712f1643..abba725a85f0 100644
--- a/sys/dev/ed/if_edvar.h
+++ b/sys/dev/ed/if_edvar.h
@@ -198,11 +198,18 @@ int ed_alloc_irq(device_t, int, int);
int ed_probe_generic8390(struct ed_softc *);
int ed_probe_WD80x3(device_t, int, int);
int ed_probe_WD80x3_generic(device_t, int, uint16_t *[]);
+#ifdef ED_3C503
int ed_probe_3Com(device_t, int, int);
+#endif
+#ifdef ED_SIC
int ed_probe_SIC(device_t, int, int);
+#endif
int ed_probe_Novell(device_t, int, int);
+int ed_probe_Novell_generic(device_t, int);
void ed_Novell_read_mac(struct ed_softc *);
+#ifdef ED_HPP
int ed_probe_HP_pclanp(device_t, int, int);
+#endif
int ed_attach(device_t);
int ed_detach(device_t);
@@ -220,9 +227,11 @@ void ed_child_detached(device_t, device_t);
#endif
/* The following is unsatisfying XXX */
+#ifdef ED_HPP
void ed_hpp_set_physical_link(struct ed_softc *);
void ed_hpp_readmem(struct ed_softc *, long, uint8_t *, uint16_t);
u_short ed_hpp_write_mbufs(struct ed_softc *, struct mbuf *, int);
+#endif
void ed_disable_16bit_access(struct ed_softc *);
void ed_enable_16bit_access(struct ed_softc *);