#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.
Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff. ... and I'm not going to ponder the depths of unload
here.
Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
Generalize it to also tidy up allocation of receive DMA maps. And change a
few of the symbol names involved to (1) make sure all uses have been fixed
and (2) make it clearer what's actually going on.
Previously the driver was using DMA maps off the free list without fully
allocating them, apparently in order to save two or three lines releasing
them on error paths. According to the submitter of the PR (H.Saito) this
was causing it to reuse a map already in use when under load, resulting
in panics.
I'm not sure if that ought to have been possible or if it reflected an
interrupt handling bug somewhere else, but the change is an improvement
regardless, so we'll go with it.
Compile-tested only, but I've crosschecked the diffs and all that and it's
a pretty noninvasive change.
(Is anyone actually using this driver rather than tlp?)
#define TULIP_TXTIMER 4
in
u_int32_t tulip_txtimer : 2; /* transmission timer */
gcc4 appears to be right. "tulip_txtimer" is purely used by software,
so give it the full integer.
(Appearently the txtimer could never work.)
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.
The old timeout()/untimeout() API has been removed from the kernel.
descriptor count gets miscounted on txprobes. The second (and more
important) is that transmit stalls should now be fixed. The problem
was not due to lack of ring resources but dmamaps. When Jason changed
the driver to use pre-allocated maps (instead of the dynamic ones I
used), and when there were no more maps, the driver just gave up instead
of calling tx_intr to free any transmitted but unreclaimed dma maps.
Since there was nothing being transmitted, no transmit interrupts
would fire to restore things (and OACTIVE prevented other transmits
from happenning). So it stayed starved until another interrupt cause
(like a received packet) "woke" it up.
it simple, and allocate one for each transmit and receive descriptor.
In addition to being simpler and faster, this fixes a serious memory leak
in the transmit path.
tested on any other platform other than i386. Use of bus_dma(9) can be
turned by defining TULIP_BUS_DMA_NOTX and TULIP_BUS_DMA_NORX. These allow
one to determine if the problem is in the transmit or receive path.
A problem reported by mycroft is also fixed.
pseudo-device rnd # /dev/random and in-kernel generator
in config files.
o Add declaration to all architectures.
o Clean up copyright message in rnd.c, rnd.h, and rndpool.c to include
that this code is derived in part from Ted Tyso's linux code.