summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorChris Cappuccio <chris@cvs.openbsd.org>2000-04-26 19:12:09 +0000
committerChris Cappuccio <chris@cvs.openbsd.org>2000-04-26 19:12:09 +0000
commitdf44263382c56c3dfc2b9c21f78f778a6eb0274c (patch)
treec4208f89e812a0d161c03c6d70dd5b4d3e3c0d0f /sys
parentaecd207f2586795a74911914969e8ea149aeffd2 (diff)
Turn on a bit (for 82558/82559 only) which disables the chip's
builin feature to discard frames >1500 bytes (useful for jumbo frames, also 802.1Q VLANs) ok aaron@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/fxp.c3
-rw-r--r--sys/dev/ic/fxpreg.h5
-rw-r--r--sys/dev/ic/fxpvar.h3
-rw-r--r--sys/dev/pci/if_fxp_pci.c11
4 files changed, 17 insertions, 5 deletions
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c
index e747d5f60dc..4d19ead4464 100644
--- a/sys/dev/ic/fxp.c
+++ b/sys/dev/ic/fxp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fxp.c,v 1.2 2000/04/26 12:48:53 aaron Exp $ */
+/* $OpenBSD: fxp.c,v 1.3 2000/04/26 19:12:08 chris Exp $ */
/* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */
/*
@@ -1152,6 +1152,7 @@ fxp_init(xsc)
cbp->stripping = !prm; /* truncate rx packet to byte count */
cbp->padding = 1; /* (do) pad short tx packets */
cbp->rcv_crc_xfer = 0; /* (don't) xfer CRC to host */
+ cbp->long_rx = sc->not_82557; /* (enable) long packets */
cbp->force_fdx = 0; /* (don't) force full duplex */
cbp->fdx_pin_en = 1; /* (enable) FDX# pin */
cbp->multi_ia = 0; /* (don't) accept multiple IAs */
diff --git a/sys/dev/ic/fxpreg.h b/sys/dev/ic/fxpreg.h
index 68cbd61b047..586c1878c1c 100644
--- a/sys/dev/ic/fxpreg.h
+++ b/sys/dev/ic/fxpreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fxpreg.h,v 1.1 2000/04/18 18:44:27 jason Exp $ */
+/* $OpenBSD: fxpreg.h,v 1.2 2000/04/26 19:12:08 chris Exp $ */
/*
* Copyright (c) 1995, David Greenman
@@ -161,7 +161,8 @@ struct fxp_cb_config {
volatile u_int stripping:1,
padding:1,
rcv_crc_xfer:1,
- :5;
+ long_rx:1, /* 82558/82559 */
+ :4;
volatile u_int :6,
force_fdx:1,
fdx_pin_en:1;
diff --git a/sys/dev/ic/fxpvar.h b/sys/dev/ic/fxpvar.h
index 4918342a218..92e075daaec 100644
--- a/sys/dev/ic/fxpvar.h
+++ b/sys/dev/ic/fxpvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fxpvar.h,v 1.1 2000/04/18 18:44:27 jason Exp $ */
+/* $OpenBSD: fxpvar.h,v 1.2 2000/04/26 19:12:08 chris Exp $ */
/* $NetBSD: if_fxpvar.h,v 1.1 1997/06/05 02:01:58 thorpej Exp $ */
/*
@@ -63,6 +63,7 @@ struct fxp_softc {
int phy_primary_device; /* device type of primary PHY */
int phy_10Mbps_only; /* PHY is 10Mbps-only device */
int eeprom_size; /* size of serial EEPROM */
+ int not_82557; /* yes if we are 82558/82559 */
};
/* Macros to ease CSR access. */
diff --git a/sys/dev/pci/if_fxp_pci.c b/sys/dev/pci/if_fxp_pci.c
index 61b4aa1d0fc..d4e730bfef8 100644
--- a/sys/dev/pci/if_fxp_pci.c
+++ b/sys/dev/pci/if_fxp_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fxp_pci.c,v 1.1 2000/04/18 18:44:31 jason Exp $ */
+/* $OpenBSD: if_fxp_pci.c,v 1.2 2000/04/26 19:12:08 chris Exp $ */
/*
* Copyright (c) 1995, David Greenman
@@ -138,6 +138,7 @@ fxp_pci_attach(parent, self, aux)
bus_space_tag_t iot = pa->pa_iot;
bus_addr_t iobase;
bus_size_t iosize;
+ pcireg_t rev = PCI_REVISION(pa->pa_class);
if (pci_io_find(pc, pa->pa_tag, FXP_PCI_IOBA, &iobase, &iosize)) {
printf(": can't find i/o space\n");
@@ -170,6 +171,14 @@ fxp_pci_attach(parent, self, aux)
return;
}
+ /*
+ * revisions
+ * 2 = 82557
+ * 4, 6 = 82558
+ * 8 = 82559
+ */
+ sc->not_82557 = (rev >= 4) ? 1 : 0;
+
/* Do generic parts of attach. */
if (fxp_attach_common(sc, enaddr, intrstr)) {
/* Failed! */