aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2006-01-27 08:00:40 +0000
committerWarner Losh <imp@FreeBSD.org>2006-01-27 08:00:40 +0000
commit0fbdbd5068cf7a5cac1e779c78f19d384e6143c6 (patch)
tree83d156cfeb6e5923d654068c9eb630be7e10459d /sys/dev
parente6c59e911f91ecb88a48c61fca7245d848b6536e (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ed/if_ed.c22
-rw-r--r--sys/dev/ed/if_ed_hpp.c2
2 files changed, 14 insertions, 10 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index 39f0c3e5b999..f16e517476fb 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -310,13 +310,17 @@ ed_attach(device_t dev)
dot3ChipSetNational8390);
sc->mibdata.dot3Compliance = DOT3COMPLIANCE_COLLS;
+ ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
/*
- * Set default state for ALTPHYS flag (used to disable the
+ * Set default state for LINK2 flag (used to disable the
* tranceiver for AUI operation), based on config option.
+ * We only set this flag before we attach the device, so there's
+ * no race. It is convenient to allow users to turn this off
+ * by default in the kernel config, but given our more advanced
+ * boot time configuration options, this might no longer be needed.
*/
- ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
if (device_get_flags(dev) & ED_FLAGS_DISABLE_TRANCEIVER)
- ifp->if_flags |= IFF_ALTPHYS;
+ ifp->if_flags |= IFF_LINK2;
/*
* Attach the interface
@@ -338,12 +342,12 @@ ed_attach(device_t dev)
sc->hpp_mem_start ? "memory mapped" : "regular");
else
#endif
- printf("%s ", sc->isa16bit ? "(16 bit)" : "(8 bit)");
+ printf("%s", sc->isa16bit ? "(16 bit)" : "(8 bit)");
#if defined(ED_HPP) || defined(ED_3C503)
printf("%s", (((sc->vendor == ED_VENDOR_3COM) ||
(sc->vendor == ED_VENDOR_HP)) &&
- (ifp->if_flags & IFF_ALTPHYS)) ?
+ (ifp->if_flags & IFF_LINK2)) ?
" tranceiver disabled" : "");
#endif
printf("\n");
@@ -575,7 +579,7 @@ ed_init_locked(struct ed_softc *sc)
* (there is no settable hardware default).
*/
if (sc->vendor == ED_VENDOR_3COM) {
- if (ifp->if_flags & IFF_ALTPHYS)
+ if (ifp->if_flags & IFF_LINK2)
ed_asic_outb(sc, ED_3COM_CR, 0);
else
ed_asic_outb(sc, ED_3COM_CR, ED_3COM_CR_XSEL);
@@ -1241,14 +1245,14 @@ ed_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
*/
ed_setrcr(sc);
+#ifdef ED_3C503
/*
* An unfortunate hack to provide the (required) software
* control of the tranceiver for 3Com/HP boards.
- * The ALTPHYS flag disables the tranceiver if set.
+ * The LINK2 flag disables the tranceiver if set.
*/
-#ifdef ED_3C503
if (sc->vendor == ED_VENDOR_3COM) {
- if (ifp->if_flags & IFF_ALTPHYS)
+ if (ifp->if_flags & IFF_LINK2)
ed_asic_outb(sc, ED_3COM_CR, 0);
else
ed_asic_outb(sc, ED_3COM_CR, ED_3COM_CR_XSEL);
diff --git a/sys/dev/ed/if_ed_hpp.c b/sys/dev/ed/if_ed_hpp.c
index 28e07485f611..1f59a8e0630a 100644
--- a/sys/dev/ed/if_ed_hpp.c
+++ b/sys/dev/ed/if_ed_hpp.c
@@ -371,7 +371,7 @@ ed_hpp_set_physical_link(struct ed_softc *sc)
ed_asic_outw(sc, ED_HPP_PAGING, ED_HPP_PAGE_LAN);
lan_page = ed_asic_inw(sc, ED_HPP_PAGE_0);
- if (ifp->if_flags & IFF_ALTPHYS) {
+ if (ifp->if_flags & IFF_LINK2) {
/*
* Use the AUI port.
*/