summaryrefslogtreecommitdiffstats
path: root/sys/dev/fe
diff options
context:
space:
mode:
authorshiba <shiba@FreeBSD.org>2001-09-02 13:05:00 +0000
committershiba <shiba@FreeBSD.org>2001-09-02 13:05:00 +0000
commit25567a30d1c20a36fb0b125f6b67c54d5bb963d6 (patch)
tree5a5b5b124f697a8a8e4288f59a38f851d09ba77c /sys/dev/fe
parent9afaf5c2383745fbd5d086c7fa53230d705e71d9 (diff)
downloadFreeBSD-src-25567a30d1c20a36fb0b125f6b67c54d5bb963d6.zip
FreeBSD-src-25567a30d1c20a36fb0b125f6b67c54d5bb963d6.tar.gz
Always turned on 8bit access card support for the fe driver
both i386/pc98, so options FE_8BIT_SUPPORT was deleted. Reviewed by: nyan
Diffstat (limited to 'sys/dev/fe')
-rw-r--r--sys/dev/fe/if_fe.c25
-rw-r--r--sys/dev/fe/if_fe_cbus.c10
2 files changed, 0 insertions, 35 deletions
diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c
index 11ce67f..f229736 100644
--- a/sys/dev/fe/if_fe.c
+++ b/sys/dev/fe/if_fe.c
@@ -112,11 +112,6 @@
#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 97a07a1..d1977c8 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 <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -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 */
}
OpenPOWER on IntegriCloud