summaryrefslogtreecommitdiffstats
path: root/sys/dev/en
Commit message (Collapse)AuthorAgeFilesLines
* Remove __P.alfred2002-03-203-40/+38
|
* Lock down the network interface queues. The queue mutex must be obtainedjlemon2000-11-251-13/+13
| | | | | | | | | | | | | | 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.
* Change check for existence of mbuf->m_ext.ext_free to check of new ext_typebmilekic2000-11-111-1/+1
| | | | | | | in order to determine whether the ext_buf is a cluster, or some other type of storage. Reviewed by: jlemon
* restore the freebsd local type-cast fixes that I mistakenly removedkjc2000-11-081-14/+15
| | | | | | | in the previous commit while attempting to sync with netbsd. Pointed out by: bde (never thought of compiling i386's LINT with -64-bit-longs...)
* newbusify the en atm driver.kjc2000-11-071-144/+187
|
* newbusify the en atm driver.kjc2000-11-073-77/+90
| | | | | | | | also - sync with netbsd - fix a bug that miscalculates tx cell counts when the pointer size isn't 4 tested both ENI and Adaptec cards on both i386 and alpha.
* Added used include of <machine/bus.h> -- don't depend on evil namespacebde2000-11-041-1/+2
| | | | | | | | pollution in <sys/mutex.h>. This was half fixed in rev.1.3 of midwayreg.h. The pollution exposed the bug that this driver was using toy versions of the bus space macros under FreeBSD. Disabling the toy versions made this driver compile but dependent on the pollution. There was still a toy version of bus_space_read_1() in unreachable code.
* Enabled the used include of <machine/bus.h> -- don't depend on evilbde2000-11-041-1/+1
| | | | | | | | namespace pollution in <sys/mutex.h>. This was half fixed in rev.1.3 of midwayreg.h. The pollution exposed the bug that this driver was using toy versions of the bus space macros under FreeBSD. Disabling the toy versions made this driver compile and maybe support PIO space, but dependent on the pollution.
* Remove unneeded #include <sys/proc.h> lines.phk2000-10-291-1/+0
|
* Make LINT compile again.phk2000-10-222-2/+2
|
* Remove unneeded #include <machine/clock.h>phk2000-10-152-2/+0
|
* Replace the mbuf external reference counting code with somethingdwmalone2000-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that should be better. The old code counted references to mbuf clusters by using the offset of the cluster from the start of memory allocated for mbufs and clusters as an index into an array of chars, which did the reference counting. If the external storage was not a cluster then reference counting had to be done by the code using that external storage. NetBSD's system of linked lists of mbufs was cosidered, but Alfred felt it would have locking issues when the kernel was made more SMP friendly. The system implimented uses a pool of unions to track external storage. The union contains an int for counting the references and a pointer for forming a free list. The reference counts are incremented and decremented atomically and so should be SMP friendly. This system can track reference counts for any sort of external storage. Access to the reference counting stuff is now through macros defined in mbuf.h, so it should be easier to make changes to the system in the future. The possibility of storing the reference count in one of the referencing mbufs was considered, but was rejected 'cos it would often leave extra mbufs allocated. Storing the reference count in the cluster was also considered, but because the external storage may not be a cluster this isn't an option. The size of the pool of reference counters is available in the stats provided by "netstat -m". PR: 19866 Submitted by: Bosko Milekic <bmilekic@dsuper.net> Reviewed by: alfred (glanced at by others on -net)
* Ahhrggg. Put the test for the compat shims AFTER the file that includesimp2000-03-271-4/+4
| | | | | | them. Pointed out by: bde
* Per conversations in -current, add #error to these drivers when you don'timp2000-03-271-0/+4
| | | | have the right compatibility shims enabled. ISA drivers to follow later.
* Remove #if NEN > 0 in the name of FreeBSD - it's not required as configpeter2000-01-291-5/+1
| | | | only compiles this file if it's true. NEN is still used though. :-(
* remove unused #include, add $FreeBSD$phk1999-10-111-1/+2
|
* Clean up after removing sys/eventhandler.h from sys/systm.h at the lastmsmith1999-08-211-0/+3
| | | | | minute. This should cover all of the missed cases (and should let LINT build again).
* Implement a new generic mechanism for attaching handler functions tomsmith1999-08-211-4/+5
| | | | | | | | | | | | | events, in order to pave the way for removing a number of the ad-hoc implementations currently in use. Retire the at_shutdown family of functions and replace them with new event handler lists. Rework kern_shutdown.c to take greater advantage of the use of event handlers. Reviewed by: green
* Rename bpfilter to bpf.des1999-07-061-7/+7
|
* Eliminate a bunch of #include "pci.h" and #if NPCI > 0 around entirepeter1999-07-031-4/+0
| | | | files. config will leave the whole file out if configured to do so.
* Missing revision markers.peter1999-05-091-0/+2
|
* Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add:peter1999-05-091-4/+0
| | | | | | | | #define COMPAT_PCI_DRIVER(name,data) DATA_SET(pcidevice_set,data) .. to 2.2.x and 3.x if people think it's worth it. Driver writers can do this if it's not defined. (The reason for this is that I'm trying to progressively eliminate use of linker_sets where it hurts modularity and runtime load capability, and these DATA_SET's keep getting in the way.)
* clean up en atm driverkjc1999-05-081-319/+54
| | | | | | | | | | | | | o fix DDB support - include "opt_ddb.h" - fix Debugger() arg pointed out by bde o back out pvc shadow interface support - it is currently not used - to make it easier to merge another implementation o misc minor cleanup
* Undo excess staticization - these two are meant to be callable frompeter1999-05-061-2/+4
| | | | DDB.
* Suser() simplification:phk1999-04-271-2/+2
| | | | | | | | | | | | | | | | | | | 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code.
* Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn'tpeter1999-04-241-0/+4
| | | | hurt the driver portability to 3.x too much for where drivers are shared.
* Staticize.eivind1999-04-111-3/+3
|
* Fix warnings preparing for -Wall -Wcast-qualdillon1999-01-271-1/+1
| | | | | Also disable one usb module in LINT due to fatal compilation errors, temporary.
* cleanup: remove part of the code for 2.1.kjc1999-01-091-36/+128
| | | | | | add two functions to get the MAC address of the card. Obtained from: ALTQ
* probe function changed from returning char * to const char *.dillon1998-12-141-2/+2
|
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()archie1998-12-042-5/+5
| | | | | | | | | | | | | | for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc. These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer. Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com>
* fix a bug which could lock up a transmitter.kjc1998-10-091-1/+5
| | | | | don't use the entire buffer space. if WRTX becomes equal to RDTX, the transmitter stops assuming the buffer is empty.
* FIxed printf format errors. Most of them were exposed by our ntohl()bde1998-08-171-25/+31
| | | | returning long. There would be many more if int_32_t were not int.
* Use [u]intptr_t instead of [u_]long for casts between pointers andbde1998-08-161-13/+14
| | | | integers. Don't forget to cast to (void *) as well.
* update ATM driver. (base version: midway.c 1.67 --> 1.68)kjc1998-07-293-142/+642
| | | | | | | | | | | | | | | | | | | | | | | several new features are added: - support vc/vp shaping - support pvc shadow interface code cleanup: - remove WMAYBE related code. ENI WMAYBE DMA doen't work. - remove updating if_lastchange for every packet. - BPF related code is moved to midway.c as it should be. (bpfwrite should work if atm_pseudohdr and LLC/SNAP are prepended.) - BPF link type is changed to DLT_ATM_RFC1483. BPF now understands only LLC/SNAP!! (because bpf can't handle variable link header length.) It is recommended to use LLC/SNAP instead of NULL encapsulation for various reasons. (BPF, IPv6, interoperability, etc.) the code has been used for months in ALTQ and KAME IPv6. OKed by phk long time ago.
* This commit fixes various 64bit portability problems required fordfr1998-06-071-1/+1
| | | | | | | | | | 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.
* Support compiling with `gcc -ansi'.bde1998-04-151-1/+1
|
* Staticize.eivind1998-02-091-1/+1
|
* Make POWERFAIL_NMI, PPS_SYNC and NATM new style options.eivind1998-01-311-0/+1
| | | | This also fixes a couple of defunct options; submitted by bde.
* Make INET a proper option.eivind1998-01-081-0/+1
| | | | | | | | | | | | 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>.
* Removed unused #includes.bde1997-10-281-4/+0
|
* Added used #include - don't depend on <sys/mbuf.h> includingbde1997-09-021-0/+1
| | | | <sys/malloc.h> (unless we only use the bogusly shared M*WAIT flags).
* Removed unused #includes.bde1997-06-141-7/+0
|
* This commit was generated by cvs2svn to compensate for changes in r25603,kjc1997-05-093-0/+3717
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * import Chuck Cranor's ATM driverkjc1997-05-093-0/+3717
|
* import Chuck Cranor's ATM driverkjc1997-05-091-0/+348
OpenPOWER on IntegriCloud