]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoAdd two small tests to set and clear two file I/O flags using ioctl on
rwatson [Tue, 13 Sep 2005 17:25:35 +0000 (17:25 +0000)]
Add two small tests to set and clear two file I/O flags using ioctl on
a fifo: FIONBIO, FIOASYNC.

18 years agoRestructure fifo_io event-related tests in order to support test cases
rwatson [Tue, 13 Sep 2005 17:15:05 +0000 (17:15 +0000)]
Restructure fifo_io event-related tests in order to support test cases
relating to O_RDWR file descriptors, which while not defined in POSIX,
are in fact used:

(1) Revise assumption that we have two file descriptors when testing I/O
    operations on a fifo.  Provide cleanup routines that handle either
    two or three file descriptors (including a kqueue descriptor).

(2) Add an openfifo_rw() routine to supplement openfifo().

(3) kqueue_setup() now configures an existing kqueue to monitor a new
    file descriptor, rather than allocating a new kqueue to monitor two
    existing file descriptors.

(4) Wrap all direct poll/select/kqueue/FIONREAD interactions in a single
    function, assert_status(), which takes a file descriptor, kqueue
    descriptor, assertion of read/writable/exception states, and
    test description, then tests the assertion.  This reduces the bulk
    of calls in many of the tests, making them shorter, more readable,
    and easier to determine correct.

(5) Add a new test_events_rdwr() function, which performs a basic create/
    write/read event test on a O_RDWR fifo file descriptor.  This is
    currently failed by our fifo code in HEAD due to a bug in FIONREAD
    handling.  Fix to be merged shortly.

18 years agoGarbage collect bpfstat. This is handled by netstat now.
csjp [Tue, 13 Sep 2005 16:04:56 +0000 (16:04 +0000)]
Garbage collect bpfstat. This is handled by netstat now.

Requested by: rwatson

18 years agoTeach fifo_io how to use ioctl(FIONREAD) to determine if a fifo is
rwatson [Tue, 13 Sep 2005 15:49:12 +0000 (15:49 +0000)]
Teach fifo_io how to use ioctl(FIONREAD) to determine if a fifo is
readable, and use that in addition to poll+select+kqueue to verify
appropriate readability.

18 years agoVarious and sundry improvements:
jhb [Tue, 13 Sep 2005 15:16:50 +0000 (15:16 +0000)]
Various and sundry improvements:
- Replace 'process' with 'thread' everywhere.
- Update several places to note that that the fact that default mutexes
  may adaptively spin isn't necessarily MD, but is just part of the
  implementation as a whole.
- Clarify the text about MTX_SPIN mutexes only being appropriate for
  INTR_FAST interrupts or other low level scheduler code to make the
  jargon more FreeBSD-ish rather than BSD/OS-ish.
- Also, note that it is possible that interrupts aren't blocked but just
  deferred when a spin lock is held (the whole blocked vs. deferred bit is
  an MD implementation detail).
- Remove statements saying that spin locks must be released in the exact
  opposite order that they were acquired.  This stopped being true several
  years ago when we first added critical sections that stored their state
  in the current thread rather than in struct mtx.
- Note that a mutex must be initialized before it is passed to any other
  mutex function, not just mtx_lock.
- Clarify that mtx_trylock() only operates on MTX_DEF mutexes.
- Simplify the text about possible preemption during a mtx_unlock().
- Use complete English sentences in place of phrases in a few places.
- Clarify that it isn't ever safe to sleep with a mutex held.  The kernel
  tends to panic when you do that.

Requested by: scottl (7)
MFC after: 3 days

18 years agoRemove unused functions.
nyan [Tue, 13 Sep 2005 11:34:07 +0000 (11:34 +0000)]
Remove unused functions.

18 years agoRemove EPSON_NRDISK support.
nyan [Tue, 13 Sep 2005 11:33:25 +0000 (11:33 +0000)]
Remove EPSON_NRDISK support.

18 years agoAs a result of kqueue locking work, socket buffer locks will always
rwatson [Tue, 13 Sep 2005 10:39:24 +0000 (10:39 +0000)]
As a result of kqueue locking work, socket buffer locks will always
be held when entering a kqueue filter for fifos via a socket buffer
event: as such, assert the lock unconditionally rather than acquiring
it conditionall.

MFC after: 3 days

18 years agoRemove a debugging printf.
rwatson [Tue, 13 Sep 2005 10:33:32 +0000 (10:33 +0000)]
Remove a debugging printf.

18 years agoUnlock driver lock before calling resource_int_value(9).
yongari [Tue, 13 Sep 2005 10:12:28 +0000 (10:12 +0000)]
Unlock driver lock before calling resource_int_value(9).
This should fix LOR(in fact it's not LOR) in device attach.

18 years agoAnnotate two issues:
rwatson [Tue, 13 Sep 2005 09:23:22 +0000 (09:23 +0000)]
Annotate two issues:

1) fifo_kqfilter() is not actually ever used, it likely should be GC'd.

2) fifo_kqfilter_f() doesn't implement EVFILT_VNODE, so detecting events
   on the underlying vnode for a fifo no longer works (it did in 4.x).
   Likely, fifo_kqfilter_f() should forward the request to the VFS using
   fp->f_vnode, which would work once fifo_kqfilter() was detached from
   the vnode operation vector (removing the fifo override).

Discussed with: phk

18 years agoMFi386: revision 1.11.
nyan [Tue, 13 Sep 2005 08:29:03 +0000 (08:29 +0000)]
MFi386: revision 1.11.

18 years agoMFi386: revisions 1.10 and 1.11.
nyan [Tue, 13 Sep 2005 08:27:38 +0000 (08:27 +0000)]
MFi386: revisions 1.10 and 1.11.
  - Add '-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3' to CFLAGS.

18 years agoFix a bug that caused generated gmon.out profiles to be out of
jkoshy [Tue, 13 Sep 2005 02:23:25 +0000 (02:23 +0000)]
Fix a bug that caused generated gmon.out profiles to be out of
whack.  Use saturating arithmetic when incrementing a bucket.
Improve a few comments.

MFC after: 3 days

18 years agoAdd a missing ldexpf() alias for amd64.
das [Mon, 12 Sep 2005 20:54:00 +0000 (20:54 +0000)]
Add a missing ldexpf() alias for amd64.

Noticed by: bz@, tjr@

18 years agoIntroduce no-op nosup fifo kqueue filter and detach routine, which are
rwatson [Mon, 12 Sep 2005 19:59:12 +0000 (19:59 +0000)]
Introduce no-op nosup fifo kqueue filter and detach routine, which are
used when a read filter is requested on a write-only fifo descriptor, or
a write filter is requested on a read-only fifo descriptor.  This
permits the filters to be registered, but never raises the event, which
causes kqueue behavior for fifos to more closely match similar semantics
for poll and select, which permit testing for the condition even though
the condition will never be raised, and is consistent with POSIX's notion
that a fifo has identical semantics to a one-way IPC channel created
using pipe() on most operating systems.

The fifo regression test suite can now run to completion on HEAD without
errors.

MFC after: 3 days

18 years agoInclude a couple of headers to ensure consistency between the prototype and
stefanf [Mon, 12 Sep 2005 19:52:42 +0000 (19:52 +0000)]
Include a couple of headers to ensure consistency between the prototype and
the function definition.

18 years agoComment test_lseek().
rwatson [Mon, 12 Sep 2005 19:31:16 +0000 (19:31 +0000)]
Comment test_lseek().

Add test_kqueue(), which registers and unregisters various kqueue filter
types on a fifo in order to make sure that EVFILT_READ, EVFILT_WRITE can
be registered, and that EVFILT_NETDEV can't be registered.  For now, we
don't test that EVFILT_VNODE can be registered on fifos, as that has been
broken at some point.

18 years agoIn netkqfilter(), return EINVAL instead of 1 (EPERM) when a filter type
rwatson [Mon, 12 Sep 2005 19:26:03 +0000 (19:26 +0000)]
In netkqfilter(), return EINVAL instead of 1 (EPERM) when a filter type
is requested on a network interface file descriptor that is non-applicable.

MFC after: 3 days

18 years agoIn vfs_kqfilter(), return EINVAL instead of 1 (EPERM) when an unsupported
rwatson [Mon, 12 Sep 2005 19:22:37 +0000 (19:22 +0000)]
In vfs_kqfilter(), return EINVAL instead of 1 (EPERM) when an unsupported
kqueue filter type is requested on a vnode.

MFC after: 3 days

18 years ago- Fix the locking in dsp.c to prevent a LOR (AFAIK not on the LOR page).
netchild [Mon, 12 Sep 2005 18:33:33 +0000 (18:33 +0000)]
- Fix the locking in dsp.c to prevent a LOR (AFAIK not on the LOR page).

- Remove an assertion in sound.c, it's not needed (and causes a panic now).
  From the conversation via mail between glebius and Ariff:
  ---snip---
  > Well, but which mutex protects now? Do we own anything else
  > in pcm_chnalloc()? I see some queue(4) macros in pcm_chnalloc(),
  > they should be protected, shouldn't they?
  Queue insertion/removal occur during
     1) driver loading (which is pretty much single thread /
        sequential) or unloading (mutex protected, bail out if there is
        any channel with refcount > 0 or busy).
     2) vchan_create()/destroy(), (which is *sigh* quite complicated), but
        somehow protected by 'master'/parent channel mutex. Other
        thread cannot add/remove vchan (or even continue traversing
        that queue) unless it can acquire parent channel mutex.
---snip---

Fix the locking in dsp.c to prevent a LOR (AFAIK not on the LOR page).

Submitted by: Ariff Abdullah <skywizard@MyBSD.org.my>
Tested with: INVARIANTS[1] and DIAGNOSTICS[2]
Tested by: netchild [1,2], David Reid <david@jetnet.co.uk> [1]

18 years agoWhen a request is made to register a filter on a fifo that doesn't
rwatson [Mon, 12 Sep 2005 18:07:49 +0000 (18:07 +0000)]
When a request is made to register a filter on a fifo that doesn't
apply to the fifo (i.e., not EVFILT_READ or EVFILT_WRITE), reject
it as EINVAL, not by returning 1 (EPERM).

MFC after: 3 days

18 years agoFurther updates to fifo_io regression test:
rwatson [Mon, 12 Sep 2005 17:05:48 +0000 (17:05 +0000)]
Further updates to fifo_io regression test:

- Teach fifo_io about kqueue monitoring of fifo file descriptor status,
  and add test cases for kqueue to match existing case for poll and
  select.  Add a new cleanup routine, cleanfifokq(), for use in tests that
  use kqueues.  kqueue_setup() sets up kqueue sessions, and kqueue_status()
  returns file descriptor status.

- Correct a bug in select handling relating to the nfds argument, which
  was incorrect so resulted in select occuring on the wrong file descriptor,
  and possible false positive/negative results.

- Clarify error reporting in one byte write+read tests to distinguish
  errors in the after case from the before case.

18 years ago- Add prototypes for __cmpdi2() and __ucmpdi2().
stefanf [Mon, 12 Sep 2005 16:16:12 +0000 (16:16 +0000)]
- Add prototypes for __cmpdi2() and __ucmpdi2().
- Remove GCC 1 stuff.

18 years agoPut a getosreldate() prototype into <osreldate.h>, getosreldate(3) implies
stefanf [Mon, 12 Sep 2005 16:11:48 +0000 (16:11 +0000)]
Put a getosreldate() prototype into <osreldate.h>, getosreldate(3) implies
there is one.

18 years agoInclude <osreldate.h> at the top of the file.
stefanf [Mon, 12 Sep 2005 16:06:15 +0000 (16:06 +0000)]
Include <osreldate.h> at the top of the file.

18 years agoUse prototypes for CHIN1() and CHIN().
stefanf [Mon, 12 Sep 2005 16:02:54 +0000 (16:02 +0000)]
Use prototypes for CHIN1() and CHIN().

18 years agoFix the prototypes for devname() and devname_r(), the first two argument
stefanf [Mon, 12 Sep 2005 15:58:15 +0000 (15:58 +0000)]
Fix the prototypes for devname() and devname_r(), the first two argument
types are supposed to be dev_t and mode_t (prefixed with __ due to
namespace reasons).

18 years agoProcess one NMI interrupt per handler invocation as the processor
jkoshy [Mon, 12 Sep 2005 15:55:44 +0000 (15:55 +0000)]
Process one NMI interrupt per handler invocation as the processor
'buffers' pending NMIs from multiple interrupting PMCs and delivers
them serially.

Reported by:  Olivier Crameri <olivier.crameri@epfl.ch>
MFC after: 3 days

18 years agoDon't declare ___res_ext() twice.
stefanf [Mon, 12 Sep 2005 15:53:28 +0000 (15:53 +0000)]
Don't declare ___res_ext() twice.

18 years agouse monotonic `time_uptime' instead of `time_second'
jkim [Mon, 12 Sep 2005 15:31:28 +0000 (15:31 +0000)]
use monotonic `time_uptime' instead of `time_second'

Approved by: anholt (mentor)
Discussed on: arch

18 years agoClean up.
le [Mon, 12 Sep 2005 14:31:49 +0000 (14:31 +0000)]
Clean up.

Remove unused functions.

Reduce indentation level by reverting the logic of the enclosing
conditional statement.

18 years agoo Add shutdown(2) regression tests. At the moment we cannot pass
maxim [Mon, 12 Sep 2005 14:12:09 +0000 (14:12 +0000)]
o Add shutdown(2) regression tests.  At the moment we cannot pass
shutdown-on-non connected socket test, kern/84761.

18 years agoWhen message can't fit into socket receive buffer return ENOBUFS
glebius [Mon, 12 Sep 2005 14:11:11 +0000 (14:11 +0000)]
When message can't fit into socket receive buffer return ENOBUFS
to userland program instead of letting it wait until end of days.

PR: kern/85907

18 years agoopt_pc98.h is not needed.
nyan [Mon, 12 Sep 2005 13:50:56 +0000 (13:50 +0000)]
opt_pc98.h is not needed.

18 years agoMove the declaration of __cleanup to libc_private.h as it is used in both
stefanf [Mon, 12 Sep 2005 13:46:32 +0000 (13:46 +0000)]
Move the declaration of __cleanup to libc_private.h as it is used in both
stdio/ and stdlib/.  Don't define __cleanup twice.

18 years agomore #ifndef PC98. This really fix the pc98 tinderbox.
nyan [Mon, 12 Sep 2005 13:40:10 +0000 (13:40 +0000)]
more #ifndef PC98.  This really fix the pc98 tinderbox.

18 years agoUpdate for RELENG_6.
kensmith [Mon, 12 Sep 2005 13:31:33 +0000 (13:31 +0000)]
Update for RELENG_6.

Pointed out by: Many on current@.
MFC after: 1 day

18 years agoRemove DFLAG_SEEKABLE from fifo file descriptors: fifos are not seekable
rwatson [Mon, 12 Sep 2005 12:15:12 +0000 (12:15 +0000)]
Remove DFLAG_SEEKABLE from fifo file descriptors: fifos are not seekable
according to POSIX, not to mention the fact that it doesn't make sense
(and hence isn't really implemented).  This causes the fifo_misc
regression test to succeed.

18 years agoAdd fifo_misc, a regression test to hold misc. functional tests for fifos
rwatson [Mon, 12 Sep 2005 11:58:14 +0000 (11:58 +0000)]
Add fifo_misc, a regression test to hold misc. functional tests for fifos
that don't obviously fit into create, open, and io.  For now, add only a
regression test to make sure that lseek() fails with ESPIPE (which it
doesn't).

18 years agoUse different temporary directory templates for fifo_io and fifo_open so
rwatson [Mon, 12 Sep 2005 11:43:51 +0000 (11:43 +0000)]
Use different temporary directory templates for fifo_io and fifo_open so
that if the tests fail to GC their working spaces, it's clear which it is.

18 years agoRemove this file as it's mostly out of date. Up-to-date info such as
brian [Mon, 12 Sep 2005 11:20:07 +0000 (11:20 +0000)]
Remove this file as it's mostly out of date.  Up-to-date info such as
the program's origin is already in the man page.

Update requested by: Xavier Venient & Jason McIntyre

18 years agoOnly poll the fifo for read events if the fifo is attached to a readable
rwatson [Mon, 12 Sep 2005 10:16:18 +0000 (10:16 +0000)]
Only poll the fifo for read events if the fifo is attached to a readable
file descriptor.  Otherwise, the read end of a fifo might return that it
is writable (which it isn't).

Only poll the fifo for write events if the fifo attached to a writable
file descriptor.  Otherwise, the write end of a fifo might return that
it is readable (which it isn't).

In the event that a file is FREAD|FWRITE (which is allowed by POSIX, but
has undefined behavior), we poll for both.

MFC after: 3 days

18 years agoAfter going to some trouble to identify only the write-related events
rwatson [Mon, 12 Sep 2005 10:13:15 +0000 (10:13 +0000)]
After going to some trouble to identify only the write-related events
to poll the write socket for, the fifo polling code proceeded to poll
for the complete set of events.  Use 'levents' instead of 'events' as
the argument to poll, and only poll the write socket if there is
interest in write events.

MFC after: 3 days

18 years agoWhen a writer opens a fifo, wake up the read socket for read, not the
rwatson [Mon, 12 Sep 2005 10:07:21 +0000 (10:07 +0000)]
When a writer opens a fifo, wake up the read socket for read, not the
write socket.

MFC after: 3 days

18 years agoAdd an assertion that fifo_open() doesn't race against other threads
rwatson [Mon, 12 Sep 2005 10:06:38 +0000 (10:06 +0000)]
Add an assertion that fifo_open() doesn't race against other threads
while sleeping to allocate fifo state: due to using the vnode lock to
serialize access to a fifo during open, it shouldn't happen (tm).

MFC after: 3 days

18 years agoRather than reaching into the internals of the UNIX domain socket code
rwatson [Mon, 12 Sep 2005 10:05:08 +0000 (10:05 +0000)]
Rather than reaching into the internals of the UNIX domain socket code
by calling uipc_connect2() to connect two socket endpoints to create a
fifo, call soconnect2().

MFC after: 3 days

18 years agoAdd fifo_io, a regression test for I/O operations on POSIX fifos. We
rwatson [Mon, 12 Sep 2005 09:42:29 +0000 (09:42 +0000)]
Add fifo_io, a regression test for I/O operations on POSIX fifos.  We
currently can't pass this regression test due to broken poll() and
select() support for fifos, but past the basic I/O operation tests.

18 years agoIntroduce vfs_read_dirent() which can help VOP_READDIR() implementations
phk [Mon, 12 Sep 2005 08:46:07 +0000 (08:46 +0000)]
Introduce vfs_read_dirent() which can help VOP_READDIR() implementations
by handling all the cookie stuff.

18 years agoClean up prototypes.
phk [Mon, 12 Sep 2005 08:03:15 +0000 (08:03 +0000)]
Clean up prototypes.

18 years agoRemove ng_callout_init_mtx() macro. Mutexed callouts are incompatible
glebius [Mon, 12 Sep 2005 07:41:31 +0000 (07:41 +0000)]
Remove ng_callout_init_mtx() macro. Mutexed callouts are incompatible
with netgraph(4).

18 years agoThis appears to be good for some folks, but really bad for others.
imp [Mon, 12 Sep 2005 05:35:11 +0000 (05:35 +0000)]
This appears to be good for some folks, but really bad for others.
Until we know why, back out 1.127.

18 years agoSince opti_detect is now only called on !PC98 machines, only declare
imp [Mon, 12 Sep 2005 04:12:50 +0000 (04:12 +0000)]
Since opti_detect is now only called on !PC98 machines, only declare
and define there as well.  This should fix the pc98 tinderbox.

18 years agoMFamd64: use register_t's.
obrien [Mon, 12 Sep 2005 03:34:05 +0000 (03:34 +0000)]
MFamd64: use register_t's.

18 years agoNote that Keyspan is also InnoSys Inc.
obrien [Mon, 12 Sep 2005 03:32:46 +0000 (03:32 +0000)]
Note that Keyspan is also InnoSys Inc.

18 years agoDon't retry when vget() returns ENOENT in the nonblocking case due to the
tegge [Mon, 12 Sep 2005 01:48:57 +0000 (01:48 +0000)]
Don't retry when vget() returns ENOENT in the nonblocking case due to the
vnode being doomed.  It causes a livelock.

18 years agoGiant is no longer needed here.
tegge [Mon, 12 Sep 2005 01:21:42 +0000 (01:21 +0000)]
Giant is no longer needed here.

18 years agoAdd a couple of missing MLINKS.
stefanf [Sun, 11 Sep 2005 20:59:52 +0000 (20:59 +0000)]
Add a couple of missing MLINKS.

18 years agoEliminate unused definitions.
alc [Sun, 11 Sep 2005 20:51:15 +0000 (20:51 +0000)]
Eliminate unused definitions.

18 years agoRestore the 929X support that got nuked in merge
mjacob [Sun, 11 Sep 2005 19:58:19 +0000 (19:58 +0000)]
Restore the 929X support that got nuked in merge

18 years agoCanonize the include of acpi.h.
obrien [Sun, 11 Sep 2005 18:39:03 +0000 (18:39 +0000)]
Canonize the include of acpi.h.

18 years agoAdd the {get,put}ino man pages for those people which got them in the
netchild [Sun, 11 Sep 2005 18:19:42 +0000 (18:19 +0000)]
Add the {get,put}ino man pages for those people which got them in the
small window. Add the date to the T/TCP entry.

18 years agoPer a request from Nick Triantos of nVidia, nVidia's legal department asked
obrien [Sun, 11 Sep 2005 17:50:20 +0000 (17:50 +0000)]
Per a request from Nick Triantos of nVidia, nVidia's legal department asked
that we provide their license document beside their nForce MCP object code.

18 years agoAfter going to some trouble to create a temporary directory in which to run
rwatson [Sun, 11 Sep 2005 17:41:32 +0000 (17:41 +0000)]
After going to some trouble to create a temporary directory in which to run
fifo tests, chdir to it.

18 years agoFix hang at init for MagicMedia 256A[VX] chips. [1]
netchild [Sun, 11 Sep 2005 17:30:27 +0000 (17:30 +0000)]
Fix hang at init for MagicMedia 256A[VX] chips. [1]

In case this causes trouble for some other chipsets add a comment how to
proceed. If we don't get bugreports, this should be removed after a while
(some releases?).

PR: 56617 [1], 29465, 39260, 40574, 68225
Submitted by: Matthew E. Gove <mgove@comcast.net> [1]

18 years agoThe arguments for time2posix() and posix2time() are time_t values, not
stefanf [Sun, 11 Sep 2005 17:09:50 +0000 (17:09 +0000)]
The arguments for time2posix() and posix2time() are time_t values, not
pointers.

18 years agoForward declare z_errmsg with static linkage since it is defined
rodrigc [Sun, 11 Sep 2005 16:13:02 +0000 (16:13 +0000)]
Forward declare z_errmsg with static linkage since it is defined
with static linkage later in the file.  Eliminates GCC 4.0 error.

18 years agoForward declare atalkdomain with static linkage, not extern, since
rodrigc [Sun, 11 Sep 2005 16:04:56 +0000 (16:04 +0000)]
Forward declare atalkdomain with static linkage, not extern, since
it is defined with static linkage later in the file.  Eliminates
GCC 4.0 error.

18 years agoCast bf_sysid to const char * when passing it to strncmp(), because
rodrigc [Sun, 11 Sep 2005 16:02:14 +0000 (16:02 +0000)]
Cast bf_sysid to const char * when passing it to strncmp(), because
strncmp does not take an unsigned char *.  Eliminates warning with GCC 4.0.

18 years agoDo not declare M_NTFSMNT with extern linkage here, since
rodrigc [Sun, 11 Sep 2005 15:57:07 +0000 (15:57 +0000)]
Do not declare M_NTFSMNT with extern linkage here, since
it is defined with static linkage in ntfs_vfsops.c.
Fixes compilation with GCC 4.0.

18 years agoA new version of rev. 1.4: postpone a temporary file creation
maxim [Sun, 11 Sep 2005 14:29:58 +0000 (14:29 +0000)]
A new version of rev. 1.4: postpone a temporary file creation
until we realize if ipfw(4) ever used.

PR: bin/85970
Submitted by: Andre Albsmeier
MFC after: 3 days

18 years agoPower up the external amplifiers additionally to powering up the DAC and ADC.
netchild [Sun, 11 Sep 2005 14:15:05 +0000 (14:15 +0000)]
Power up the external amplifiers additionally to powering up the DAC and ADC.

PR: 47029
Submitted by: Anish Mistry <mistry.7@osu.edu>
Tested by: David Murphy <dm@dmz.ie>

18 years agoAdd some ad_wait_init() calls to fix some problems in some configs (e.g.
netchild [Sun, 11 Sep 2005 13:59:02 +0000 (13:59 +0000)]
Add some ad_wait_init() calls to fix some problems in some configs (e.g.
PC98, CS4231A, "pcm0: play interrupt timeout").

PR: 45682
Submitted by: Watanabe Kazuhiro <CQG00620@nifty.ne.jp>

18 years agoAllow to record non 8bit-mono formats even in half-duplex configurations.
netchild [Sun, 11 Sep 2005 13:49:24 +0000 (13:49 +0000)]
Allow to record non 8bit-mono formats even in half-duplex configurations.

PR: 45679
Submitted by: Watanabe Kazuhiro <CQG00620@nifty.ne.jp>

18 years agoAdd fifo_open, a basic regression test for opening fifos, which tests
rwatson [Sun, 11 Sep 2005 13:03:36 +0000 (13:03 +0000)]
Add fifo_open, a basic regression test for opening fifos, which tests
the blocking and non-blocking forms of open based on the POSIX spec for
now O_NONBLOCK should be handled.

18 years agoFix typo: ${PORTDIR} -> ${PORTSDIR}.
cperciva [Sun, 11 Sep 2005 12:55:07 +0000 (12:55 +0000)]
Fix typo: ${PORTDIR} -> ${PORTSDIR}.

Apologies to everyone who has run portsnap in 7.0-CURRENT since
Tuesday; if there is a file "/.portsnap.INDEX" on your system, you can
delete it (or even better, move it to /usr/ports/.portsnap.INDEX).

Big pointy hat to: cperciva
Reported that things weren't working properly: Aleksander Fafula

18 years agoDo not destroy the queue mutex until the thread is done with it.
phk [Sun, 11 Sep 2005 12:35:32 +0000 (12:35 +0000)]
Do not destroy the queue mutex until the thread is done with it.

18 years agoStop leaking a lock. This used to cause a propagate_priority() page fault
mlaier [Sun, 11 Sep 2005 11:55:39 +0000 (11:55 +0000)]
Stop leaking a lock.  This used to cause a propagate_priority() page fault
when setting syncdev and syncpeer.

Reported by: Dominic Marks

18 years agoFix misdetection of the sound chip on PC98 systems. The submitter doesn't
netchild [Sun, 11 Sep 2005 10:07:12 +0000 (10:07 +0000)]
Fix misdetection of the sound chip on PC98 systems. The submitter doesn't
believe that there are PC98 systems with an OPTi chip.

I don't know enough about this special PC architecture to be sure about
this, so let's find out by letting people with such a system complain in
case this commit breaks the sound system for them. It's easy to revert
then.

PR: 45673
Submitted by: Watanabe Kazuhiro <CQG00620@nifty.ne.jp>

18 years agoFix a bug in volume calculation, this sometimes gives a USB audio device an
netchild [Sun, 11 Sep 2005 09:15:42 +0000 (09:15 +0000)]
Fix a bug in volume calculation, this sometimes gives a USB audio device an
unexpected value (when the volume is high).

Submitted by: Kazuhito HONDA <kazuhito@ph.noda.tus.ac.jp>

18 years agoRelocate witness_levelall(), witness_leveldescendents(), and
truckman [Sun, 11 Sep 2005 07:57:06 +0000 (07:57 +0000)]
Relocate witness_levelall(), witness_leveldescendents(), and
witness_displaydescendants() so that they are protected by
"#ifdef DDB/#endif" to unbreak kernels not using "option DDB".

MFC after: 3 weeks

18 years agoThe kernel-depend target doesn't get any information from "compile-with",
obrien [Sun, 11 Sep 2005 07:33:43 +0000 (07:33 +0000)]
The kernel-depend target doesn't get any information from "compile-with",
so repeat the includes paths for that target.

18 years agoClaim frames corresponding to tl(0|1)_intr and tl0_trap as well. I
marcel [Sun, 11 Sep 2005 06:52:14 +0000 (06:52 +0000)]
Claim frames corresponding to tl(0|1)_intr and tl0_trap as well.  I
think that's the lot, but it's hard to understand the exception code
by mere glancing at it.

MFC after: 1 week

18 years agoUnwind across intrframes as well. While here, better handle bottom of
marcel [Sun, 11 Sep 2005 05:55:24 +0000 (05:55 +0000)]
Unwind across intrframes as well. While here, better handle bottom of
stack by claiming the frame when the IP is 0. It's a bit of a kluge,
but avoids screens full of bogus frames.

MFC after: 1 week

18 years agoUnwind across intrframes as well.
marcel [Sun, 11 Sep 2005 05:36:30 +0000 (05:36 +0000)]
Unwind across intrframes as well.

MFC after: 1 week

18 years agoChange hw.pci.do_powerstate from a boolean to a range. 0 means the
imp [Sun, 11 Sep 2005 04:09:44 +0000 (04:09 +0000)]
Change hw.pci.do_powerstate from a boolean to a range.  0 means the
same as today: do no power management.  1 means be conservative about
what you power down (any device class that has caused problems gets
added here).  2 means be agressive about what gets powered down (any
device class that's fundamental to the system is here).  3 means power
them all down, reguardless.  The default is 1.

The effect in the default system is to add mass storage devices to the
list that we don't power down.  From all the pciconf -l lists that
I've seen for the aac and amr issue, the bad device has been a mass
storage device class.

This is an attempt at a compromise between the very small number of
systems that have extreme issues with powerdown, and the very large
number of systems that gain real benefits from powerdown (I get about
20% more battery life when I attach a minimal set of drivers on my
Sony).  Hopefully it will strike the proper balance.

MFC After: 3 days (before next beta)

18 years agoDon't pollute the entire kernel build with -I$S/contrib/dev/ath and
obrien [Sun, 11 Sep 2005 03:38:18 +0000 (03:38 +0000)]
Don't pollute the entire kernel build with -I$S/contrib/dev/ath and
-I$S/contrib/dev/ath/freebsd.  "ATH_BUILDING_FROM_SOURCE" can be defined to
globally get back -I$S/contrib/dev/ath.

18 years agoAllow one to access the cached values for CMDREG, CACHELNSZ, MINGNT,
imp [Sun, 11 Sep 2005 03:22:03 +0000 (03:22 +0000)]
Allow one to access the cached values for CMDREG, CACHELNSZ, MINGNT,
MAXLAT and LATTIMER.

Improve error message when a bogus RID type is requested for a bar.

18 years agoDon't pollute the entire kernel build with -I$S/contrib/ipfilter.
obrien [Sun, 11 Sep 2005 02:27:34 +0000 (02:27 +0000)]
Don't pollute the entire kernel build with -I$S/contrib/ipfilter.

18 years agoDon't pollute the entire kernel build with -I$S/contrib/pf.
obrien [Sun, 11 Sep 2005 02:04:04 +0000 (02:04 +0000)]
Don't pollute the entire kernel build with -I$S/contrib/pf.

18 years agoDon't pollute the entire kernel build with -I$S/contrib/ngatm.
obrien [Sun, 11 Sep 2005 01:28:05 +0000 (01:28 +0000)]
Don't pollute the entire kernel build with -I$S/contrib/ngatm.

18 years agoDon't pollute the entire kernel build with -I$S/dev/twa.
obrien [Sun, 11 Sep 2005 00:52:05 +0000 (00:52 +0000)]
Don't pollute the entire kernel build with -I$S/dev/twa.

18 years agoUnwind across trap frames. Handles all entry points, except the EPC
marcel [Sun, 11 Sep 2005 00:47:03 +0000 (00:47 +0000)]
Unwind across trap frames. Handles all entry points, except the EPC
syscall. This is an entry from userland anyway.

MFC after: 1 week

18 years agoFor HEAD, install a kernel with debug information if DEBUG is a kernel
obrien [Sun, 11 Sep 2005 00:22:21 +0000 (00:22 +0000)]
For HEAD, install a kernel with debug information if DEBUG is a kernel
config option.  It is too easy to loose the build directory and not have
symbols for kgdb to read.

18 years agoUnwind across trapframes. All kernel entries are handled.
marcel [Sat, 10 Sep 2005 23:11:54 +0000 (23:11 +0000)]
Unwind across trapframes. All kernel entries are handled.

MFC after: 1 week

18 years agoStyle issue: Don't include <wchar.h> where it is not actually needed.
kientzle [Sat, 10 Sep 2005 22:58:06 +0000 (22:58 +0000)]
Style issue:  Don't include <wchar.h> where it is not actually needed.
(wchar_t is defined in stddef.h, and only two files need more than that.)

Portability:  Since the wchar requirements are really quite modest,
it's easy to define basic replacements for wcslen, wcscmp, wcscpy,
etc, for use on systems that lack <wchar.h>.  In particular, this allows
libarchive to be used on older OpenBSD systems.

18 years agoComment out ofw_console 'screen' entry and zs tty entries.
grehan [Sat, 10 Sep 2005 22:46:03 +0000 (22:46 +0000)]
Comment out ofw_console 'screen' entry and zs tty entries.
The OpenFirmware console isn't used on real systems anymore and
I never get to multi-user mode in psim. There are problems with
zs that need to be resolved before these lines can be enabled.

This eliminates disconcerting warnings on boot.

MFC after: 2 days

18 years agoUnwind across trap frames. This adds most of the meat. The sniffer
marcel [Sat, 10 Sep 2005 22:03:09 +0000 (22:03 +0000)]
Unwind across trap frames. This adds most of the meat. The sniffer
just needs to be taught about all the other entry points and the
unwinder needs to be taught about the frame variation between them.

MFC after: 1 week

18 years agoIn ext2_mountfs(), check that the superblock size, SBSIZE,
rodrigc [Sat, 10 Sep 2005 21:30:49 +0000 (21:30 +0000)]
In ext2_mountfs(), check that the superblock size, SBSIZE,
is aligned with the sectorsize value returned by GEOM, before
doing a bread() of the superblock.
This eliminates a panic when trying the following on an empty CD-ROM drive:
mount_ext2fs /dev/acd0 /mnt

Reviewed by: phk

18 years agoAdd fifo_create, a simple regression test for mkfifo(2).
rwatson [Sat, 10 Sep 2005 21:09:26 +0000 (21:09 +0000)]
Add fifo_create, a simple regression test for mkfifo(2).