From 5f5e1ff3b1550c377209c17ab53151d435a14d59 Mon Sep 17 00:00:00 2001 From: Takeshi Shibagaki Date: Sun, 2 Sep 2001 13:05:00 +0000 Subject: [PATCH] Always turned on 8bit access card support for the fe driver both i386/pc98, so options FE_8BIT_SUPPORT was deleted. Reviewed by: nyan --- sys/conf/NOTES | 1 - sys/conf/options.i386 | 2 -- sys/conf/options.pc98 | 2 -- sys/dev/fe/if_fe.c | 25 ------------------------- sys/dev/fe/if_fe_cbus.c | 10 ---------- sys/i386/conf/NOTES | 1 - sys/pc98/conf/GENERIC | 1 - 7 files changed, 42 deletions(-) diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 6cda8fbc12f8..802896a9eb8f 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1789,7 +1789,6 @@ hint.el.0.irq="9" device ep device ex device fe 1 -options FE_8BIT_SUPPORT # LAC-98 support hint.fe.0.at="isa" hint.fe.0.port="0x300" device fea diff --git a/sys/conf/options.i386 b/sys/conf/options.i386 index bdcaf02c1198..fdea31c62688 100644 --- a/sys/conf/options.i386 +++ b/sys/conf/options.i386 @@ -121,8 +121,6 @@ KBDIO_DEBUG opt_kbd.h EISA_SLOTS opt_eisa.h -FE_8BIT_SUPPORT opt_fe.h - # pcvt(4) has a bunch of options FAT_CURSOR opt_pcvt.h XSERVER opt_pcvt.h diff --git a/sys/conf/options.pc98 b/sys/conf/options.pc98 index 488eadb10d1e..10909f8fd8bb 100644 --- a/sys/conf/options.pc98 +++ b/sys/conf/options.pc98 @@ -111,8 +111,6 @@ KBDIO_DEBUG opt_kbd.h EISA_SLOTS opt_eisa.h -FE_8BIT_SUPPORT opt_fe.h - # pcvt(4) has a bunch of options FAT_CURSOR opt_pcvt.h XSERVER opt_pcvt.h diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c index 11ce67f8d403..f22973609383 100644 --- a/sys/dev/fe/if_fe.c +++ b/sys/dev/fe/if_fe.c @@ -111,11 +111,6 @@ #define FE_MAX_LOOP 0x800 #endif -/* - * If you define this option, 8-bit cards are also supported. - */ -/*#define FE_8BIT_SUPPORT*/ - /* * Device configuration flags. */ @@ -1331,7 +1326,6 @@ fe_droppacket (struct fe_softc * sc, int len) */ if (len > 12) { /* Read 4 more bytes, and skip the rest of the packet. */ -#ifdef FE_8BIT_SUPPORT if ((sc->proto_dlcr6 & FE_D6_SBW) == FE_D6_SBW_BYTE) { (void) fe_inb(sc, FE_BMPR8); @@ -1340,7 +1334,6 @@ fe_droppacket (struct fe_softc * sc, int len) (void) fe_inb(sc, FE_BMPR8); } else -#endif { (void) fe_inw(sc, FE_BMPR8); (void) fe_inw(sc, FE_BMPR8); @@ -1348,14 +1341,12 @@ fe_droppacket (struct fe_softc * sc, int len) fe_outb(sc, FE_BMPR14, FE_B14_SKIP); } else { /* We should not come here unless receiving RUNTs. */ -#ifdef FE_8BIT_SUPPORT if ((sc->proto_dlcr6 & FE_D6_SBW) == FE_D6_SBW_BYTE) { for (i = 0; i < len; i++) (void) fe_inb(sc, FE_BMPR8); } else -#endif { for (i = 0; i < len; i += 2) (void) fe_inw(sc, FE_BMPR8); @@ -1389,7 +1380,6 @@ fe_emptybuffer (struct fe_softc * sc) * have been broken. So, we cannot use skip operation. * Just discard everything in the buffer. */ -#ifdef FE_8BIT_SUPPORT if ((sc->proto_dlcr6 & FE_D6_SBW) == FE_D6_SBW_BYTE) { for (i = 0; i < 65536; i++) { @@ -1399,7 +1389,6 @@ fe_emptybuffer (struct fe_softc * sc) } } else -#endif { for (i = 0; i < 65536; i += 2) { if (fe_inb(sc, FE_DLCR5) & FE_D5_BUFEMP) @@ -1611,14 +1600,12 @@ fe_rint (struct fe_softc * sc, u_char rstat) * use inw() to get the status byte. The significant * value is returned in lower 8 bits. */ -#ifdef FE_8BIT_SUPPORT if ((sc->proto_dlcr6 & FE_D6_SBW) == FE_D6_SBW_BYTE) { status = fe_inb(sc, FE_BMPR8); (void) fe_inb(sc, FE_BMPR8); } else -#endif { status = (u_char) fe_inw(sc, FE_BMPR8); } @@ -1628,14 +1615,12 @@ fe_rint (struct fe_softc * sc, u_char rstat) * It is a sum of a header (14 bytes) and a payload. * CRC has been stripped off by the 86960. */ -#ifdef FE_8BIT_SUPPORT if ((sc->proto_dlcr6 & FE_D6_SBW) == FE_D6_SBW_BYTE) { len = fe_inb(sc, FE_BMPR8); len |= (fe_inb(sc, FE_BMPR8) << 8); } else -#endif { len = fe_inw(sc, FE_BMPR8); } @@ -1896,13 +1881,11 @@ fe_get_packet (struct fe_softc * sc, u_short len) eh = mtod(m, struct ether_header *); /* Get a packet. */ -#ifdef FE_8BIT_SUPPORT if ((sc->proto_dlcr6 & FE_D6_SBW) == FE_D6_SBW_BYTE) { fe_insb(sc, FE_BMPR8, (u_int8_t *)eh, len); } else -#endif { fe_insw(sc, FE_BMPR8, (u_int16_t *)eh, (len + 1) >> 1); } @@ -1977,7 +1960,6 @@ fe_write_mbufs (struct fe_softc *sc, struct mbuf *m) * packet in the transmission buffer, we can skip the * padding process. It may gain performance slightly. FIXME. */ -#ifdef FE_8BIT_SUPPORT if ((sc->proto_dlcr6 & FE_D6_SBW) == FE_D6_SBW_BYTE) { len = max(length, ETHER_MIN_LEN - ETHER_CRC_LEN); @@ -1985,7 +1967,6 @@ fe_write_mbufs (struct fe_softc *sc, struct mbuf *m) fe_outb(sc, FE_BMPR8, (len & 0xff00) >> 8); } else -#endif { fe_outw(sc, FE_BMPR8, max(length, ETHER_MIN_LEN - ETHER_CRC_LEN)); @@ -1995,9 +1976,7 @@ fe_write_mbufs (struct fe_softc *sc, struct mbuf *m) * Update buffer status now. * Truncate the length up to an even number, since we use outw(). */ -#ifdef FE_8BIT_SUPPORT if ((sc->proto_dlcr6 & FE_D6_SBW) != FE_D6_SBW_BYTE) -#endif { length = (length + 1) & ~1; } @@ -2011,7 +1990,6 @@ fe_write_mbufs (struct fe_softc *sc, struct mbuf *m) * only words. So that we require some extra code to patch * over odd-length mbufs. */ -#ifdef FE_8BIT_SUPPORT if ((sc->proto_dlcr6 & FE_D6_SBW) == FE_D6_SBW_BYTE) { /* 8-bit cards are easy. */ @@ -2022,7 +2000,6 @@ fe_write_mbufs (struct fe_softc *sc, struct mbuf *m) } } else -#endif { /* 16-bit cards are a pain. */ savebyte = NO_PENDING_BYTE; @@ -2064,14 +2041,12 @@ fe_write_mbufs (struct fe_softc *sc, struct mbuf *m) /* Pad to the Ethernet minimum length, if the packet is too short. */ if (length < ETHER_MIN_LEN - ETHER_CRC_LEN) { -#ifdef FE_8BIT_SUPPORT if ((sc->proto_dlcr6 & FE_D6_SBW) == FE_D6_SBW_BYTE) { fe_outsb(sc, FE_BMPR8, padding, ETHER_MIN_LEN - ETHER_CRC_LEN - length); } else -#endif { fe_outsw(sc, FE_BMPR8, (u_int16_t *)padding, (ETHER_MIN_LEN - ETHER_CRC_LEN - length) >> 1); diff --git a/sys/dev/fe/if_fe_cbus.c b/sys/dev/fe/if_fe_cbus.c index 97a07a17c3df..d1977c844c61 100644 --- a/sys/dev/fe/if_fe_cbus.c +++ b/sys/dev/fe/if_fe_cbus.c @@ -22,10 +22,6 @@ * $FreeBSD$ */ -#include "opt_fe.h" -#include "opt_inet.h" -#include "opt_ipx.h" - #include #include #include @@ -656,11 +652,6 @@ fe_probe_ssi(device_t dev) static int fe_probe_lnx(device_t dev) { -#ifndef FE_8BIT_SUPPORT - device_printf(dev, - "skip LAC-98012/013(only 16-bit cards are supported)\n"); - return ENXIO; -#else struct fe_softc *sc = device_get_softc(dev); u_long iobase, irq; @@ -727,7 +718,6 @@ fe_probe_lnx(device_t dev) sc->init = fe_init_lnx; return 0; -#endif /* FE_8BIT_SUPPORT */ } diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES index 6cda8fbc12f8..802896a9eb8f 100644 --- a/sys/i386/conf/NOTES +++ b/sys/i386/conf/NOTES @@ -1789,7 +1789,6 @@ hint.el.0.irq="9" device ep device ex device fe 1 -options FE_8BIT_SUPPORT # LAC-98 support hint.fe.0.at="isa" hint.fe.0.port="0x300" device fea diff --git a/sys/pc98/conf/GENERIC b/sys/pc98/conf/GENERIC index 49b3a6221d43..9c4e8ab5b2fb 100644 --- a/sys/pc98/conf/GENERIC +++ b/sys/pc98/conf/GENERIC @@ -178,7 +178,6 @@ device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') # ISA Ethernet NICs. pccard nics included. device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards device ep # Etherlink III based cards -options FE_8BIT_SUPPORT # LAC-98 support device fe # Fujitsu MB8696x based cards device lnc # C-NET(98)S device sn # SMC's 9000 series of ethernet chips