summaryrefslogtreecommitdiffstats
path: root/sys/dev/an
Commit message (Collapse)AuthorAgeFilesLines
* Change and clean the mutex lock interface.bmilekic2001-02-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtx_enter(lock, type) becomes: mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks) mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized) similarily, for releasing a lock, we now have: mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN. We change the caller interface for the two different types of locks because the semantics are entirely different for each case, and this makes it explicitly clear and, at the same time, it rids us of the extra `type' argument. The enter->lock and exit->unlock change has been made with the idea that we're "locking data" and not "entering locked code" in mind. Further, remove all additional "flags" previously passed to the lock acquire/release routines with the exception of two: MTX_QUIET and MTX_NOSWITCH The functionality of these flags is preserved and they can be passed to the lock/unlock routines by calling the corresponding wrappers: mtx_{lock, unlock}_flags(lock, flag(s)) and mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN locks, respectively. Re-inline some lock acq/rel code; in the sleep lock case, we only inline the _obtain_lock()s in order to ensure that the inlined code fits into a cache line. In the spin lock case, we inline recursion and actually only perform a function call if we need to spin. This change has been made with the idea that we generally tend to avoid spin locks and that also the spin locks that we do have and are heavily used (i.e. sched_lock) do recurse, and therefore in an effort to reduce function call overhead for some architectures (such as alpha), we inline recursion for this case. Create a new malloc type for the witness code and retire from using the M_DEV type. The new type is called M_WITNESS and is only declared if WITNESS is enabled. Begin cleaning up some machdep/mutex.h code - specifically updated the "optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently need those. Finally, caught up to the interface changes in all sys code. Contributors: jake, jhb, jasone (in no particular order)
* Implement MTX_RECURSE flag for mtx_init().bmilekic2001-01-191-1/+2
| | | | | | | | | | | | | | | | | | | All calls to mtx_init() for mutexes that recurse must now include the MTX_RECURSE bit in the flag argument variable. This change is in preparation for an upcoming (further) mutex API cleanup. The witness code will call panic() if a lock is found to recurse but the MTX_RECURSE bit was not set during the lock's initialization. The old MTX_RECURSE "state" bit (in mtx_lock) has been renamed to MTX_RECURSED, which is more appropriate given its meaning. The following locks have been made "recursive," thus far: eventhandler, Giant, callout, sched_lock, possibly some others declared in the architecture-specific code, all of the network card driver locks in pci/, as well as some other locks in dev/ stuff that I've found to be recursive. Reviewed by: jhb
* Fixes to the Aironet driver to clear up some WEP issues.archie2000-12-082-2/+5
| | | | | PR: 23097 Submitted by: Doug Ambrisko <ambrisko@whistle.com>
* remove unneded sys/ucred.h includesalfred2000-11-301-1/+0
|
* Close PR# 21843 and PR# 21864. This adds support for WEP and updates somewpaul2000-11-133-12/+121
| | | | | | | | | | | | | | | of the data structures to include new members that weren't defined in the manual I have. I opted to use Doug Ambrisko's WEP patches since David Cornejo's patches did not include the necessary changes to ancontrol(8) to actually enable and use WEP. NOTE: I don't currently have access to an Aironet card, so I can't test any of this. Everything compiles and close scrutiny doesn't reveal any obvious problems, but Murphy's Law applies. This means I will probably leave these changes in -current for a bit longer than usual until I'm sure they work right.
* Move suser() and suser_xxx() prototypes and a related #define fromphk2000-10-291-1/+0
| | | | | | | | | <sys/proc.h> to <sys/systm.h>. Correctly document the #includes needed in the manpage. Add one now needed #include of <sys/systm.h>. Remove the consequent 48 unused #includes of <sys/proc.h>.
* Catch up to moving headers:jhb2000-10-203-3/+3
| | | | | - machine/ipl.h -> sys/ipl.h - machine/mutex.h -> sys/mutex.h
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Remember to assign an_dev to device_t before calling an_attach().wpaul2000-10-133-0/+13
|
* Convert the Aironet driver to use mutexes instead of spls.wpaul2000-10-134-28/+59
|
* MF4: fix style(9) whitespace breakage.peter2000-08-081-3/+3
|
* Make all Ethernet drivers attach using ether_ifattach() and detach usingarchie2000-07-134-7/+5
| | | | | | | | | ether_ifdetach(). The former consolidates the operations of if_attach(), ng_ether_attach(), and bpfattach(). The latter consolidates the corresponding detach operations. Reviewed by: julian, freebsd-net
* - Add suser check before SIOCSAIRONET.roberto2000-06-181-3/+10
| | | | | | - Fix a splimp() w/o splx bug in the ioctl routine while I'm here. Submitted by: Aaron Campbell <aaron@openbsd.org>
* Oops, nearly forgot to commit this one. Use correct register names, orpeter2000-05-281-3/+3
| | | | this will not compile without COMPAT_OLDPCI.
* Move code to handle BPF and bridging for incoming Ethernet packets outarchie2000-05-141-13/+0
| | | | | | | | | | | | | | | of the individual drivers and into the common routine ether_input(). Also, remove the (incomplete) hack for matching ethernet headers in the ip_fw code. The good news: net result of 1016 lines removed, and this should make bridging now work with *all* Ethernet drivers. The bad news: it's nearly impossible to test every driver, especially for bridging, and I was unable to get much testing help on the mailing lists. Reviewed by: freebsd-net
* Remove ~25 unneeded #include <sys/conf.h>phk2000-04-193-3/+0
| | | | Remove ~60 unneeded #include <sys/malloc.h>
* Remove unloaded printf. We do this now in the newbus layer.imp2000-04-171-1/+0
|
* Fix an instance of rman_get_start() than should be rman_get_bushandle().wpaul2000-01-161-1/+1
|
* Actually read the PCI device ID when testing the device ID value againstwpaul2000-01-151-1/+1
| | | | the supported devices list.
* Add driver support for the Aironet 4500/4800 series wireless 802.11wpaul2000-01-146-0/+3444
NICs. (Finally!) The PCMCIA, ISA and PCI varieties are all supported, though only the ISA and PCI ones will work on the alpha for now. PCCARD, ISA and PCI attachments are all provided. Also provided an ancontrol(8) utility for configuring the NIC, man pages, and updated pccard.conf.sample. ISA cards are supported in both ISA PnP and hard-wired mode, although you must configure the kernel explicitly to support the hardwired mode since you have to know the I/O address and port ahead of time. Special thanks to Doug Ambrisko for doing the initial newbus hackery and getting it to work in infrastructure mode.
OpenPOWER on IntegriCloud