Commit Graph

528 Commits

Author SHA1 Message Date
Peter Wemm
1d63bf5236 Fix warning: 128: warning: initialization makes pointer from integer
Note: this file has lots of #if __FreeBSD__ >= 4 etc which needs to be
changed to __FreeBSD_version >= 400000 etc.
2001-06-15 00:26:41 +00:00
Peter Wemm
7b77e0fa50 Activate the kthread mechanism for doing usb bus discovery. This means
that device add/remove will work without usbd running.  usbd is still
used for execing stuff, but that is all now.  Ideally it could be replaced
by a devd some day.  Until now, usbd had to be running so that the
USB_DISCOVER ioctl could be called to walk the tree when an attachment
status change was noticed.

Among the changes:
- when a detach happens, remove any pending 'attach' messages or the system
suffers from whiplash from exec moused / kill moused loops if you do lots
of attach/detach and later start usbd.
- tweaks related to kthread differences
- disable the select handler for the old interface (never return success).
I have not removed it yet or old usbd's will abort.  That can get removed
later once usbd is cleaned up and things have stabilized for a few weeks.
- get Giant in the kthread.
- a couple of minor potential bug fixes (usb_nevents vs malloc failure etc)

Pre-approved by: n_hibma (ages and ages ago)
2001-06-06 22:00:03 +00:00
Poul-Henning Kamp
3b6c05fa7f Remove the empty uscannerioctl() and use noioctl() instead. 2001-05-23 17:51:43 +00:00
Jun Kuriyama
da76f18bc6 Add description for 82801BA controller.
MFC after:	1 week
2001-05-21 01:24:14 +00:00
Mark Murray
fb919e4d5a 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)
2001-05-01 08:13:21 +00:00
Nick Hibma
d309bc7f71 Regen. 2001-04-30 17:38:57 +00:00
Nick Hibma
eb9c76a9f0 Add 4300C Id
Submitted by:	Ernst de Haan <ernst@heinz.jollem.com>
2001-04-30 17:37:11 +00:00
Nick Hibma
be971a7240 Regen. 2001-04-17 15:53:35 +00:00
Nick Hibma
177f46f166 Add the HP scanner 3400C 2001-04-17 15:53:20 +00:00
Nick Hibma
e47670c92d Regen. 2001-04-17 15:34:44 +00:00
Nick Hibma
dacb51ca16 Lexar jumpSHOT Id.
Submitted by:	gshapiro
2001-04-17 15:34:22 +00:00
Nick Hibma
1470e6aaeb Regen. 2001-04-12 11:08:59 +00:00
Nick Hibma
47a9ad6b89 TDK ids
Submitted by:	Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
2001-04-12 11:04:08 +00:00
Nick Hibma
426128e90b From NetBSD 2001-04-12 10:59:30 +00:00
Nick Hibma
e796578c40 Rege. 2001-04-09 18:45:32 +00:00
Nick Hibma
053a2f773b Again an ID that has been reused. Update description. 2001-04-09 18:45:02 +00:00
Nick Hibma
6e4a2c5638 Add the Abocom URE 450 ethernet adapter.
Submitted by:   dima@bog.msu.su
2001-04-09 18:44:11 +00:00
Nick Hibma
d6bbfa7387 Regen. 2001-04-09 18:26:18 +00:00
Nick Hibma
5224ce264a Update the description for the EPSON PID 0x010a. It seems to be reused in
the 8700 series.
2001-04-09 18:22:20 +00:00
Nick Hibma
0ec85a1de5 Regen. 2001-04-09 18:19:41 +00:00
Nick Hibma
b0477600ef Add the Omni 56K Plus modem
Submitted by:	kazarov@izmiran.rssi.ru
2001-04-09 18:19:20 +00:00
Nick Hibma
b9688f84b0 Add id for the IO Data ET/T
PR:		23877
Submitted by:	Makoto MATSUSHITA <matusita@jp.freebsd.org>
2001-04-07 20:47:29 +00:00
Nick Hibma
899a73c0a6 Regen. 2001-04-02 13:12:15 +00:00
Nick Hibma
d8ee57ce7d Add Agate Q-Drive.
Submitted by:	Ian Cartwright <ian351c@home.com>
2001-04-02 13:11:59 +00:00
Nick Hibma
59a42a13d5 Regen. 2001-04-02 13:02:36 +00:00
Nick Hibma
0a191eddb4 Sync with NetBSD usbdevs 2001-04-02 13:02:17 +00:00
Brian Feldman
a75c49591f Since -CURRENT requires module dependencies to actually be correct for
linking to work, have cue(4) depend on usb so it actually works.
2001-03-29 18:14:55 +00:00
Peter Wemm
32533d5ff9 Regenerate correctly. 2001-03-29 00:06:16 +00:00
Peter Wemm
e665ecb55c Hint: usbdevs_data.h and usbdevs.h are marked:
* THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
Put the Epson 1240 scanner device in the correct place.
2001-03-29 00:05:51 +00:00
Poul-Henning Kamp
3f865320ba Small patch is required to the USB susbsystem to include support for
Epson Perfection 1240U scanner.

PR:		25565
Submitted by:	Martin Machacek <m@m3a.cz>
2001-03-28 17:58:31 +00:00
Poul-Henning Kamp
f83880518b Send the remains (such as I have located) of "block major numbers" to
the bit-bucket.
2001-03-26 12:41:29 +00:00
John Baldwin
19eb87d22a Grab the process lock while calling psignal and before calling psignal. 2001-03-07 03:37:06 +00:00
Peter Wemm
3eca04a56b Add an AUE device ID: USB_PRODUCT_MELCO_LUATX5
Submitted by:  Yoshihiko SARUMARU <mistral@imasy.or.jp>
2001-03-05 02:28:58 +00:00
Peter Wemm
003223c276 Disable the mutex locking calls. These do not work in their present form
as the code calls the usb stack (which can sleep) while holding the driver
lock.  This leads to a deadlock.
2001-02-27 01:05:25 +00:00
Nick Hibma
cf4bfc5243 Change default devfs permissions to the ones in MAKEDEV.
Suggested by:	rwatson
2001-02-19 18:14:49 +00:00
Jonathan Lemon
608a3ce62a Extend kqueue down to the device layer.
Backwards compatible approach suggested by: peter
2001-02-15 16:34:11 +00:00
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
Nick Hibma
785fe81a71 Regen. 2001-02-06 14:59:28 +00:00
Nick Hibma
483f8be664 Add a comment about the fact that adding an ID doesn't actually do anything. 2001-02-06 14:59:03 +00:00
Poul-Henning Kamp
6817526d14 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
2001-02-06 10:12:15 +00:00
Nick Hibma
6e76a6951d Regen. 2001-02-05 11:03:21 +00:00
Nick Hibma
0462c572a5 Add some ids from NetBSD. 2001-02-05 11:02:50 +00:00
Nick Hibma
e0fdc93431 Regen. 2001-02-05 11:00:35 +00:00
Nick Hibma
d4c317748d * Correct a broken entry
* Add the id for the Rio 800 USB.
Submitted by:	Wesley Morgan <morganw@chemikals.org>
2001-02-05 11:00:13 +00:00
Poul-Henning Kamp
37d4006626 Another round of the <sys/queue.h> FOREACH transmogriffer.
Created with:   sed(1)
Reviewed by:    md5(1)
2001-02-04 16:08:18 +00:00
Poul-Henning Kamp
fc2ffbe604 Mechanical change to use <sys/queue.h> macro API instead of
fondling implementation details.

Created with: sed(1)
Reviewed by: md5(1)
2001-02-04 13:13:25 +00:00
Poul-Henning Kamp
78d82c8c59 Use LIST_FOREACH() to traverse ifp->if_multiaddrs list, instead of
<sys/queue.h> implementation details.

Created with:   /usr/sbin/sed
Reviewed with:  /sbin/md5
2001-02-03 16:29:10 +00:00
John Baldwin
4957d1b4cb Use suser(9) instead of checking p->p_ucred->cr_uid directly. 2001-01-23 22:22:25 +00:00
Jake Burkholder
a448b62ac9 Make intr_nesting_level per-process, rather than per-cpu. Setup
interrupt threads to run with it always >= 1, so that malloc can
detect M_WAITOK from "interrupt" context.  This is also necessary
in order to context switch from sched_ithd() directly.

Reviewed By:	peter
2001-01-21 19:25:07 +00:00
Bosko Milekic
08812b3925 Implement MTX_RECURSE flag for mtx_init().
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
2001-01-19 01:59:14 +00:00