Commit Graph

131 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
dyoung b8695aecbf Simplify activation routines: don't call mii_activate(), it's a
no-op.  Don't block interrupts, if_deactivate() does it.
Compile-tested, only.
2009-09-15 19:20:29 +00:00
tsutsui aa60aebf13 Replace shutdownhook_establish(9) with pmf_device_register1(9) in
MI epconfig() and ep_detach(), and remove pmf(9) calls in pcmcia attachment.
Tested on ep0 at pci, but pcmcia attachment is untested.
2009-09-05 12:30:59 +00:00
christos 91ca465c78 device_t changes, pmf, minor knf. 2008-08-27 05:33:47 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
cegger 7088512994 use aprint_*_dev and device_xname 2008-04-08 12:07:25 +00:00
ad a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
dyoung c3db559a5f Constify: use CLLADDR() instead of LLADDR() wherever possible. 2007-08-27 14:48:54 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +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
christos 168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos 4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
dogcow f2d329dca0 remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
peter 58224a41e7 Add power hooks for "ep* at pcmcia?".
ok christos@
2006-07-11 22:49:47 +00:00
nakayama dc8650e97c Add void cast to functions whose return values are ignored. 2006-06-07 15:34:47 +00:00
thorpej 3ddf26777f Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.
2006-02-20 16:50:36 +00:00
perry 93124077ae Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:27:29 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
christos f381db6045 - add missing const
- fix variable shadowing
- remove unneeded casts
2005-05-30 04:43:46 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
perry 18db93c7f6 de-__P 2005-02-04 02:10:35 +00:00
briggs 9750b8741d In epshutdown(), do not attempt to disable the interface when stopping it
because we're about to write to it again (with a global reset).  Disable
the interface explicitly after the reset is written.
2005-01-11 04:16:27 +00:00
thorpej e9818f5b5e When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
2004-10-30 18:08:34 +00:00
mycroft f0e2cfd7fc Eliminate most 8-bit access. Just the data in/out path remains. 2004-08-09 00:25:33 +00:00
thorpej 749715f6ee Use aprint_*(). 2003-01-31 00:26:25 +00:00
simonb d0c3a04b6a Remove variables that are only assigned too but not referenced. 2003-01-20 07:25:04 +00:00
fair 96b8b890ed Change the "dontcare bits" argument to ifmedia_init() to IFM_IMASK
so that it is possible select PHY instances other than the first
one (instance zero), if there is more than one PHY attached.
2002-10-22 00:01:55 +00:00
yamt 7d0fd357f6 make auto const variables static. 2002-06-08 16:51:38 +00:00
christos 49b8e36112 Clean up the C_ and S_ constants. We don't really need two sets of them.
Also make the interrupt handler for older 3com cards look like the xl one.
I.e. don't ack the interrupt latch bit before checking if it is set.
At the same time, introduce constants for the watched interrupts, so that
we don't copy them all over the place.
2001-12-28 20:35:46 +00:00
soren df984ecc52 Use bus_size_t's for bus space read/write offsets. 2001-12-15 11:41:09 +00:00
lukem a4bae8b066 add/cleanup RCSID 2001-11-13 13:14:31 +00:00
perry 7a702dcf66 trivially rename some macro parameters to avoid lint warnings. 2001-11-10 22:48:09 +00:00
wiz 456dff6cb8 Spell 'occurred' with two 'r's. 2001-09-16 16:34:23 +00:00
thorpej fe97433fcd All CORKSCREWs have MII. 2001-07-27 02:33:34 +00:00
thorpej 7859dd206a The EEPROM registers/bits are different on the Corkscrew (3c515). Adjust
for this.
2001-07-20 05:44:48 +00:00
thorpej 0884f20bf7 bzero -> memset 2001-07-07 16:13:44 +00:00
thorpej 06ff822b44 bcopy -> strcpy 2001-07-07 15:57:50 +00:00
jdolecek 8e532c1ad1 Make sure to allocate big enough mbuf data area before elevating
interrupt priority, to avoid allocating additional mbufs on
splsched(). Move some other misc bits out of splched()-guarded
section. This should make the code a bit more friendly wrt e.g.
clock interrupts. Sligh performance improvement was observed with
this change (like 1-2% on slow machine), even.

This also fixes ancient kern/2478 by Bill Sommerfeld.
2001-05-16 20:30:52 +00:00
jdolecek 85c02ac331 epintr(): eliminate write-only variable 'addrandom' 2001-05-14 09:28:49 +00:00
jdolecek 6ff7de5716 remove unneeded #includes, fix typo 2001-05-14 08:01:23 +00:00
jdolecek 497bb809df do not use the synchronous read mode for MCA 3c529 2001-05-14 07:03:50 +00:00
jdolecek 031c6d8c24 Add MCA ep(4) attachment, for 3Com 3c529-type cards. Tested with 3c529-TP,
provided to me by David Brownlee (thanks!).

Performance of this card is quite poor on my PS/2 with 386DX, like 100KB/s
at best, but as low as 5KB/s when transferring bigger files due to
packet overruns. It would be good to revisit this later, probably by
teaching the ic code to use RX Early.
2001-03-22 16:54:45 +00:00
jdolecek 4ffa6a80d6 convert to use ether_ioctl()
fix bunch of typos
2001-03-22 12:00:26 +00:00
jdolecek 522f569810 make some more constant arrays 'const' 2001-02-21 21:39:52 +00:00
thorpej 6b16911a43 ALTQ'ify. 2000-12-14 06:27:23 +00:00
thorpej b84f740be0 Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach(). 2000-11-15 01:02:11 +00:00
thorpej 7ca3fb9ef0 Move the check for "promisc + unicast + not for us" into ether_input(),
and change Ethernet drivers to always pass all received frames to
ether_input() (with a few exceptions, which are documented in the
code).
2000-10-01 23:32:39 +00:00
tsutsui ab9b015dce 6 -> ETHER_ADDR_LEN 2000-09-28 10:10:14 +00:00
thorpej 7951ece147 Use splsched() instead of splhigh(), and explain why in a comment,
as well as document a pitfall of the approach being used.
2000-08-21 14:25:14 +00:00