Commit graph

45642 commits

Author SHA1 Message Date
Pawel Jakub Dawidek 950124e354 Move "is consumer attached?" check before G_VALID_PROVIDER() check,
because if consumer is not attached, its provider never will be valid,
so we never reach this check.

Approved by:	phk
2004-03-18 07:17:10 +00:00
Bruce Evans 8a21510e78 Removed a vestige of the stl driver. 2004-03-18 02:54:42 +00:00
David E. O'Brien 5a3b7e5e5c Document machdep.hlt_cpus.
Submitted by:	Craig Rodrigues <rodrigc@crodrigues.org>
2004-03-18 02:53:38 +00:00
Nate Lawson 1040ccf4a9 Back out code for auto-gdb detection that accidentally leaked into the
bus_alloc_resource_any commit.

Submitted by:	bde
Pointy-hat:	njl
2004-03-18 02:36:41 +00:00
Nate Lawson d19b6e67ac Support the DPF (start dependent function) resource type in parsing _PRS.
This should fix this error people get attaching cardbus controllers:

    pcib0: _PRS resource entry has unsupported type 2
2004-03-18 02:33:58 +00:00
Maxim Sobolev 273ac7b968 Regen after 1.169 of usbdevs. 2004-03-18 01:06:28 +00:00
Maxim Sobolev 7dc0ba8937 Add support for Crystalfontz CFA-632, CFA-633 and CFA-634, all of them
are based on the same USB->COM bridge, but have different product IDs.

PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:  http://www.tnpi.biz/computing/freebsd/crystalfontz.shtml
MFC after:      3 days
2004-03-18 01:02:46 +00:00
David E. O'Brien 40c11c90c9 Cleanup hints, given that no hammer machine have (nor ever will have)
ISA slots.

Submitted by:	Peter
2004-03-18 00:18:45 +00:00
Alan Cox 9508f75c23 Revise socow_iodone() in light of recent sf_buf changes. Specifically,
use sf_buf_free() instead of sf_buf_mext() to consolidate all actions
that require the page queues lock in one critical section.  While I'm
here remove unnecessary splvm() and splx() calls.
2004-03-17 23:25:04 +00:00
Brian Feldman 7e7a65a6fa Eliminate bogus usage of WI_RSSI_TO_DBM(). Not only does it bogusly
clip/destroy the dB value contained in the wi(4)'s receive frames,
it doesn't match with the flag set in the radiotap header
(unperturbed dB versus dBm).
2004-03-17 21:54:52 +00:00
Nate Lawson e5ada020f1 Fix border error to allow systems that specify 100 for latency also use
C2 and 1000 to use C3.

Submitted by:	Bruno Ducrot <ducrot@poupinou.org>
Tested by:	Scott Lambert <lambert@lambertfam.org>
2004-03-17 21:49:47 +00:00
John-Mark Gurney 4de27366d1 sync comment with i386's isa.c.. This removes a comment that is YEARS
old...
2004-03-17 21:45:55 +00:00
Max Laier cc7e902276 Style(9) round for the pf kernel parts. Mostly #if defined() -> #ifdef
Also set HOOK_HACK to true (remove the related #ifdef's) as we have the
hooks in the kernel this was missed during the merge from the port.

Noticed by:	Amir S.	(for the HOOK_HACK part)
Approved by:	bms(mentor)
2004-03-17 21:11:02 +00:00
Pawel Jakub Dawidek 512af1646c Add a comment with an explanation why we don't report EPIPE errors on
nfs sockets.

Requested by:	ru
2004-03-17 21:10:20 +00:00
John Baldwin b7e23e826c - Replace wait1() with a kern_wait() function that accepts the pid,
options, status pointer and rusage pointer as arguments.  It is up to
  the caller to copyout the status and rusage to userland if needed.  This
  lets us axe the 'compat' argument and hide all that functionality in
  owait(), by the way.  This also cleans up some locking in kern_wait()
  since it no longer has to drop locks around copyout() since all the
  copyout()'s are deferred.
- Convert owait(), wait4(), and the various ABI compat wait() syscalls to
  use kern_wait() rather than wait1() or wait4().  This removes a bit
  more stackgap usage.

Tested on:	i386
Compiled on:	i386, alpha, amd64
2004-03-17 20:00:00 +00:00
John-Mark Gurney cb8c2e1cd2 remove stale comment since these limits have been increased YEARS ago... 2004-03-17 19:04:58 +00:00
Pawel Jakub Dawidek 41eda4e2b1 Don't report EPIPE errors on nfs sockets. These can be due to idle tcp
mounts which will be closed by netapp, solaris, etc. if left idle too long.

Obtained from:	NetBSD
2004-03-17 18:10:38 +00:00
Nate Lawson 5f96beb9e0 Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by:	Mark Santcroos <marks@ripe.net>
Reviewed by:	imp, dfr, bde
2004-03-17 17:50:55 +00:00
Nate Lawson bdffb39f34 Add bus_alloc_resource_any(9), which does bus_alloc_resource() with the
appropriate default values.  Document it in the manpage.

Submitted by:	Mark Santcroos <marks@ripe.net>
Reviewed by:	imp, dfr, bde
Abstains:	bde
2004-03-17 17:40:34 +00:00
Pawel Jakub Dawidek 9cdb62160b Fix information leakage.
Without this fix it is possible to cheat policies like:
- sysctl security.bsd.see_other_[gu]ids=0,
- mac_seeotheruids(4),
- jail(2)
and get full processes list with their arguments.

This problem exists from revision 1.62 of kern_proc.c when it was
introduced.

Reviewed by:	nectar, rwatson.
2004-03-17 13:19:43 +00:00
Robert Watson 34f74e1ed8 Make ddp_ports static, as it's not used outside of ddp_usrreq.c.
Inspired by:	Day spent hiking to hot springs in Taiwan
Powered by:	Asia BSDCon 2004
2004-03-17 12:54:21 +00:00
Colin Percival 018e32c194 Adjust the number of processes waiting on a semaphore properly if we're
woken up in the middle of sleeping.

PR:		misc/64347
Reviewed by:	tjr
MFC after:	7 days
2004-03-17 09:37:13 +00:00
David E. O'Brien f7d39bdcb6 Adjust $FreeBSD$'s. 2004-03-17 03:43:53 +00:00
Robert Watson 25f740b790 Remove tun_proc; replace with tun_pid. tun_proc pointer may be stale
as the process that opens tun_softc can exit before the file
descriptor is closed.

Taiwan experience provided by:	keichii
Crashing breakers provided by:	Chia-liang Kao <clkao@clkao.org>
2004-03-17 01:12:09 +00:00
Robert Watson 7c924a5287 Add tap_mtx to tap_softc in order to protect per-softc variables
(tap_pid, tap_flags).  if_tap should now be entirely MPSAFE.

Committed from:			Bamboo house by ocean in Taiwan
Tropical paradise provided by:	Chia-liang Kao <clkao@clkao.org>
2004-03-17 01:09:59 +00:00
Max Khon 456f076f01 Implement "arlconfig arlX quality".
Man pages fixes.

Submitted by:	Stanislav A. Svirid <count@riss-telecom.ru>
2004-03-16 22:29:26 +00:00
Alexander Kabaev c355fd5a84 Avoid doing bawrite to initialize inode block while holding cylinder
group block locked. If filesystem has any active snapshots, bawrite
can come back trying to allocate new snapshot data block from the same
cylinder group and cause panic due to recursive lock attempt.

PR:		64206
Reviewed by:	mckusick
Tested by:	pjd
2004-03-16 22:06:32 +00:00
Dag-Erling Smørgrav f0f93429cf Run through indent(1) so I can read the code without getting a headache.
The result isn't quite knf, but it's knfer than the original, and far
more consistent.
2004-03-16 21:30:41 +00:00
Maxime Henrion 45c7aff75a Add explicit dependency on "ether", since we use ether_ifattach(). 2004-03-16 19:25:55 +00:00
Alan Cox 90ecfebd82 Refactor the existing machine-dependent sf_buf_free() into a machine-
dependent function by the same name and a machine-independent function,
sf_buf_mext().  Aside from the virtue of making more of the code machine-
independent, this change also makes the interface more logical.  Before,
sf_buf_free() did more than simply undo an sf_buf_alloc(); it also
unwired and if necessary freed the page.  That is now the purpose of
sf_buf_mext().  Thus, sf_buf_alloc() and sf_buf_free() can now be used
as a general-purpose emphemeral map cache.
2004-03-16 19:04:28 +00:00
John Baldwin 27de234992 Remove a bogus assertion and readd it in a more correct location. A thread
might be enqueued on a sleep queue but not be asleep when the timeout fires
if it is blocked on a lock trying to check for pending signals before going
to sleep.  In the case of fixing up the TDF_TIMEOUT race, however, the
thread must be marked asleep.

Reported by:	kan (the bogus one)
2004-03-16 18:56:22 +00:00
Søren Schmidt b47183d51a Update the SiS support to distinguish older southbridges better. 2004-03-16 16:23:28 +00:00
Peter Grehan 721b6196d5 Add powerpc to temporary fix. The new cpu device claims all
'generic' OpenFirmware nexus nodes, since it uses bus_generic_probe.
Maybe the cpu device probe should be MD.
2004-03-16 13:34:50 +00:00
Yoshihiro Takahashi c069ddf147 Move the arl to i386 only. 2004-03-16 12:43:08 +00:00
Yoshihiro Takahashi 877cbbe8a8 Don't use the pcic polling. 2004-03-16 12:40:11 +00:00
Scott Long 36254177e0 Remove the module reference for RAIDframe 2004-03-16 12:27:34 +00:00
Scott Long 846ca5d04f Remove RAIDFrame. It hasn't worked since GEOM replaced the old disk
mini-layer.  I don't have time to bing it forward into the GEOM world, and
no one else has stepped forward to claim it.  It'll be in the Attic for safe
keeping for now.
2004-03-16 12:23:43 +00:00
David Malone 31c7e8b05b Nudge Giant as far as I can into kern_open(). Mark open() as MPSAFE.
Use kern_open() to implement creat() rather than taking the long route
through open(). Mark creat as MPSAFE.

While I'm at it, mark nosys() (syscall 0) as MPSAFE, for all the
difference it will make.
2004-03-16 10:46:42 +00:00
David Malone 1f325ae35e Get ready to mark open, creat and nosys as MPSAFE. 2004-03-16 10:41:23 +00:00
Tim J. Robbins 7b0d017245 Use vfs_nmount() to mount linprocfs filesystems in linux_mount();
linprocfs doesn't support the old mount interface.
2004-03-16 09:05:56 +00:00
Tim J. Robbins 537370d0a4 Make vfs_nmount() public. The Linux emulator needs this in order to mount
linprocfs filesystems.
2004-03-16 08:59:37 +00:00
Tim J. Robbins 2ba9b76668 Correct size argument passed to copyinstr() in linux_mount(): mntfromname
and mntonname are both MNAMELEN characters long, not MFSNAMELEN.
2004-03-16 08:37:19 +00:00
Don Lewis a961520c13 Rename the wiredlen member of struct sysctl_req to validlen and always
set it to avoid the need for a bunch of code that tests whether or
not the lock member is set to REQ_WIRED in order to determine which
length member should be used.

Fix another bug in the oldlen return value code.

Fix a potential wired memory leak if a sysctl handler uses
sysctl_wire_old_buffer() and returns an EAGAIN error to trigger
a retry.
2004-03-16 06:53:03 +00:00
Don Lewis 8ac3e8e940 Don't bother calling vslock() and vsunlock() if oldlen is zero.
If vslock() returns ENOMEM, sysctl_wire_old_buffer() should set
wiredlen to zero and return zero (success) so that the handler will
operate according to sysctl(3):
     The size of the buffer is given by the location specified by
     oldlenp before the call, and that location gives the amount
     of data copied after a successful call and after a call that
     returns with the error code ENOMEM.
The handler will return an ENOMEM error because the zero length
buffer will overflow.
2004-03-16 01:28:45 +00:00
John Baldwin e5592f4dd9 Regenerate. 2004-03-15 22:44:35 +00:00
John Baldwin 216db4ad00 - Mark ABI syscalls that call wait4() MP safe as recent changes to
the kernel wait4() made these all panic() implementations otherwise.
- The i386 linux_ptrace() syscall is MP safe.  Alpha was already marked
  MP safe.
2004-03-15 22:43:49 +00:00
Max Khon 798f0e1603 Add arl(4): driver for Aironet Arlan 655 wireless adapters.
MFC after:	2 weeks
2004-03-15 22:24:28 +00:00
Poul-Henning Kamp f6c21c0641 The PPS code needs to be much more brutal to avoid synchronism on
hardware with non-sucky clocks.
2004-03-15 21:47:34 +00:00
John Baldwin 6b55d75c44 Regen for ptrace being safe again. 2004-03-15 18:50:06 +00:00
John Baldwin 8ac61436e6 Drop the proc lock around calls to the MD functions ptrace_single_step(),
ptrace_set_pc(), and cpu_ptrace() so that those functions are free to
acquire Giant, sleep, etc.  We already do a PHOLD/PRELE around them so
that it is safe to sleep inside of these routines if necessary.  This
allows ptrace() to be marked MP safe again as it no longer triggers lock
order reversals on Alpha.

Tested by:	wilko
2004-03-15 18:48:28 +00:00