summaryrefslogtreecommitdiffstats
path: root/sys/dev/ar
Commit message (Collapse)AuthorAgeFilesLines
* - Use bus_setup_intr() and bus_teardown_intr() to register device driverjhb2006-02-221-4/+3
| | | | | | | | | | interrupt handlers rather than BUS_SETUP_INTR() and BUS_TEARDOWN_INTR(). Uses of the BUS_*() versions in the implementation of foo_intr methods in bus drivers were not changed. Mostly this just means that some drivers might start printing diagnostic messages like [FAST] when appropriate as well as honoring mpsafenet=0. - Fix two more of the ppbus drivers' identify routines to function correctly in the mythical case of a machine with more than one ppbus.
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-14/+14
| | | | | | | | | | | | | | 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
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-101-29/+38
| | | | | | | | | | | | | | | | | | | | 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
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-293-6/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Use BUS_PROBE_DEFAULT for pci probe return valueimp2005-03-051-2/+2
|
* Initialize Netgraph type at a correct time, before device probing.ru2005-02-151-1/+1
|
* Install netgraph type at an appropriate time.ru2005-02-131-1/+1
|
* Two problems here:ru2005-02-121-21/+1
| | | | | | | | | 1. Dependency on netgraph module was broken (wrong version). 2. Netgraph node type was never destroyed on unload. This was masked by problem #1. Fixed both by using NETGRAPH_INIT(). Now netgraph node type is created on module load, as in the rest of netgraph modules.
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-064-4/+4
|
* As the if_ar driver doesn't contain locking or run its interruptrwatson2004-08-131-1/+2
| | | | | MPSAFE, mark it as IFF_NEEDSGIANT so that its if_start routine is run holding Giant.
* Convert Netgraph to use mbuf tags to pass its meta information around.julian2004-06-251-6/+5
| | | | | | | | Thanks to Sam for importing tags in a way that allowed this to be done. Submitted by: Gleb Smirnoff <glebius@cell.sick.ru> Also allow the sr and ar drivers to create netgraph versions of their modules. Document the change to the ksocket node.
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* Switch to using C99 sparse initialisers for the type methods array.julian2004-05-291-12/+9
| | | | | | | | Should make no binary difference. Submitted by: Gleb Smirnoff <glebius@cell.sick.ru> Reviewed by: Harti Brandt <harti@freebsd.org> MFC after: 1 week
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-2/+2
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Get rid of the last two uses of NG_NODELEN + 1 in the base system byharti2004-01-261-1/+1
| | | | replacing them with NG_NODESIZ.
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-311-2/+2
| | | | | | | | | | | | | 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)
* Use __FBSDID().obrien2003-08-243-9/+10
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-08-221-2/+2
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Get rid of kvtop().jhay2003-04-234-79/+75
| | | | Change inb() and outb() to use bus_space*().
* - Express hard dependencies on bus (pci, isa, pccard) andmdodd2003-04-152-2/+4
| | | | | | | | 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.)
* Move ar_devclass definition to if_ar.c.nyan2003-02-232-2/+2
|
* Back out M_* changes, per decision of the TRB.imp2003-02-191-3/+3
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-3/+3
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-1/+1
| | | | especially in troff files.
* network interface driver changes:sam2002-11-141-4/+2
| | | | | | | | | | | | | | 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
* Use if_printf(ifp, "blah") instead of printf("ar%d: blah", ifp->if_unit).brooks2002-10-011-4/+4
|
* Directives may not be used inside a macro argument, so don't.obrien2002-05-091-3/+3
|
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-041-2/+3
| | | | | | | 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
* Move the isa parts to a separate file.jhay2001-04-162-2443/+2
|
* Update include files to reflect the new location of the ar device.jhay2001-01-302-5/+5
|
* Stop counting sppp interfaces, we were just testing its presence to givepeter2001-01-292-14/+0
| | | | a warning if it was missing.
* Newbusify ar(4).jhay2001-01-244-408/+725
|
* Special case for compiling LINT - just give a warning and continue on.peter2001-01-171-0/+5
| | | | | At least we have a chance at getting test compile coverage for the rest of the kernel now.
* Part 2 of the netgraph rewrite.julian2001-01-082-30/+30
| | | | | | This is mostly cosmetic changes, (though I caught a bug or two while makeing them) Reviewed by: archie@freebsd.org
* Rewrite of netgraph to start getting ready for SMP.julian2001-01-062-48/+76
| | | | | | | | 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.
* Divorce the kernel binary ABI version number from the messagejulian2000-12-182-66/+62
| | | | | | | | | 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)
* Reviewed by: Archie@freebsd.orgjulian2000-12-122-6/+14
| | | | | | | | | | | | | 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 :-)
* Convert more malloc+bzero to malloc+M_ZERO.dwmalone2000-12-082-14/+8
| | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
* Lock down the network interface queues. The queue mutex must be obtainedjlemon2000-11-252-6/+16
| | | | | | | | | | | | | | 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.
* Duh. These have been sitting in my tree since I committed this stuff.julian2000-11-201-0/+29
| | | | | 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..
* Remove unneeded #include <machine/clock.h>phk2000-10-152-2/+0
|
* Mass update of isa drivers using compatability shims to usepeter2000-05-282-4/+26
| | | | COMPAT_ISA_DRIVER() so that we can get rid of the evil isa_compat.h table.
* Two simple changes to the kernel internal API for netgraph modules,julian2000-04-282-6/+8
| | | | | | | to support future work in flow-control and 'packet reject/replace' processing modes. reviewed by: phk, archie
* 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 definition of the unimplemented "control" hook.archie2000-01-213-5/+2
|
* Add explicit null entries for new entrypoints.julian1999-12-012-2/+4
| | | | Forgotten by: Archie
* protect some more operations with splimp() under Netgraph.julian1999-11-192-6/+6
|
* Fix some warnings.peter1999-11-182-4/+4
|
* User netgraph typedefs for methodsjulian1999-11-012-18/+18
|
OpenPOWER on IntegriCloud