Commit Graph

7531 Commits

Author SHA1 Message Date
Poul-Henning Kamp
fcf867e9f7 Mis-edit in last commit. 2002-05-26 09:57:59 +00:00
Poul-Henning Kamp
fde2a2e414 Be a bit smarter about rewriting data so we don't loose too much performance.
Sponsored by: DARPA & NAI Labs.
2002-05-26 09:38:51 +00:00
Poul-Henning Kamp
f43b2bac72 Use an umazone per unit for allocating the sectors for malloc backing.
Clean up things properly when we unconfigure malloc backed units.

Sponsored by:	DARPA & NAI Labs.
2002-05-26 06:48:55 +00:00
Poul-Henning Kamp
c6517568df Give the "malloc" backing of md(4) an adaptive multilevel index tree to
remove the need for a contiguous array with pointers to all the sectors.

Try to make failure to malloc(9) memory a non-hang situation.

Eventually this will allow us to test the 64bit cleanness of the disk
I/O patch, but more work is outstanding here and elsewhere.

Sponsored by:	DARPA & NAI Labs.
2002-05-25 20:44:20 +00:00
Bruce Evans
e788f79698 Fixed printf format errors which apparently crept in while -Wformat was
disabled for gcc-3.
2002-05-25 11:18:03 +00:00
Bruce Evans
ae4c33defa "Fixed" printf format errors (64-bit daddr_t casualties; should use %jx
instead of %llx when %j is available).

Changed nearby output formats from %x to %#x so that it is obvious that the
numbers are in hex (vinum mostly uses 0x%x elsewhere).

Didn't fix nearby format printf errors (long lines).
2002-05-25 11:12:30 +00:00
Bruce Evans
ff8cc2eb35 Fixed printf format errors. Most of them are 64-bit daddr_t casualties.
Printing daddr_t's using %d format was always an error, but gcc's
warning about it was ignored for supported 64-bit arches and not printed
for supported 32-bit arches.  Hundreds if not thousands thousands of
previously "fixed" daddr_t printings are now broken on 32-bit machines
by casting daddr_t's to longs.  daddr_t's should be printed using %jd
format, but this fix uses %lld since %j is not implemented in the
kernel yet.

Fixed some nearby format printf errors (style bugs).
2002-05-25 11:05:07 +00:00
Thomas Moestl
9bb711b95d Fully reset a gem on some error conditions; otherwise it would hang in
about 1 of 10 cases.

Proposed and tested by:	phk
2002-05-24 12:47:41 +00:00
Peter Wemm
daefef7cae Fix warnings due to macro varargs. 2002-05-24 06:32:18 +00:00
Peter Wemm
885fbc97c1 Fix new compiler unhappiness. 2002-05-24 06:01:07 +00:00
Peter Wemm
7d05a38314 Fix deprecated use of label at end of compound statement 2002-05-24 05:58:13 +00:00
Peter Wemm
70148712be Constify a debug function arg that we pass __func__ to in order to pacify
gcc-3.1's 'const char *__func__;'
2002-05-24 05:57:47 +00:00
Peter Wemm
9c580bea80 Fix new gcc-3.1 warnings. I think this gets GENERIC compiling cleanly
again.
2002-05-24 05:21:36 +00:00
Søren Schmidt
949e9d36aa Dont panic if only one disk on a channel can do tagged queueing.
MFC:	asap
2002-05-23 08:17:16 +00:00
Josef Karthauser
4de1678702 Fix a panic by allocating the iface structure locally in the attach
function instead of in usb_probe_and_attach.
2002-05-23 00:36:14 +00:00
Josef Karthauser
0f19b0d03a Reflect some changes in the NetBSD code path, and sligh adjustments to ours.
(Non-functional changes).
2002-05-23 00:26:06 +00:00
Josef Karthauser
a257364105 Sync with NetBSD. (Non functional changes). 2002-05-22 23:01:13 +00:00
Josef Karthauser
1acba7451d Fix a bug: Use USBD_DEFAULT_INTERVAL instead of USBD_DEFAULT_TIMEOUT
in a call to usbd_open_pipe_ival.
2002-05-22 22:58:38 +00:00
Warner Losh
3029e334b7 Use correct inactivity timeout of 2 minutes rather than 24 seconds due to
bogons introduced at some point.

Submitted by: thomas skibo
2002-05-20 19:33:49 +00:00
Maxim Sobolev
a88c5d84d1 Regen after changing Device ID string for DaisyTech devices.
MFC after:	1 week
2002-05-20 12:02:54 +00:00
Maxim Sobolev
b42df94a61 Change Device ID string for DaisyTech devices.
Submitted by:	Olexander Kunytsa <kunia@istc.kiev.ua>
MFC after:	1 week
2002-05-20 12:01:58 +00:00
Robert Watson
6be2f8829a Off-by-128 error in the cuam* device node numbers. 2002-05-20 05:12:56 +00:00
Robert Watson
12f2edc7d5 Bump the rc driver a little bit closer to the 21st century: use
make_dev() to create device nodes for each of the serial port channels
(ttym%d and cuam%d respectively, as borrowed from MAKEDEV).  This allows
the rc driver to work in 5.0.  I've tested it with only one card, but
will try sticking in a second card tomorrow and see what happens.
2002-05-20 05:04:41 +00:00
Mitsuru IWASAKI
494ae5601d Terminate ACPI subsystem on reboot.
Some machines stuck on reboot if ACPI sleep/wakeup was executed.
2002-05-19 15:12:40 +00:00
Peter Wemm
9cfd8eb371 Try and solve some cases of labels at end of compound statements that gcc
now objects to (as it should, it is not legal C).
2002-05-19 06:31:56 +00:00
Peter Wemm
b4a052380f Brutally deal with __func__ being 'const char *' on gcc-3.1. 2002-05-19 06:16:47 +00:00
Eric Melville
096a727e41 Separate "seperate" from kernel source. 2002-05-16 22:43:20 +00:00
Tom Rhodes
d394511de3 More s/file system/filesystem/g 2002-05-16 21:28:32 +00:00
Warner Losh
5b6a60ea0a Use splnet() when we need to block timeouts rather than splimp() since
the former blocks software interrupts, while the latter blocks
hardware interrupts.

Avoid one place where I'm at splnet across a call to copyout.  Leave
one in place to give bde something to complain about :-).  Actaully,
I'll fix it in a subsequent commit.

Reviewed by: bde
spl conical hat to: imp
2002-05-16 06:32:37 +00:00
Mike Silbersack
000c679b3c Enhance the use of the watchdog timer in this driver so that it will
allow recovery from transmission lockups which occur in the middle
of the descriptor list, rather than just at the beginning.

For some unknown reason, Rhine II chips have a tendency to stop
transmitting while under heavy load, possibly due to collisions.
Whether this behavior is due to a hardware bug or a driver glitch
is unknown as of now.

In either case, this change allows the driver to gracefully recover
from such situations.

Special thanks go to The Anarcat <anarcat@anarcat.dyndns.org>, who
bugged me into looking at this and to
Dominic Marks <dominic_marks@btinternet.com>, who performed a great
deal of testing to help characterize this problem.

MFC after:	3 days
2002-05-15 17:05:28 +00:00
Brian Somers
2f371b0268 Remove an extraneous )
Not approved by: maintainer

I'm guessing that this is trivial enough to sidestep approval.
2002-05-15 12:25:11 +00:00
David E. O'Brien
d93389d676 `unexpand -a' should be run _before_ sed 's/^#define /#define^I/g'. 2002-05-14 21:59:10 +00:00
David E. O'Brien
5d340b7ec1 Tighten up the defined()'s. 2002-05-14 21:54:56 +00:00
Joerg Wunsch
a2642c4d67 After some comments from bde, rewrite the loops to avoid turning the
previously used "micro-optimization" (count-down loop) into a
pessimization.  Now the loops are written in the more natural count-up
form.

Also, while being there, i made the logic in out_fdc() similar to the
logic in in_fdc().  The old implementation was a bit bogus anyway
since it first tested the DIO bit and only afterwards the RQM bit.
However, according to the description of the i82077, the DIO bit is
only guaranteed to be valid once the RQM bit is set.  Thus, the old
implementatoin would have had the chance to misbehave on a controller
that is implemented in accordance with the i82077 description (but is
not bug-for-bug compatible).

MFC after:	3 days
2002-05-14 21:28:45 +00:00
David E. O'Brien
d600c96632 Tweak the include dirs w/o incurring extra warnings 2002-05-14 01:18:51 +00:00
David E. O'Brien
014585d125 unexpand -a everything 2002-05-14 01:09:03 +00:00
David E. O'Brien
ddd36f9fac First pass of style(9) for #define's. 2002-05-14 00:53:08 +00:00
Warner Losh
e9f49c9c96 BDE and I have had a chance to hash this out:
o Use splnet() instead of splclock().
o Use splnet() instead of splimp().

Reviewed by: bde
2002-05-13 21:17:33 +00:00
Bruce Evans
5d81c9882f Don't include <stddef.h> "For offsetof". This is not even wrong in
-current, since offsetof() is defined a header under /sys so that
system sources don't need to have this wrong include.

This bug was only detected because my version of <stddef.h> has some
spelling fixes (s/field/member/g) and gcc is now sensitive to the spelling
of arg names in macros as required by standards (ISO C90 6.8.3...).
2002-05-13 14:11:33 +00:00
Joerg Wunsch
8a0ba81859 style(9) changes before further editing that region:
. add unnecessary parenthesis around return values
. put body of an "if" statement onto a line of its own
2002-05-13 10:28:20 +00:00
Poul-Henning Kamp
77068a7fe2 Retire the bogus uses of the disklabel field d_sbsize and begin to
initialize it to zero so we don't have to have everbody and their
aunt including FFS specific header files.

Sponsored by: DARPA & NAI Labs.
2002-05-12 20:49:41 +00:00
Joerg Wunsch
5613959d84 Hide the fd autoselection messages behind the bootverbose case so they
stop bothering people on their consoles.
2002-05-12 17:17:46 +00:00
Joerg Wunsch
cb38bb6c36 Increase the PIO timeout to approximately the value it used to have
before rev 1.229 (~ 100 ms).  According to bde, some (old) broken
hardware could require it.  In order to make timing more accurate than
what could be achieved with a loop around DELAY(1), increase loop
timing after the initial ~ 1 ms.

Also, move the declaration of FDSTS_TIMEOUT out from fdreg.h into fd.c
where it actually belongs to.

MFC after:	2 days
2002-05-12 15:24:21 +00:00
Scott Long
c52bf372f5 Update the PCI table as per Dell's fickleness.
MFC after:	3 days
2002-05-12 04:30:28 +00:00
Dima Dorfman
b90faaf350 sysctl -w -> sysctl 2002-05-11 06:06:11 +00:00
Joerg Wunsch
d0900d6bc0 Change the PIO loops from a hard counter into a loop that calls DELAY()
in each cycle, with a tunable max cycle count defined in fdreg.h.

This is said to fix the problem on some Compaq hardware (and perhaps
on other machines using the Natsemi PC87317 chip) where the fdc(4)
driver failed to operate at all.

PR:		kern/21397
Submitted by:	Jung-uk Kim <jkim@niksun.com>
MFC after:	3 days
2002-05-10 17:56:39 +00:00
David E. O'Brien
39bd77be52 Use only bits w/in /sys if at all possible. 2002-05-10 01:53:16 +00:00
Josef Karthauser
f737c3ae0a MFNetBSD: Bring in the most recent NetBSD and OpenBSD parts. 2002-05-09 21:55:47 +00:00
John Baldwin
3c600cfb6c Fix acpi_avoid() to call freeenv() on the original char * returned from
getenv().

Reported by:	joe
Tested by:	joe
2002-05-09 21:13:37 +00:00
Peter Wemm
7cca309311 Use usb_callout_init() instead of directly calling callout_init() with
NetBSD's expected arguments.  This unbreaks the kernel compile.

Pointy hat to: joe
2002-05-09 21:08:34 +00:00