267654 |
20-Jun-2014 |
gjb |
Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
248078 |
09-Mar-2013 |
marius |
MFC: r243857 (partial)
Mechanically substitute flags from historic mbuf allocator with malloc(9) flags in sys/dev.
|
235743 |
21-May-2012 |
jhb |
Toss bogus mergeinfo.
|
235738 |
21-May-2012 |
sbruno |
MFC r235634
Fix and update battery status bits according to linux driver
|
225736 |
23-Sep-2011 |
kensmith |
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
Approved by: re (implicit)
|
207554 |
03-May-2010 |
sobomax |
Add new tunable 'net.link.ifqmaxlen' to set default send interface queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value.
MFC after: 1 month
|
201758 |
07-Jan-2010 |
mbr |
Remove extraneous semicolons, no functional changes.
Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
|
199542 |
19-Nov-2009 |
jhb |
Several fixes to these drivers. Note that these two drivers are actually just two different attachments (EISA and PCI) to a single driver. - Add real locking. Previously these drivers only acquired their lock in their interrupt handler or in the ioctl routine (but too broadly in the latter). No locking was used for the stack calling down into the driver via if_init() or if_start(), for device shutdown or detach. Also, the interrupt handler held the driver lock while calling if_input(). All this stuff should be fixed in the locking changes. - Really fix these drivers to handle if_alloc(). The front-end attachments were using if_initname() before the ifnet was allocated. Fix this by moving some of the duplicated logic from each driver into pdq_ifattach(). While here, make pdq_ifattach() return an error so that the driver just fails to attach if if_alloc() fails rather than panic'ing. Also, defer freeing the ifnet until the driver has stopped using it during detach. - Add a new private timer to drive the watchdog timer. - Pass the softc pointer to the interrupt handlers instead of the device_t so we can avoid the use of device_get_softc() and to better match what other drivers do.
|
195049 |
26-Jun-2009 |
rwatson |
Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ IF_ADDR_UNLOCK() across network device drivers when accessing the per-interface multicast address list, if_multiaddrs. This will allow us to change the locking strategy without affecting our driver programming interface or binary interface.
For two wireless drivers, remove unnecessary locking, since they don't actually access the multicast address list.
Approved by: re (kib) MFC after: 6 weeks
|
194023 |
11-Jun-2009 |
avg |
strict kobj sigs: fix assortment of device_detach and device_shutdown impls
with common issue of having void return type instead of int
Reviewed by: imp, current@ Approved by: jhb (mentor)
|
170414 |
08-Jun-2007 |
mjacob |
Fix preprocessor code to check for a symbol being defined prior to checking for non-zero.
|
170413 |
08-Jun-2007 |
mjacob |
Carry volatile type in cast so gcc 4.2 will be happy.
|
166923 |
23-Feb-2007 |
piso |
o break newbus api: add a new argument of type driver_filter_t to bus_setup_intr()
o add an int return code to all fast handlers
o retire INTR_FAST/IH_FAST
For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current
Approved by: re (implicit?)
|
166914 |
23-Feb-2007 |
imp |
Catchup with filters
|
158651 |
16-May-2006 |
phk |
Since DELAY() was moved, most <machine/clock.h> #includes have been unnecessary.
|
158471 |
12-May-2006 |
jhb |
Remove various bits of conditional Alpha code and fixup a few comments.
|
152296 |
11-Nov-2005 |
ru |
- Make IFP2ENADDR() a pointer to IF_LLADDR() rather than another copy of Ethernet address.
- Change iso88025_ifattach() and fddi_ifattach() to accept MAC address as an argument, similar to ether_ifattach(), to make this work.
|
148887 |
09-Aug-2005 |
rwatson |
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field.
Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so.
Reviewed by: pjd, bz MFC after: 7 days
|
148654 |
03-Aug-2005 |
rwatson |
Modify device drivers supporting multicast addresses to lock if_addr_mtx over iteration of their multicast address lists when synchronizing the hardware address filter with the network stack-maintained list.
Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca> MFC after: 1 week
|
147256 |
10-Jun-2005 |
brooks |
Stop embedding struct ifnet at the top of driver softcs. Instead the struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com.
This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go.
Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr.
Reviewed by: sobomax, sam
|
146734 |
29-May-2005 |
nyan |
Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 and amd64. The optimization is a trivial on recent machines.
Reviewed by: -arch (imp, marcel, dfr)
|
144044 |
24-Mar-2005 |
mdodd |
Offer unhandled IOCTLS to fddi_ioctl().
|
143158 |
05-Mar-2005 |
imp |
Use BUS_PROBE_DEFAULT for pci probe return value
|
135577 |
22-Sep-2004 |
stefanf |
Prefer C99's __func__ over GCC's __FUNCTION__.
|
130416 |
13-Jun-2004 |
mlaier |
Link ALTQ to the build and break with ABI for struct ifnet. Please recompile your (network) modules as well as any userland that might make sense of sizeof(struct ifnet). This does not change the queueing yet. These changes will follow in a seperate commit. Same with the driver changes, which need case by case evaluation.
__FreeBSD_version bump will follow.
Tested-by: (i386)LINT
|
127135 |
17-Mar-2004 |
njl |
Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
|
124494 |
13-Jan-2004 |
alc |
Use contigmalloc() and contigfree() instead of vm_page_alloc_contig() and kmem_free(). Note: The FreeBSD-specific code in this file has been subsumed by the FreeBSD-specific header file, pdq_freebsd.h. That header file already specifies the use of contigmalloc() and contigfree(). Thus, the purpose of this change is to avoid having nonsensical examples of FreeBSD-specific memory allocation in our source tree.
|
121816 |
31-Oct-2003 |
brooks |
Replace the if_name and if_unit members of struct ifnet with new members if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance.
This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics.
Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
|
119418 |
24-Aug-2003 |
obrien |
Use __FBSDID(). Also some minor style cleanups.
|
118263 |
31-Jul-2003 |
gallatin |
Make this compile on alpha.
|
113545 |
16-Apr-2003 |
mdodd |
- Don't call pci_enable_io() in drivers (unless needed for resume). - Don't test memory/port status and emit an error message; the PCI bus code will do this now.
|
113506 |
15-Apr-2003 |
mdodd |
- 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.)
|
112948 |
01-Apr-2003 |
gallatin |
Add a crutch so that direct-mapped DMA works on alpha. This is a step toward preventing this driver from crashing an alpha at boot.
Tested by: Oliver Lehmann <lehmann@ans-netz.de>
|
112310 |
16-Mar-2003 |
mdodd |
Catch up with bpf_mtap() changes.
|
112309 |
16-Mar-2003 |
mdodd |
Catch up with recent infrastructure changes.
|
111119 |
19-Feb-2003 |
imp |
Back out M_* changes, per decision of the TRB.
Approved by: trb
|
109623 |
21-Jan-2003 |
alfred |
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
|
106937 |
14-Nov-2002 |
sam |
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
|
105507 |
20-Oct-2002 |
phk |
Fix mis-indentation.
Spotted by: FlexeLint
|
102412 |
25-Aug-2002 |
charnier |
Replace various spelling with FALLTHROUGH which is lint()able
|
97748 |
02-Jun-2002 |
schweikh |
Fix typo in the BSD copyright: s/withough/without/
Spotted and suggested by: des MFC after: 3 weeks
|
93818 |
04-Apr-2002 |
jhb |
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
|
93383 |
29-Mar-2002 |
mdodd |
- Merge the pdq driver (if_fpa and if_fea) from NetBSD. Among other things this gets us ifmedia support. - Update fddi_ifattach() to take an additional argument.
|
92739 |
20-Mar-2002 |
alfred |
Remove __P.
|
91439 |
27-Feb-2002 |
peter |
Fix warning (passing wrong arg to arp_ifinit())
Submitted by: LINT, -Werror
|
76166 |
01-May-2001 |
markm |
Undo part of the tangle of having sys/lock.h and sys/mutex.h included in other "system" header files.
Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files.
Sort sys/*.h includes where possible in affected files.
OK'ed by: bde (with reservations)
|
72084 |
06-Feb-2001 |
phk |
Convert if_multiaddrs from LIST to TAILQ so that it can be traversed backwards in the three drivers which want to do that.
Reviewed by: mikeh
|
71999 |
04-Feb-2001 |
phk |
Mechanical change to use <sys/queue.h> macro API instead of fondling implementation details.
Created with: sed(1) Reviewed by: md5(1)
|
70801 |
08-Jan-2001 |
gallatin |
make PCI DEFPA fiddi adapters work on alpha: - add a dma hack similar to the NetBSD one - change PDQ_OS_MEM{RD,WR} to use readl/writel rather than deref'ing a 32 bit va.
Note that I did just enough to get this working on alpha. I probably should have updated it to use busspace, but I was too lazy to navigate the twisty minefield of ifdefs that make up this driver.
Tested by: wilko (on both x86 and alpha)
|
70594 |
02-Jan-2001 |
peter |
Newbusify the PCI PDQ (fddi) attachment. This isn't as clean as the EISA attachment and has not been tested (no hardware!), but at least it stands a chance at working. At least it compiles now.
|
69781 |
08-Dec-2000 |
dwmalone |
Convert more malloc+bzero to malloc+M_ZERO.
Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
|
69152 |
25-Nov-2000 |
jlemon |
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.
|
67899 |
29-Oct-2000 |
phk |
Remove unneeded <stddef.h> #includes.
|
67268 |
18-Oct-2000 |
mdodd |
Use appropriate resource management accessors instead of directly referencing structure members.
Use rman_get_size() instead of end - start + 1.
|
60753 |
21-May-2000 |
hoek |
Uh, ya, sure this almost compiled for __bsdi__. NOT!
Note that __bsdi__s_/_i_/_os_/__ has moved this file to dev/ic/ and has completely removed the non-compiling function from pdq_ifsubr.c and has completely removed this function and placed it into netinet/if_ether.c (if, in fact, it wasn't there the whole time). I was tempted to simply remove this __bsdi__only__ function.
The function is arp_ifinit().
PR: kern/7903
|
55953 |
14-Jan-2000 |
peter |
Pre 4.0 tidy up.
Collect together the components of several drivers and export eisa from the i386-only area (It's not, it's on some alphas too). The code hasn't been updated to work on the Alpha yet, but that can come later.
Repository copies were done a while ago. Moving these now keeps them in consistant place across the 4.x series as the newbusification progresses.
Submitted by: mdodd
|
55892 |
13-Jan-2000 |
mdodd |
Set ifq_maxlen. (to default IFQ_MAXLEN)
|
51646 |
25-Sep-1999 |
phk |
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.
|
50477 |
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
50135 |
21-Aug-1999 |
msmith |
Clean up after removing sys/eventhandler.h from sys/systm.h at the last minute. This should cover all of the missed cases (and should let LINT build again).
|
50107 |
21-Aug-1999 |
msmith |
Implement a new generic mechanism for attaching handler functions to 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
|
49360 |
01-Aug-1999 |
mdodd |
Move the specification of EDGE/LEVEL triggered interrupts to eisa_add_intr() which now takes an additional arguement (one of EISA_TRIGGER_LEVEL or EISA_TRIGGER_EDGE).
The flag RR_SHAREABLE has no effect when passed to bus_alloc_resource(dev, SYS_RES_IRQ, ...) in an EISA device context as the eisa_alloc_resource() call (bus_alloc_resource method) now deals with this flag directly, depending on the device ivars.
This change does nothing more than move all the 'shared = inb(foo + iobsse)' nonesense to the device probe methods rather than the device attach.
Also, print out 'edge' or 'level' in the IRQ announcement message.
Reviewed by: dfr
|
49301 |
31-Jul-1999 |
mdodd |
Don't use at_shutdown() now that we have new_bus which lets us specify a DEVICE_SHUTDOWN method instead.
Reviewed by: me, since nobody else seems to run this hardware in -CURRENT
|
48741 |
10-Jul-1999 |
peter |
Convert the if_fea (DEC FDDI) driver to newbus since it has been broken for ages. This is the EISA wrapper for sys/dev/pdq/*. The pci bus driver is in sys/pci/if_fpa.c.
Submitted by: "Matthew N. Dodd" <winter@jurai.net>
|
48645 |
06-Jul-1999 |
des |
Rename bpfilter to bpf.
|
46813 |
09-May-1999 |
peter |
Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add: #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.)
|
46568 |
06-May-1999 |
peter |
Add sufficient braces to keep egcs happy about potentially ambiguous if/else nesting.
|
46332 |
02-May-1999 |
peter |
These two drivers have not been converted for newbus eisa yet.
|
46024 |
24-Apr-1999 |
peter |
Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn't hurt the driver portability to 3.x too much for where drivers are shared.
|
43292 |
27-Jan-1999 |
dillon |
Fix '|' that was supposed to be '||'
|
42546 |
12-Jan-1999 |
eivind |
Silence warnings.
|
42230 |
01-Jan-1999 |
bde |
The previous commit was bogus. malloc(..., M_WAITOK) should not be used in device attach routines. At least for attaches at boot time, actually waiting, or actually failing for malloc(..., M_NOWAIT), are almost equally unlikely and harmless, but using M_WAITOK interferes with automatic detection of bogus M_WAITOK's.
|
41771 |
14-Dec-1998 |
dillon |
probe function changed from returning char * to const char *.
|
41611 |
09-Dec-1998 |
eivind |
malloc(xxx, yyy, M_WAITOK) does not fail. This probably explains why the bug in the check had never been discovered.
|
38505 |
24-Aug-1998 |
bde |
Fixed printf format errors. Only one left in LINT on i386's.
|
36735 |
07-Jun-1998 |
dfr |
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.
|
33676 |
20-Feb-1998 |
bde |
Removed unused #includes.
|
33181 |
09-Feb-1998 |
eivind |
Staticize.
|
32350 |
08-Jan-1998 |
eivind |
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>.
|
29674 |
21-Sep-1997 |
gibbs |
Add shared EISA interrupt support. Clean up the match routines so that they return const char *
|
29381 |
14-Sep-1997 |
peter |
Bruce wants the warning.
|
29325 |
13-Sep-1997 |
peter |
Fix a warning.
|
27845 |
02-Aug-1997 |
bde |
Removed unused #includes.
|
27534 |
20-Jul-1997 |
bde |
Removed unused #includes.
|
26640 |
14-Jun-1997 |
bde |
Removed unused #includes.
|
24204 |
24-Mar-1997 |
bde |
Don't include <sys/ioctl.h> in the kernel. Stage 2: include <sys/sockio.h> instead of <sys/ioctl.h> in network files.
|
24203 |
24-Mar-1997 |
bde |
Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include it when it is not used. In most cases, the reasons for including it went away when the special ioctl headers became self-sufficient.
|
21846 |
18-Jan-1997 |
joerg |
Catch up with the moving target: merge the change from rev 1.19 of the now dead sys/pci/if_pdq.c which has been committed about by the same time i made my tests with Matt's code.
LINT should compile now again.
Well, that's a clear case where ``CVS writer locks'' would certainly (not) have helped. :-]
|
21830 |
17-Jan-1997 |
joerg |
This mega-merge brings Matt Thomas' 960801 FDDI driver (almost) up to -current.
Thanks goes to Ulrike Nitzsche <ulrike@ifw-dresden.de> for giving me a chance to test this. Only the PCI driver is tested though.
One final patch will follow in a separate commit. This is so that everything up to here can be dragged into 2.2, if we decide so.
Reviewed by: joerg Submitted by: Matt Thomas <matt@3am-software.com>
|
21827 |
17-Jan-1997 |
joerg |
This commit was generated by cvs2svn to compensate for changes in r21826, which included commits to RCS files with non-trunk default branches.
|
21826 |
17-Jan-1997 |
joerg |
Finally import the 960801 of Matt Thomas' DEC FDDI driver. I'm importing it onto a vendor branch first, in the hope that this will make future maintenance easier.
The conflicts are (hopefully) unimportant. More commits that actually bring this into the source tree will follow.
Submitted by: Matt Thomas (thomas@lkg.dec.com)
|