Commit Graph

7517 Commits

Author SHA1 Message Date
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
David E. O'Brien
6feff71aaf Directives may not be used inside a macro argument, so don't. 2002-05-09 18:01:19 +00:00
Josef Karthauser
4722fea82e MFNetBSD:
revision 1.43
    date: 2001/04/12 01:39:04;  author: thorpej;  state: Exp;  lines: +2 -2
    Switch to USB_USE_SOFTINTR.  The callout hack does indeed work
    fine for systems without generic soft interrupts, even if it is
    a little sub-optimal.  Consider it a penalty for ports not
    implementing a kernel API.

    Addresses kern/11957.  The PR has been open for 4 months, and
    I have work blocked on the continued existence of splimp() in
    the networking code.

The NetBSD patch only switches it on for NetBSD, but I've also
switched it on for FreeBSD in this commit.
2002-05-09 12:49:25 +00:00
John Baldwin
492da65ed7 Detect and attach to the ICH3 SMBus controller.
PR:		i386/36972
Submitted by:	Colin Perkins <csp@isi.edu>
Requested by:	Larry Rosenman <ler@lerctr.org>
MFC After:	7 days
2002-05-08 00:51:54 +00:00
Warner Losh
d87fc9ac63 Try to use spls more correctly 2002-05-07 18:09:19 +00:00
Bruce Evans
833863ff77 Include <sys/lockmgr.h> for definitions of deprecated locking interfaces --
don't depend on namespace pollution in other headers.
2002-05-06 23:34:13 +00:00
Alfred Perlstein
e649887b1e Make funsetown() take a 'struct sigio **' so that the locking can
be done internally.

Ensure that no one can fsetown() to a dying process/pgrp.  We need
to check the process for P_WEXIT to see if it's exiting.  Process
groups are already safe because there is no such thing as a pgrp
zombie, therefore the proctree lock completely protects the pgrp
from having sigio structures associated with it after it runs
funsetownlst.

Add sigio lock to witness list under proctree and allproc, but over
proc and pgrp.

Seigo Tanimura helped with this.
2002-05-06 19:31:28 +00:00
Josef Karthauser
567f4af63d MFNetBSD: ugen.c (1.57), ulpt.c (1.48), usb.c (1.67), usbdi.c (1.96),
usbdi.h (1.60)
	  (and local changes compatibility changes to ufm.c and urio.c)

    date: 2002/02/11 15:11:49;  author: augustss;
    Give usbd_do_request_flags() an extra argument for the timeout.
2002-05-06 18:23:36 +00:00
Mitsuru IWASAKI
e8388e1466 Add suspend/resume code mostly merged from fxp/rl driver.
This is temporary hack, better and generalized solution probably
should be implemented at lower layer(MII or PCI?).
Tested by:	shoko.araki@soliton.co.jp
MFC after:	1 week
2002-05-06 10:55:42 +00:00
David Malone
a37231dc3f Add another Askey ISA modem ID.
PR:		35813
Submitted by:	Chris Knight <chris@aims.com.au>
2002-05-06 09:02:55 +00:00
Orion Hodson
7dace039d8 No longer attempt to power off the ACLINK during suspend - luigi
reports this causes his ich machine to hang.
2002-05-05 15:37:09 +00:00
Maxime Henrion
614be65181 When a program launched on the local console exits, the shell will
call read() to get the next command, and scread() disables the
screensaver.  We don't want this behaviour in the sc_saver_keybonly
case.

Submitted by:	Olivier Houchard <doginou@ci0.org>
2002-05-04 15:42:38 +00:00
Poul-Henning Kamp
d9fc2b816e Do not call nge_tick() if we get an PHY interrupt, nge_tick() calls
mii_tick() which should only be called once per second.

Our current MII/PHY state-engine is not able to deal with PHY
interrupts as far as I can tell, and most net drivers don't seem
to use the link/status change call-back mechanism.  It seems that
MII/PHY was orphaned before it grew up.
2002-05-04 11:15:33 +00:00
Poul-Henning Kamp
37c0fba7c4 Increase gigE negotiation timeout to 17 seconds.
10 seconds is not enough to negotiate a gigE link with a cisco switch which
holds carrier off for several seconds between tries.
2002-05-04 11:08:49 +00:00
Poul-Henning Kamp
fd94424c78 Clean up mii/phy drivers: Remove the MIIF_DOINGAUTO which doesn't really
do anything at the end of the day except bloat the drivers which has
copy&pasted it.
2002-05-04 11:00:30 +00:00