freebsd-skq/sys/dev/usb
Bosko Milekic 9ed346bab0 Change and clean the mutex lock interface.
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)
2001-02-09 06:11:45 +00:00
..
devlist2h.awk Add usbdevs and friends. 1999-11-18 18:02:44 +00:00
FILES Add umass.c 2000-01-27 23:19:14 +00:00
hid.c Remove __P prototypes to reduce diffs between the NetBSD and FreeBSD 2000-07-17 18:41:20 +00:00
hid.h Remove __P prototypes to reduce diffs between the NetBSD and FreeBSD 2000-07-17 18:41:20 +00:00
if_aue.c Convert if_multiaddrs from LIST to TAILQ so that it can be traversed 2001-02-06 10:12:15 +00:00
if_auereg.h Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
if_cue.c Convert if_multiaddrs from LIST to TAILQ so that it can be traversed 2001-02-06 10:12:15 +00:00
if_cuereg.h Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
if_kue.c Convert if_multiaddrs from LIST to TAILQ so that it can be traversed 2001-02-06 10:12:15 +00:00
if_kuereg.h Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
kue_fw.h OpenBSD has a broken debugger that does not grok static. Use a 2000-04-03 20:58:30 +00:00
Makefile.usbdevs Make the makefile work properly. 2000-03-15 22:13:50 +00:00
ohci_pci.c Remove a couple of leftover unused variables. 2000-12-13 01:06:54 +00:00
ohci.c Make intr_nesting_level per-process, rather than per-cpu. Setup 2001-01-21 19:25:07 +00:00
ohcireg.h Change Lennart's e-mail address. 2000-05-14 16:43:10 +00:00
ohcivar.h Remove __P prototypes to reduce diffs between the NetBSD and FreeBSD 2000-07-17 18:41:20 +00:00
rio500_usb.h Update the urio driver. It now works on NetBSD and OpenBSD as well. 2000-04-08 17:02:13 +00:00
udbp.c select() DKI is now in <sys/selinfo.h>. 2001-01-09 04:33:49 +00:00
udbp.h The USB double bulk pipe driver (Host to host cables). Currently there 2000-05-01 22:48:23 +00:00
ugen.c select() DKI is now in <sys/selinfo.h>. 2001-01-09 04:33:49 +00:00
uhci_pci.c Remove a couple of leftover unused variables. 2000-12-13 01:06:54 +00:00
uhci.c Mechanical change to use <sys/queue.h> macro API instead of 2001-02-04 13:13:25 +00:00
uhcireg.h Change Lennart's e-mail address. 2000-05-14 16:43:10 +00:00
uhcivar.h Save and restore the registers SOF and FRAMENUMBER on suspend. In some 2000-08-07 00:04:53 +00:00
uhid.c select() DKI is now in <sys/selinfo.h>. 2001-01-09 04:33:49 +00:00
uhub.c Bugfix: device_resume should be connected to bus_generic_resume not 2001-01-05 10:25:47 +00:00
ukbd.c select() DKI is now in <sys/selinfo.h>. 2001-01-09 04:33:49 +00:00
ulpt.c Fix for powering off a HP DJ950C during printing. As stated by Ian: 2000-11-07 10:50:34 +00:00
umass.c Add a quirk for drives that do not handle long inquiry data. 2001-01-08 00:25:52 +00:00
umodem.c Use suser(9) instead of checking p->p_ucred->cr_uid directly. 2001-01-23 22:22:25 +00:00
ums.c select() DKI is now in <sys/selinfo.h>. 2001-01-09 04:33:49 +00:00
urio.c select() DKI is now in <sys/selinfo.h>. 2001-01-09 04:33:49 +00:00
usb_ethersubr.c Lock down the network interface queues. The queue mutex must be obtained 2000-11-25 07:35:38 +00:00
usb_ethersubr.h Pull my head out of my ass and actually make the tx netisr stuff work right. 2000-01-14 01:36:16 +00:00
usb_if.m * Factor out the object system from new-bus so that it can be used by 2000-04-08 14:17:18 +00:00
usb_mem.h Remove __P prototypes to reduce diffs between the NetBSD and FreeBSD 2000-07-17 18:41:20 +00:00
usb_port.h UMASS_DEBUG implemented panic(9). 2001-01-04 11:27:41 +00:00
usb_quirks.c AcerScan 320U's are braindead. Sometimes they do not return strings 2000-11-02 20:42:34 +00:00
usb_quirks.h Make the Ricochet modems work through the USB interface. 2000-11-01 17:35:57 +00:00
usb_subr.c Undo previous commit. <machine/clock.h> is needed for the prototype 2000-10-16 18:50:00 +00:00
usb.c select() DKI is now in <sys/selinfo.h>. 2001-01-09 04:33:49 +00:00
usb.h Don't check for ohci/uhci to be loaded, check for the usb module. 2000-09-02 10:17:58 +00:00
usbcdc.h Add more CDC defines. 2000-08-13 18:23:07 +00:00
usbdevs Add a comment about the fact that adding an ID doesn't actually do anything. 2001-02-06 14:59:03 +00:00
usbdevs_data.h Regen. 2001-02-06 14:59:28 +00:00
usbdevs.h Regen. 2001-02-06 14:59:28 +00:00
usbdi_util.c Remove __P prototypes to reduce diffs between the NetBSD and FreeBSD 2000-07-17 18:41:20 +00:00
usbdi_util.h Remove __P prototypes to reduce diffs between the NetBSD and FreeBSD 2000-07-17 18:41:20 +00:00
usbdi.c Make intr_nesting_level per-process, rather than per-cpu. Setup 2001-01-21 19:25:07 +00:00
usbdi.h Remove __P prototypes to reduce diffs between the NetBSD and FreeBSD 2000-07-17 18:41:20 +00:00
usbdivar.h Remove __P prototypes to reduce diffs between the NetBSD and FreeBSD 2000-07-17 18:41:20 +00:00
usbhid.h Sync with NetBSD: 2000-10-16 17:45:27 +00:00
uscanner.c select() DKI is now in <sys/selinfo.h>. 2001-01-09 04:33:49 +00:00