Commit Graph

64 Commits

Author SHA1 Message Date
jhay
8c48760400 Get rid of kvtop().
Change inb() and outb() to use bus_space*().
2003-04-23 15:40:11 +00:00
mdodd
23fce71011 - Express hard dependencies on bus (pci, isa, pccard) and
network layer (ether).
- Don't abuse module names to facilitate ifconfig module loading;
  such abuse isn't really needed.  (And if we do need type information
  associated with a module then we should make it explicit and not
  use hacks.)
2003-04-15 06:37:30 +00:00
nyan
63c6853343 Move ar_devclass definition to if_ar.c. 2003-02-23 13:20:42 +00:00
imp
1493fd6e76 Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
alfred
8f5153c3ea Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
schweikh
c353aec149 Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
sam
2bb2c8431a network interface driver changes:
o don't strip the Ethernet header from inbound packets; pass packets
  up the stack intact (required significant changes to some drivers)
o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN)
o track ether_ifattach/ether_ifdetach API changes
o track bpf changes (use BPF_TAP and BPF_MTAP)
o track vlan changes (ifnet capabilities, revised processing scheme, etc.)
o use if_input to pass packets "up"
o call ether_ioctl for default handling of ioctls

Reviewed by:	many
Approved by:	re
2002-11-14 23:54:55 +00:00
brooks
66553e5300 Use if_printf(ifp, "blah") instead of printf("ar%d: blah", ifp->if_unit). 2002-10-01 00:42:51 +00:00
obrien
d176db23ad Directives may not be used inside a macro argument, so don't. 2002-05-09 18:01:19 +00:00
jhb
5a4577c2f0 Change callers of mtx_init() to pass in an appropriate lock type name. In
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.

Tested on:	i386, alpha, sparc64
2002-04-04 21:03:38 +00:00
jhay
c70ddad12f Move the isa parts to a separate file. 2001-04-16 13:20:39 +00:00
jhay
d52843ae81 Update include files to reflect the new location of the ar device. 2001-01-30 10:01:15 +00:00
peter
e90fc8ae63 Stop counting sppp interfaces, we were just testing its presence to give
a warning if it was missing.
2001-01-29 12:27:46 +00:00
jhay
b5b8fa9bc0 Newbusify ar(4). 2001-01-24 18:45:29 +00:00
peter
7fcc516524 Special case for compiling LINT - just give a warning and continue on.
At least we have a chance at getting test compile coverage for the rest
of the kernel now.
2001-01-17 00:47:46 +00:00
julian
d3e08032f6 Part 2 of the netgraph rewrite.
This is mostly cosmetic changes, (though I caught a bug or two while
makeing them)
Reviewed by:	archie@freebsd.org
2001-01-08 05:34:06 +00:00
julian
6de76ea239 Rewrite of netgraph to start getting ready for SMP.
This version is functional and is aproaching solid..
notice I said APROACHING. There are many node types I cannot test
I have tested: echo hole ppp socket vjc iface tee bpf async tty
The rest compile and "Look" right.  More changes to follow.
DEBUGGING is enabled in this code to help if people have problems.
2001-01-06 00:46:47 +00:00
julian
1ab8a4da8a Divorce the kernel binary ABI version number from the message
format version number. (userland programs should not need to be
recompiled when the netgraph kernel internal ABI is changed.

Also fix modules that don;t handle the fact that a caller may not supply
a return message pointer. (benign at the moment because the calling code
checks, but that will change)
2000-12-18 20:03:32 +00:00
julian
6fc6411b80 Reviewed by: Archie@freebsd.org
This clears out my outstanding netgraph changes.
There is a netgraph change of design in the offing and this is to some
extent a superset of soem of the new functionality and some of the old
functionality that may be removed.

This code works as before, but allows some new features that I want to
work with and evaluate. It is the basis for a version of netgraph
with integral locking for SMP use.

This is running on my test machine with no new problems :-)
2000-12-12 18:52:14 +00:00
dwmalone
418e7e45d7 Convert more malloc+bzero to malloc+M_ZERO.
Submitted by:	josh@zipperup.org
Submitted by:	Robert Drehmel <robd@gmx.net>
2000-12-08 21:51:06 +00:00
jlemon
af6d4768d5 Lock down the network interface queues. The queue mutex must be obtained
before adding/removing packets from the queue.  Also, the if_obytes and
if_omcasts fields should only be manipulated under protection of the mutex.

IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on
the queue.  An IF_LOCK macro is provided, as well as the old (mutex-less)
versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which
needs them, but their use is discouraged.

Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF,
which takes care of locking/enqueue, and also statistics updating/start
if necessary.
2000-11-25 07:35:38 +00:00
julian
c99f150e66 Duh. These have been sitting in my tree since I committed this stuff.
Thes are identical to what I committed except that they had the correct
copyright headers. This is what I was SUPPOSED to have checked in..
2000-11-20 13:43:40 +00:00
phk
7a0868a185 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
peter
252dc9302f Mass update of isa drivers using compatability shims to use
COMPAT_ISA_DRIVER() so that we can get rid of the evil isa_compat.h table.
2000-05-28 13:40:48 +00:00
julian
c823368bff Two simple changes to the kernel internal API for netgraph modules,
to support future work in flow-control and 'packet reject/replace'
processing modes.

reviewed by: phk, archie
2000-04-28 17:09:00 +00:00
imp
f454c7935a Ahhrggg. Put the test for the compat shims AFTER the file that includes
them.

Pointed out by: bde
2000-03-27 20:24:02 +00:00
imp
5f1e2ae32e Per conversations in -current, add #error to these drivers when you don't
have the right compatibility shims enabled.  ISA drivers to follow later.
2000-03-27 18:32:45 +00:00
archie
68d10485d3 Remove definition of the unimplemented "control" hook. 2000-01-21 01:39:40 +00:00
julian
c52cd3ba76 Add explicit null entries for new entrypoints.
Forgotten by: Archie
1999-12-01 09:34:14 +00:00
julian
3e51587456 protect some more operations with splimp() under Netgraph. 1999-11-19 05:37:37 +00:00
peter
fc85357116 Fix some warnings. 1999-11-18 08:32:02 +00:00
julian
c0f629a008 User netgraph typedefs for methods 1999-11-01 10:09:34 +00:00
julian
cee464e11b Make it compile inthe NETGRAPH case. 1999-10-25 23:14:04 +00:00
julian
d894cf1c17 Whistle's Netgraph link-layer (sometimes more) networking infrastructure.
Been in production for 3 years now. Gives Instant Frame relay to if_sr
and if_ar drivers, and PPPOE support soon. See:
ftp://ftp.whistle.com/pub/archie/netgraph/index.html
for on-line manual pages.

Reviewed by: Doug Rabson (dfr@freebsd.org)
Obtained from:  Whistle CVS tree
1999-10-21 09:06:11 +00:00
jhay
27b43e66a2 Add support for the PCI version of the Digi SYNC/570i cards. 1999-10-17 09:40:04 +00:00
phk
024e9c590a Remove NBPF conditionality of bpf calls in most of our network drivers.
This means that we will not have to have a bpf and a non-bpf version
of our driver modules.

This does not open any security hole, because the bpf core isn't loadable

The drivers left unchanged are the "cross platform" drivers where the respective
maintainers are urged to DTRT, whatever that may be.

Add a couple of missing FreeBSD tags.
1999-09-25 12:06:01 +00:00
peter
e4b04a2b21 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
des
284ed27f44 Rename bpfilter to bpf. 1999-07-06 19:23:32 +00:00
peter
8434a4cf55 Fix 'signed char as array index' warnings and an unused variable. 1999-05-06 18:58:05 +00:00
phk
94e37f09bf Organize the various modes (CISCO/AUTO/DEMAND/LEASED) a little bit better,
centralize the code.

Remember to call TLF/TLS on the hardware in CISCO mode.
1999-03-30 13:28:23 +00:00
phk
efb5bb2011 Straigthen out the use of the tls and tlf callbacks.
Not tested on the if_sr, if_cx and if_ar drivers, but
expected to work just the same as it used to.

Any users of these drivers (or even better: donors
of hardware for them) please contact phk@freebsd.org
so we can test the next batch of changes to if_sppp.
1998-12-16 18:42:38 +00:00
bde
3dbd6f0919 Initialize isa_devtab entries for interrupt handlers in individual
device drivers, not in ioconf.c.  Use a different hack in isa_device.h
so that a new config(8) is not required yet.

pc98 parts approved by: kato
1998-10-22 05:58:45 +00:00
bde
f6db30ae0d Fixed printf format errors. Only one left in LINT on i386's. 1998-08-24 02:28:16 +00:00
bde
598d10b84a Removed unused includes. 1998-06-21 14:53:44 +00:00
bde
9f5b4510b7 Added used include of <i386/isa/isa_device.h> - don't depend on
pollution in <sys/conf.h>
1998-06-17 13:54:59 +00:00
dfr
92449ad5fa This commit fixes various 64bit portability problems required for
FreeBSD/alpha.  The most significant item is to change the command
argument to ioctl functions from int to u_long.  This change brings us
inline with various other BSD versions.  Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.

The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
1998-06-07 17:13:14 +00:00
des
31722e83fd Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108. 1998-04-17 22:37:19 +00:00
eivind
15cd3046e2 Make INET a proper option.
This will not make any of object files that LINT create change; there
might be differences with INET disabled, but hardly anything compiled
before without INET anyway.  Now the 'obvious' things will give a
proper error if compiled without inet - ipx_ip, ipfw, tcp_debug.  The
only thing that _should_ work (but can't be made to compile reasonably
easily) is sppp :-(

This commit move struct arpcom from <netinet/if_ether.h> to
<net/if_arp.h>.
1998-01-08 23:42:31 +00:00
bde
2cf5cf3752 Added used #include - don't depend on <sys/mbuf.h> including
<sys/malloc.h> (unless we only use the bogusly shared M*WAIT flags).
1997-09-02 01:19:47 +00:00
joerg
9d854f9de6 Major overhaul of the SyncPPP layer. Basically, this comprises now a
full implementation of the sate machine as described in RFC1661, and
provides support for plugging in various control protocols.  I needed
this to provide PPP support for the BISDN project (right now).

Unfortunatley, while the existing API was almost up to the point, i
needed one minor API change in order to decouple the this-layer-
started and this-layer-finished actions from the respective Up and
Down events of the lower layer.  This requires two additional lines in
the attach routines of all existing lower layer interface drivers that
are using syncPPP (shortcutting these actions and events).  Apart from
this, i believe i didn't change the API of all this, so everything
should plug in without too many hassles.  Please report if i broke
something in the existing drivers.

For a list of features (including new ones like dial-on-demand), and
things still to be done, please refer to the man page i'll commit asap.

Encouraged by:	Serge Vakulenko <vak@cronyx.ru>
1997-05-19 22:03:09 +00:00