summaryrefslogtreecommitdiffstats
path: root/sys/dev/gem/if_gemvar.h
diff options
context:
space:
mode:
authortmm <tmm@FreeBSD.org>2002-03-23 19:43:15 +0000
committertmm <tmm@FreeBSD.org>2002-03-23 19:43:15 +0000
commitb004f846650d2b4557c3bd674a96672a970f1b0b (patch)
tree73dce8b86a48d31813798ad37382811ddd497552 /sys/dev/gem/if_gemvar.h
parent67873bb7a8246bf8d6726b0912d5d7de275e340a (diff)
downloadFreeBSD-src-b004f846650d2b4557c3bd674a96672a970f1b0b.zip
FreeBSD-src-b004f846650d2b4557c3bd674a96672a970f1b0b.tar.gz
In some cases, RX descriptors that are signalled to have been completed
by the hardware are still marked as owned. Handle this by installing a timeout handler to collect this descriptor to avoid having received packets remain unhandled until the next one arrives.
Diffstat (limited to 'sys/dev/gem/if_gemvar.h')
-rw-r--r--sys/dev/gem/if_gemvar.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/gem/if_gemvar.h b/sys/dev/gem/if_gemvar.h
index 8abce88..9e6c7ee 100644
--- a/sys/dev/gem/if_gemvar.h
+++ b/sys/dev/gem/if_gemvar.h
@@ -60,6 +60,12 @@
#define GEM_NEXTRX(x) ((x + 1) & GEM_NRXDESC_MASK)
/*
+ * How many ticks to wait until to retry on a RX descriptor that is still owned
+ * by the hardware.
+ */
+#define GEM_RXOWN_TICKS (hz / 50)
+
+/*
* Control structures are DMA'd to the GEM chip. We allocate them in
* a single clump that maps to a single DMA segment to make several things
* easier.
@@ -132,6 +138,7 @@ struct gem_softc {
struct mii_data *sc_mii; /* MII media control */
device_t sc_dev; /* generic device information */
struct callout sc_tick_ch; /* tick callout */
+ struct callout sc_rx_ch; /* delayed rx callout */
/* The following bus handles are to be provided by the bus front-end */
bus_space_tag_t sc_bustag; /* bus tag */
OpenPOWER on IntegriCloud