Commit Graph

485 Commits

Author SHA1 Message Date
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