Commit Graph

477 Commits

Author SHA1 Message Date
jake
270d128d6e 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
wollman
b9d4371c33 select() DKI is now in <sys/selinfo.h>. 2001-01-09 04:33:49 +00:00
julian
d3e08032f6 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
n_hibma
9cb5901901 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
n_hibma
8ebf6945f7 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
n_hibma
d67676dba3 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
n_hibma
86873d8d44 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
6de76ea239 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
n_hibma
53f29e6e75 Bugfix: device_resume should be connected to bus_generic_resume not
*_suspend.

Submitted by:	kazu
2001-01-05 10:25:47 +00:00
n_hibma
6b0c745f21 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
n_hibma
ead87009c8 UMASS_DEBUG implemented panic(9).
PR:		24044
Submitted by:	Mike Bristow <mike@urgle.com>
2001-01-04 11:27:41 +00:00
n_hibma
4a7e9dbfae Regen.
(Sorry for forgetting that).
2001-01-04 11:23:21 +00:00
sheldonh
24e1ec363f Revert rev 1.8, which broke the installkernel target. 2001-01-04 11:12:15 +00:00
n_hibma
e29ae2bf71 Add the Id of the Epson 1640 scanner.
Submitted by:	Chris Shenton <chris@shenton.org>
2001-01-03 11:46:09 +00:00
n_hibma
1860f0b646 Add a few Ids. From NetBSD. 2001-01-03 11:45:03 +00:00
n_hibma
73e1a1d854 Initialise rcmdlen.
Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
2000-12-20 09:37:35 +00:00
julian
1ab8a4da8a 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
msmith
89b0d45262 Remove a couple of leftover unused variables. 2000-12-13 01:06:54 +00:00
julian
108f022189 remove unused variable 2000-12-12 23:50:51 +00:00
julian
6fc6411b80 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
n_hibma
f85de265c7 make sure we tear down the devnodes for the endpoints 1 and above
when switching configuration.
2000-12-12 10:19:19 +00:00
n_hibma
349f6741fd Remove a warning.
Reported by:	phk
2000-12-08 10:44:15 +00:00
roger
adc0034302 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
bf9d4b3605 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
nsayer
cc8bbe1d9b 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
jlemon
af6d4768d5 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
wpaul
67bf5e7413 Add a forgotten mutex_exit()/KUE_UNLOCK() to kue_init(). 2000-11-23 05:58:48 +00:00
n_hibma
ba91687477 Set OPEN Flag on open.
Make set_config(1) print warning message if it fails.
2000-11-15 10:36:08 +00:00
n_hibma
da94bd1139 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
n_hibma
001f4da3b5 Regen. 2000-11-03 15:19:42 +00:00
n_hibma
d9ae94b8ad Sone -> Sony
Submitted by:	Hiroyuki Aizu <aizu@jaist.ac.jp>
2000-11-03 15:19:00 +00:00
n_hibma
83d4f95c57 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
wpaul
f4546b7184 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
n_hibma
6e33c561d6 Make the Ricochet modems work through the USB interface.
Tested by:	jim
Obtained from:	NetBSD
2000-11-01 17:35:57 +00:00
n_hibma
23fec1bc46 Cut&paste bug: Set USBD_SHORT_XFER_OK unconditionally 2000-11-01 00:28:40 +00:00
n_hibma
a6b53c2ee9 remove an unused function (and a warning) 2000-10-30 10:58:02 +00:00
phk
00ff95c136 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
phk
10f128d440 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
phk
05fcfd3993 Remove unneeded #include <sys/proc.h> lines. 2000-10-29 13:57:19 +00:00
n_hibma
3f71e941c5 The USB scanner driver. To be used together with SANE. 2000-10-25 10:34:38 +00:00
n_hibma
56bb47de31 Regen. 2000-10-25 10:14:44 +00:00
n_hibma
ffe3d7c5e5 Sync with NetBSD 2000-10-25 10:13:47 +00:00
wpaul
aba642d961 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
n_hibma
a1227d6f63 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
n_hibma
ccf0db5457 Regen. 2000-10-20 00:30:01 +00:00
n_hibma
cf91979a1c Add the Sony MSC Memory Stick Adaptor (in the Sony PCS laptops) 2000-10-20 00:29:21 +00:00
n_hibma
7d82bdeac9 Undo previous commit. <machine/clock.h> is needed for the prototype
for DELAY().
2000-10-16 18:50:00 +00:00
n_hibma
8309efdb87 Sync with NetBSD:
Add more Usages.
2000-10-16 17:45:27 +00:00
n_hibma
783193abcb 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
phk
7a0868a185 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00