Commit Graph

55 Commits

Author SHA1 Message Date
joerg
58e867556f Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
2010-04-05 07:19:28 +00:00
pooka
10fe49d72c Redefine bpf linkage through an always present op vector, i.e.
#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.
2010-01-19 22:06:18 +00:00
pooka
63ee3d24ed Remove unused macro definition (the NetBSD version would just not go
through a compiler).
2010-01-18 20:45:12 +00:00
cegger
a591bc88dd struct device * -> device_t, no functional changes intended. 2009-05-06 10:34:32 +00:00
dholland
3781289e95 Merge patch from PR 12605, which tidies up allocation of transmit DMA maps.
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?)
2009-03-29 05:26:43 +00:00
cegger
3bde75a1bc use device_lookup_private to get softc 2008-06-12 22:44:47 +00:00
dyoung
8862e80cb4 Delete non-illuminating #ifdef-OTHER_OPERATING_SYSTEM code that
confuses ctags(1).
2008-05-22 01:27:32 +00:00
chris
282f3bfbc1 Fix caddr_t fallout for cats kernel builds. 2007-03-04 17:55:10 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
uebayasi
25e0bf9073 Use C99 initializers where needed. 2006-11-22 01:54:09 +00:00
drochner
3a1bb8a2ff gcc4 found that it can't store
#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.)
2006-05-29 15:12:57 +00:00
perry
fbae48b901 Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
2006-02-16 20:17:12 +00:00
perry
3d4ed1fbc7 __inline__ -> inline 2005-12-24 23:41:33 +00:00
perry
4a2c58419f __asm__ -> __asm 2005-12-24 23:29:06 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
perry
f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
simonb
3cebd9325e White space nit- don't put a space before/after increment/decrement
operators.
2005-02-11 06:21:21 +00:00
thorpej
563cc48dad Remove uneecessary extern decl of de_ca. 2002-10-01 01:39:38 +00:00
thorpej
f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
wiz
c03a48d64f withough -> without 2001-06-13 10:45:57 +00:00
thorpej
081e7cbdaf `typedef void ifnet_ret_t;' isn't valid C -- use #define, instead. 2000-05-03 20:52:29 +00:00
thorpej
fc96443d15 New callout mechanism with two major improvements over the old
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.
2000-03-23 07:01:25 +00:00
matt
a9e57ac54d Fixes for 21143 and MII in full-duplex mode. 2000-01-15 18:39:31 +00:00
tsubai
500edb5379 Fix typo. (From PR 7027) 1999-04-01 14:55:25 +00:00
matt
6e32aa4af4 Invert the RXCOPY test. Note that most new platforms will not
have relaxed alignment so the de driver should just work on them.
1998-09-29 22:40:52 +00:00
matt
e7be3f3601 Fix a problem where txput could "lose" dmamaps if it couldn't actually
place the packet into the ring for some reason.
1998-09-15 17:26:46 +00:00
matt
2633c65da5 This commit fixes two bugs in the de driver. The first is that the
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.
1998-09-15 02:39:03 +00:00
eeh
a2dd74ed79 Merge paddr_t changes into the main branch. 1998-08-13 02:10:37 +00:00
mark
45dd8e3edd Define TULIP_COPY_RXDATA for arm32 as well as alpha. 1998-05-25 22:13:28 +00:00
thorpej
841fb8fd54 Don't try to dynamically create and destroy DMA maps. Instead, keep
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.
1998-02-11 01:28:22 +00:00
thorpej
8e8eed4ba7 Create RX DMA maps with ALLOCNOW. These maps are essentially always
loaded, and recovering from a resource shortage error is much harder
in the receive case.
1998-02-07 21:13:34 +00:00
thorpej
208d979613 Use BUS_DMA_NOWAIT where appropriate. Don't create DMA maps with
BUS_DMA_ALLOCNOW.
1998-02-07 10:27:12 +00:00
matt
8098a443f0 A version of the de driver which does bus_dma. Note that it has not been
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.
1998-02-06 20:57:12 +00:00
matt
500281c8a4 21142 / 21143 chips always use ISVSROM format. (print out message is
SROM checksum is invalid).
1997-10-20 14:32:46 +00:00
matt
4d3bfb2510 Fix pr's port-i386/4127 kern/4190 kern/3700. 1997-10-16 22:02:27 +00:00
matt
0dc780c27d Fix media/console interaction problem on Alpha. Fix 21142/21143 problems
with 10Mb/s links.
1997-10-15 19:06:59 +00:00
explorer
b9f6e61f9d Add and/or update rnd_*() hooks 1997-10-15 06:12:44 +00:00
explorer
80513cb5ae o Make usage of /dev/random dependant on
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.
1997-10-13 00:46:08 +00:00
explorer
1c276eafe2 Add hooks to insert timing info into the random system 1997-10-10 01:19:37 +00:00
thorpej
9c690ec9a6 Add RCS tags that got lost. 1997-08-25 19:02:19 +00:00
thorpej
a2a13689fd Merge with 970703 snapshot of Matt Thomas's de driver. 1997-08-25 18:56:46 +00:00
cgd
429a941288 don't expect/provide pci_decompose_tag to be a MI, public function. It
wasn't intended to be to begin with, and uses of it (e.g. the one in the
'de' driver) are quite likely to be incorrect.
1997-07-19 09:49:39 +00:00
thorpej
cd4fc920b0 Put back Matt Thomas's revision ID, per PR 3723, submitted by
enami tsugutomo <enami@ba2.so-net.or.jp>.
1997-06-08 18:44:02 +00:00
mellon
2a1b799fda Clean up conflicts during merge (thomas de-970603) 1997-06-06 23:14:58 +00:00
thorpej
b5c783c6e4 Merge 970327 "de" update. 1997-05-07 18:45:01 +00:00
cgd
41a0ca7403 clean up space/tag comments 1997-04-13 19:48:50 +00:00
thorpej
8443f8fad0 Resolve conflicts from merge. 1997-03-26 01:33:32 +00:00
veego
196e8ba3c2 Resolve conflicts from merge. 1997-03-23 09:37:28 +00:00
thorpej
914022ca23 Resolve conflicts from merge. 1997-03-19 02:37:36 +00:00
thorpej
0398318515 Resolve conflicts from merge. 1997-03-17 03:44:49 +00:00