Commit Graph

571 Commits

Author SHA1 Message Date
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
Nick Hibma
a3698b8a7f Nikon E990 and Nomad MP3 player Ids.
Submitted by:	pete@altadena.net
2001-01-18 00:15:49 +00:00
Jake Burkholder
ef73ae4b0c Use PCPU_GET, PCPU_PTR and PCPU_SET to access all per-cpu variables
other then curproc.
2001-01-10 04:43:51 +00:00
Garrett Wollman
0a2c3d48c6 select() DKI is now in <sys/selinfo.h>. 2001-01-09 04:33:49 +00:00
Julian Elischer
30400f03aa Part 2 of the netgraph rewrite.
This is mostly cosmetic changes, (though I caught a bug or two while
makeing them)
Reviewed by:	archie@freebsd.org
2001-01-08 05:34:06 +00:00
Nick Hibma
bace1123c3 Add a quirk for drives that do not handle long inquiry data.
Add the entry for the Yano U640MO-03 MO drive. (ifdef-0-ed out for now)

Fix a hack were an original buffer was modified instead of copied
(cmd[] -> (*rcmd)[])

Submitted by:	Iwasa Kazmi <kzmi@ca2.so-net.ne.jp>
2001-01-08 00:25:52 +00:00
Nick Hibma
dbccc4a13a Add the Synchronize command to umass_atapi_transform. It seems to work
unmodified for ATAPI type devices.
2001-01-07 23:58:07 +00:00
Nick Hibma
1f125f1361 Print the correct value in a debugging printf.
Submitted by:	Iwasa Kazmi <kzmi@ca2.so-net.ne.jp>
2001-01-07 23:54:34 +00:00
Nick Hibma
c68067e92a 1) Return the requestad length - the transferred length as the residue,
instead of the requested length. Otherwise all transfers look like 0 byte
transfers to CAM.

Submitted by:	Iwasa Kazmi <kzmi@ca2.so-net.ne.jp>

2) Finalise the command in the case of CBI transfers with CCI (command
completion interrupt).

3) Remove a redundant bzero of a buffer.
2001-01-07 23:43:55 +00:00
Julian Elischer
069154d55f Rewrite of netgraph to start getting ready for SMP.
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.
2001-01-06 00:46:47 +00:00
Nick Hibma
3b980312b4 Bugfix: device_resume should be connected to bus_generic_resume not
*_suspend.

Submitted by:	kazu
2001-01-05 10:25:47 +00:00
Nick Hibma
1458cde760 Readd the id removed by sheldon in the previous commit to uscanner.c.
Change the ID in if_aue.c to match the new name in usbdevs.h.
2001-01-04 11:55:24 +00:00
Nick Hibma
95e5d98749 UMASS_DEBUG implemented panic(9).
PR:		24044
Submitted by:	Mike Bristow <mike@urgle.com>
2001-01-04 11:27:41 +00:00
Nick Hibma
5a5b0c4efa Regen.
(Sorry for forgetting that).
2001-01-04 11:23:21 +00:00
Sheldon Hearn
63ccc06ffe Revert rev 1.8, which broke the installkernel target. 2001-01-04 11:12:15 +00:00
Nick Hibma
7b58790dbf Add the Id of the Epson 1640 scanner.
Submitted by:	Chris Shenton <chris@shenton.org>
2001-01-03 11:46:09 +00:00
Nick Hibma
801a3c8a40 Add a few Ids. From NetBSD. 2001-01-03 11:45:03 +00:00
Nick Hibma
ad979802f6 Initialise rcmdlen.
Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
2000-12-20 09:37:35 +00:00
Julian Elischer
589f6ed8ce Divorce the kernel binary ABI version number from the message
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)
2000-12-18 20:03:32 +00:00
Mike Smith
01282c87e3 Remove a couple of leftover unused variables. 2000-12-13 01:06:54 +00:00
Julian Elischer
c4e30752ba remove unused variable 2000-12-12 23:50:51 +00:00
Julian Elischer
859a4d166c Reviewed by: Archie@freebsd.org
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 :-)
2000-12-12 18:52:14 +00:00
Nick Hibma
040639a0aa make sure we tear down the devnodes for the endpoints 1 and above
when switching configuration.
2000-12-12 10:19:19 +00:00
Nick Hibma
64e3d839ec Remove a warning.
Reported by:	phk
2000-12-08 10:44:15 +00:00
Roger Hardiman
2c097d3332 Add Isochronus transfer mode support required by
USB WebCams, using a patch from Peter Housel.

With this change ugen, and with Peter's 'vid' program
in ports/graphics/vid, we can capture single images from USB Cameras
using the OmniVision OV511 chipset (including some models of the
Creative WebCam 3)

NetBSD merged in Peter's patch to their ugen.c file
several months ago, so this brings us back in line.

Submitted by:	Peter Housel <housel@acm.org>
		http://members.home.com/housel/
Approved by:	Nick Hibma
2000-12-07 10:28:25 +00:00
Roger Hardiman
5f41c13187 Non functional change.
Change a few indentations to tabs.
Change the functions to use ANSI sytle parameters.

This lowers the diffs between our copy of ugen.c and NetBSD's copy

Approved by:	Nick Hibma
2000-12-07 10:13:18 +00:00
Nick Sayer
305501d329 We now have the ability to assign the correct IRQ when PNP-OS is turned
on. So stop failing the attach if the IRQ is unassigned. With this
patch, I can now boot with PNP-OS YES in my BIOS no differently than
PNP-OS NO (which is a good thing since Windows hangs with PNP-OS NO).

Obtained from:	msmith
2000-12-03 17:07:19 +00:00
Jonathan Lemon
df5e198723 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.
2000-11-25 07:35:38 +00:00
Bill Paul
0b32bab160 Add a forgotten mutex_exit()/KUE_UNLOCK() to kue_init(). 2000-11-23 05:58:48 +00:00
Nick Hibma
60295bde4c Set OPEN Flag on open.
Make set_config(1) print warning message if it fails.
2000-11-15 10:36:08 +00:00
Nick Hibma
1d8068f94a Fix for powering off a HP DJ950C during printing. As stated by Ian:
When the printer is turned off the pipe write will cause and error,
which causes lpd to close the device and reopen it to clear the error.
After a short while the device will disappear from the bus but lpd will
have opened the ulpt0 port by then. ulpt_status will check for status
without checking the sc->dying flag and panic the kernel when the device
finally disappears from the bus.

Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
2000-11-07 10:50:34 +00:00
Nick Hibma
540862484b Regen. 2000-11-03 15:19:42 +00:00
Nick Hibma
78faf46e96 Sone -> Sony
Submitted by:	Hiroyuki Aizu <aizu@jaist.ac.jp>
2000-11-03 15:19:00 +00:00
Nick Hibma
4e457f4298 AcerScan 320U's are braindead. Sometimes they do not return strings
descriptors and if they do the strings are nonsense.
2000-11-02 20:42:34 +00:00
Bill Paul
9cf05fe7a1 Close PR #21078: the aue driver was not correctly programming the
multicast filter on the Pegasus chip. Since IPv6 depends a lot
on multicasting, this caused several failures for people trying to
use IPv6 with Pegasus USB ethernet devices.

Submitted by:	Jun Kuriyama <kuriyama@FreeBSD.org>
2000-11-01 18:26:36 +00:00
Nick Hibma
03eb1a83f8 Make the Ricochet modems work through the USB interface.
Tested by:	jim
Obtained from:	NetBSD
2000-11-01 17:35:57 +00:00
Nick Hibma
59490b7d67 Cut&paste bug: Set USBD_SHORT_XFER_OK unconditionally 2000-11-01 00:28:40 +00:00
Nick Hibma
d69d452a55 remove an unused function (and a warning) 2000-10-30 10:58:02 +00:00
Poul-Henning Kamp
cf9fa8e725 Move suser() and suser_xxx() prototypes and a related #define from
<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>.
2000-10-29 16:06:56 +00:00
Poul-Henning Kamp
9f69a4578a Weaken a bogus dependency on <sys/proc.h> in <sys/buf.h> by #ifdef'ing
the offending inline function (BUF_KERNPROC) on it being #included
already.

I'm not sure BUF_KERNPROC() is even the right thing to do or in the
right place or implemented the right way (inline vs normal function).

Remove consequently unneeded #includes of <sys/proc.h>
2000-10-29 14:54:55 +00:00
Poul-Henning Kamp
53ce36d17a Remove unneeded #include <sys/proc.h> lines. 2000-10-29 13:57:19 +00:00
Nick Hibma
2fd84f56d5 The USB scanner driver. To be used together with SANE. 2000-10-25 10:34:38 +00:00
Nick Hibma
bebddc8cd2 Regen. 2000-10-25 10:14:44 +00:00
Nick Hibma
84b3d895ef Sync with NetBSD 2000-10-25 10:13:47 +00:00
Bill Paul
f709eddf9f Convert the USB ethernet drivers to use mutexes. Also convert
usb_ethersubr.c. This module maintains two queues for packets which
are each protected with one mutex. These are all the changes I can
do for now. Removing the USBD_NO_TSLEEP flag doesn't work yet: when
I tried it, the system would usually freeze up after a NIC had been
operating for a while. The usb_ethersubr module itself ought to
go away; this is the next thing I need to test.
2000-10-24 22:38:54 +00:00
Nick Hibma
64b78d815a Bugfix: The data is not stored only in the first cblock, calculate the
length of the data properly. This should be moved into a tty_subr
function.

Also, disanle the setting of the CDC_CM_OVER_DATA flag. It breaks some
modems. I don't think that ther actually is a modem that needs this.

Submitted by:		Brad Karp <bkarp@ICSI.Berkeley.EDU>
2000-10-20 00:35:52 +00:00
Nick Hibma
3cf950d1c5 Regen. 2000-10-20 00:30:01 +00:00
Nick Hibma
9258cec045 Add the Sony MSC Memory Stick Adaptor (in the Sony PCS laptops) 2000-10-20 00:29:21 +00:00
Nick Hibma
ebcc7b37d5 Undo previous commit. <machine/clock.h> is needed for the prototype
for DELAY().
2000-10-16 18:50:00 +00:00
Nick Hibma
8b677600f9 Sync with NetBSD:
Add more Usages.
2000-10-16 17:45:27 +00:00
Nick Hibma
b78cc80b0d Sync with NetBSD:
Add seatbelts.
Be more lenient towards restarting the ports: If a port manages to connect
successfully reset the restartcount.
2000-10-16 17:40:59 +00:00
Poul-Henning Kamp
db7e3af111 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
Jun Kuriyama
0a13e042b1 Add missing comma at the end of line. 2000-10-11 01:12:55 +00:00
Bill Paul
00a9155349 Add support for the Kingston KNU101TX 10/100 USB ethernet adapter. We're
up to 11 of these now.
2000-10-10 23:45:17 +00:00
Bill Paul
5a68c7769a regenetate 2000-10-10 23:24:45 +00:00
Bill Paul
5ccd443674 Add vendor ID for Kingston Technology and add device ID for
KNU101TX USB ethernet adapter. (Yes, another one.)
2000-10-10 23:23:54 +00:00
Nick Hibma
8e6f860ac9 Remove unneccessary includes. (phk) 2000-10-10 12:41:46 +00:00
Nick Hibma
b37ba10824 Remove unneeded includes (phk) 2000-10-10 10:56:53 +00:00