openbsd
14 years agoSwitch hppa64 to timecounters.
kettenis [Sat, 24 Jul 2010 21:27:57 +0000 (21:27 +0000)]
Switch hppa64 to timecounters.

14 years agoRestore a needed 'return' removed in the last commit, and stylistic
matthew [Sat, 24 Jul 2010 20:15:31 +0000 (20:15 +0000)]
Restore a needed 'return' removed in the last commit, and stylistic
tweak to eliminate an 'else' clause.

14 years agoWhen changing so that the client passes its stdout and stderr as well as
nicm [Sat, 24 Jul 2010 20:11:59 +0000 (20:11 +0000)]
When changing so that the client passes its stdout and stderr as well as
stdin up to the server, I forgot one essential point - the tmux server
could now be both the producer and consumer. This happens when tmux is
run inside tmux, as well as when piping tmux commands together.

So, using stdio(3) was a bad idea - if sufficient data was written, this
could block in write(2). When that happened and the server was both
producer and consumer, it deadlocks.

Change to use libevent bufferevents for the client stdin, stdout and
stderr instead. This is trivial enough for output but requires a
callback mechanism to trigger when stdin is finished.

This relies on the underlying polling mechanism for libevent to work
with whatever devices to which the user could redirect stdin, stdout or
stderr, hence the change to use poll(2) over kqueue(2) for tmux.

14 years agoConvert PCI addresses to proper 64-bit physical addresses.
kettenis [Sat, 24 Jul 2010 19:34:54 +0000 (19:34 +0000)]
Convert PCI addresses to proper 64-bit physical addresses.

14 years agokqueue(2) is currently broken when used with /dev/null and a few other
nicm [Sat, 24 Jul 2010 19:25:31 +0000 (19:25 +0000)]
kqueue(2) is currently broken when used with /dev/null and a few other
devices.

An upcoming fix for some problems with the client stdout/stderr handling
relies on it working, so make tmux force libevent to use poll(2) via
EVENT_NOKQUEUE, until we have fixed kqueue.

14 years agoMake pmap_extract() work for large pages.
kettenis [Sat, 24 Jul 2010 16:25:33 +0000 (16:25 +0000)]
Make pmap_extract() work for large pages.

14 years agoDon't sleep while holding the uvm_psel_lck mutex. Should fix "locking against
kettenis [Sat, 24 Jul 2010 15:40:39 +0000 (15:40 +0000)]
Don't sleep while holding the uvm_psel_lck mutex.  Should fix "locking against
myself" panics that some people have seen over the last year-and-a-half.

Cherry picked from a more complex (and therefore scarier) diff from oga@.

ok tedu@, oga@

14 years agosync
deraadt [Sat, 24 Jul 2010 15:34:14 +0000 (15:34 +0000)]
sync

14 years agomove to 4.8-beta
deraadt [Sat, 24 Jul 2010 15:31:19 +0000 (15:31 +0000)]
move to 4.8-beta

14 years agoFix PTE_PAGE().
kettenis [Sat, 24 Jul 2010 14:30:04 +0000 (14:30 +0000)]
Fix PTE_PAGE().

14 years agoOne the -> On the
miod [Sat, 24 Jul 2010 12:18:55 +0000 (12:18 +0000)]
One the -> On the

14 years agofix another race. vscsi_cmd checked if the adapter was running at
dlg [Sat, 24 Jul 2010 11:53:44 +0000 (11:53 +0000)]
fix another race. vscsi_cmd checked if the adapter was running at
the start and queued the command for processing by userland later.
the adapter could stop running between the check and the queue.
this merges the state and queue mutexes and combines the check and
queue ops in vscsi_cmd into the same critical section.

tweaked by and ok matthew@

14 years agopass state to Makewhatis. With new hooks in there, that means display
espie [Sat, 24 Jul 2010 10:49:01 +0000 (10:49 +0000)]
pass state to Makewhatis. With new hooks in there, that means display
will integrate with pkg_add output (no more disturbed error messages
from wrong subject lines)

14 years agoadd suspend/resume code, modelled along pms. on at least one ASUS laptop
deraadt [Sat, 24 Jul 2010 10:35:34 +0000 (10:35 +0000)]
add suspend/resume code, modelled along pms.  on at least one ASUS laptop
(which krw is the lucky owner of) this requires a much bigger hammer.  we
have to reset it and put it back into the right mode
ok krw

14 years agoDon't declare wcscoll() twice
guenther [Sat, 24 Jul 2010 09:58:39 +0000 (09:58 +0000)]
Don't declare wcscoll() twice

14 years agostruct emul's e_arglen member is expected to count in units of
guenther [Sat, 24 Jul 2010 09:50:45 +0000 (09:50 +0000)]
struct emul's e_arglen member is expected to count in units of
sizeof(char *), not in bytes, so we've been allocating and copying around
four or eight times as many bytes as we needed to

ok kettenis@ deraadt@

14 years agoGet rid of scsi_deinit(), and change scsi_init() back to a one-time
matthew [Sat, 24 Jul 2010 04:01:52 +0000 (04:01 +0000)]
Get rid of scsi_deinit(), and change scsi_init() back to a one-time
initialization strategy, rather than pretending to do user reference
counting.  Previously, we would re-initialize the SCSI pool(9)s, which
had the fun consequence of causing sysctl(kern.pool.npools) to
infinite loop at IPL_VM.

ok krw@

14 years agoSend normal output to stdout instead of everything to stderr. This
ray [Sat, 24 Jul 2010 01:10:12 +0000 (01:10 +0000)]
Send normal output to stdout instead of everything to stderr. This
is currently done in the latest versions of GNU patch.

Please watch out for output appearing out-of-order.

Discussed with millert and deraadt.

OK deraadt

14 years agoInclude pid file name in error message for a failed kill(). Prompted by
nicm [Sat, 24 Jul 2010 00:54:46 +0000 (00:54 +0000)]
Include pid file name in error message for a failed kill(). Prompted by
PR 6288.

ok deraadt

14 years agomount -f doesn't help mfs, but it doesn't hurt, so stop warning about it.
tedu [Sat, 24 Jul 2010 00:28:41 +0000 (00:28 +0000)]
mount -f doesn't help mfs, but it doesn't hurt, so stop warning about it.
ok deraadt

14 years agoleftover from revert of long ago
jakemsr [Sat, 24 Jul 2010 00:26:50 +0000 (00:26 +0000)]
leftover from revert of long ago
"feel free!" deraadt

14 years agoPlug mem leak.
ray [Fri, 23 Jul 2010 23:59:32 +0000 (23:59 +0000)]
Plug mem leak.

OK nicm

14 years agoHandle redirection to relative url's in the Location: header of http
halex [Fri, 23 Jul 2010 22:27:16 +0000 (22:27 +0000)]
Handle redirection to relative url's in the Location: header of http
responses. Yes, they are violating the rfc's. Yes they do exist anyway.

Also fix a memory leak when url_encode fails to malloc, by simply
err'ing out if so.

feedback and ok phessler@

14 years agosmtpd should NOT fatal when it permanently fails a bounce delivery as this
gilles [Fri, 23 Jul 2010 22:23:24 +0000 (22:23 +0000)]
smtpd should NOT fatal when it permanently fails a bounce delivery as this
can be a normal situation and will allow a local/authenticated user to
trigger the fatal on purpose ...

ignore permanently failed bounce deliveries since there's not much smtpd
can do anyway, that's what the previous queue code did.

experienced and reported by pirofti@

14 years agoReduce variable/function name and whitespace differences between
ray [Fri, 23 Jul 2010 21:46:04 +0000 (21:46 +0000)]
Reduce variable/function name and whitespace differences between
cvs/rcs.

OK xsa zinovik

14 years agoDon't initialize acpiec pointer in acpi_softc until registration succeeds
jordan [Fri, 23 Jul 2010 20:21:58 +0000 (20:21 +0000)]
Don't initialize acpiec pointer in acpi_softc until registration succeeds
ok deraadt

14 years agoControl/data registers were being mapped with swapped io space tags
jordan [Fri, 23 Jul 2010 20:19:21 +0000 (20:19 +0000)]
Control/data registers were being mapped with swapped io space tags
Fix naming & order of tag to be clear
ok deraadt

14 years agoBlock all signals before sending SIGTERM to all non-system processes.
millert [Fri, 23 Jul 2010 20:14:23 +0000 (20:14 +0000)]
Block all signals before sending SIGTERM to all non-system processes.
This ensures that we reach the call to reboot(2) without being killed
by some other process.  OK deraadt@ nicm@

14 years agobring back changes in uaudio.c r1.83, this time remembering to commit
jakemsr [Fri, 23 Jul 2010 19:59:09 +0000 (19:59 +0000)]
bring back changes in uaudio.c r1.83, this time remembering to commit
uaudioreg.h.  sorry about that.

sync endpoints allow for the sample clock on USB audio devices to not
be synchronized to the USB clock.  the sync endpoint gives information
on how much data to send to the data endpoint.  although devices that
require sync endpoints will "work" when the sync endpoint inormation
is ignored, there is a possibility of static, echoing, or any other
type of clock desync error.

requires some small changes to existing code:
* tighten up checks for whether a setting needs/supplies a sync
endpoint.  ignore settings that need a sync endpoint but don't
supply one.  previously all settings that require a sync endpoint
were ignored.
* if a sync endpoint is being used, use the same denominator for
fractional samples as the sync endpoint uses (2**16).

this only implements playback sync endpoints.  recording sync
endpoints are an odd concept: the driver would control the clock
rate of the device.  there may be such devices, but I can't even
imagine how that could be reliably implemented.  I guess you would
sync to the USB clock or the system clock ... but then, what's the
point?

14 years agoFix searchname to handle short name segments, remove hack in acpidock.
jordan [Fri, 23 Jul 2010 18:38:46 +0000 (18:38 +0000)]
Fix searchname to handle short name segments, remove hack in acpidock.

14 years agoImprove English.
ray [Fri, 23 Jul 2010 17:31:54 +0000 (17:31 +0000)]
Improve English.

Help by jmc, earlier version OK thib krw

14 years agoAMD amd64 errara are not on the i386 install media, since there is often
deraadt [Fri, 23 Jul 2010 16:14:54 +0000 (16:14 +0000)]
AMD amd64 errara are not on the i386 install media, since there is often
not room.  we do place them on the amd64 install media though, since many
of them matter more for 64 bit mode.

14 years agoChange the strategy for using the FPU in the kernel. The kernel FPU state
kettenis [Fri, 23 Jul 2010 15:10:16 +0000 (15:10 +0000)]
Change the strategy for using the FPU in the kernel.  The kernel FPU state
is now shared with all processes/threads.  As a result, you can now use the
FPU in true process context (instead of just in kernel threads), but you
need to make sure you restore the default FPU state before calling
fpu_kernel_exit() if you change rounding mode, precision or exception masks.

Lots of discussion with thib@ and Mike Belopuhov.

ok thib@, deraadt@

14 years agoDon't leak the contents of the FPU and SSE registers between processes.
kettenis [Fri, 23 Jul 2010 14:56:31 +0000 (14:56 +0000)]
Don't leak the contents of the FPU and SSE registers between processes.

ok deraadt@

14 years agorevert last commit, unbreaking the tree; was missing a macro definition
sthen [Fri, 23 Jul 2010 14:46:28 +0000 (14:46 +0000)]
revert last commit, unbreaking the tree; was missing a macro definition
presumably from a missing commit to a header file. go ahead kettenis@ todd@

14 years agoSync.
mglocker [Fri, 23 Jul 2010 14:36:49 +0000 (14:36 +0000)]
Sync.

14 years agoCreate video1 by default. Can be useful e.g. on many laptops with
mglocker [Fri, 23 Jul 2010 14:35:56 +0000 (14:35 +0000)]
Create video1 by default.  Can be useful e.g. on many laptops with
integrated cams where you want to use an external cam.  Suggested by Brad.

OK todd@, jakemsr@

14 years agoMake sure the u area of new processes is zero-filled; this got lost in
miod [Fri, 23 Jul 2010 14:19:02 +0000 (14:19 +0000)]
Make sure the u area of new processes is zero-filled; this got lost in
1.119.

14 years agosupport for playback sync endpoints
jakemsr [Fri, 23 Jul 2010 12:17:48 +0000 (12:17 +0000)]
support for playback sync endpoints

sync endpoints allow for the sample clock on USB audio devices to not
be synchronized to the USB clock.  the sync endpoint gives information
on how much data to send to the data endpoint.  although devices that
require sync endpoints will "work" when the sync endpoint inormation
is ignored, there is a possibility of static, echoing, or any other
type of clock desync error.

requires some small changes to existing code:
* tighten up checks for whether a setting needs/supplies a sync
endpoint.  ignore settings that need a sync endpoint but don't
supply one.  previously all settings that require a sync endpoint
were ignored.
* if a sync endpoint is being used, use the same denominator for
fractional samples as the sync endpoint uses (2**16).

this only implements playback sync endpoints.  recording sync
endpoints are an odd concept: the driver would control the clock
rate of the device.  there may be such devices, but I can't even
imagine how that could be reliably implemented.  I guess you would
sync to the USB clock or the system clock ... but then, what's the
point?

14 years agoANSI/style(9), no binary change
jakemsr [Fri, 23 Jul 2010 11:47:50 +0000 (11:47 +0000)]
ANSI/style(9), no binary change

14 years agomatthew@ noted a possible misuse of the rwlock used to protect vscsi
dlg [Fri, 23 Jul 2010 09:41:16 +0000 (09:41 +0000)]
matthew@ noted a possible misuse of the rwlock used to protect vscsi
from being opened by multiple processes at the same time. then he
pointed out that pool_get can sleep in the middle of scsi_cmd,
during which time the process processing the vscsi requests can go
away.

this uses a state variable to protect vscsi from multiple opens
which is checked by all the process and scsi midlayer entrypoints.
it avoids a potential sleep in the middle of the scsi_cmd handler
by moving to iopools.

lots of tweaks and feedback by matthew@

14 years agoSync with cvs:
ray [Fri, 23 Jul 2010 09:14:58 +0000 (09:14 +0000)]
Sync with cvs:
Clean up struct tm handling. Instead of calling gmtime/localtime
and making copies (among other weird dances), use reentrant versions.

Not being able to tell the time is a fatal error, so die if that
happens.

Diff originally from nicm.

OK nicm xsa

14 years agoClean up struct tm handling. Instead of calling gmtime/localtime
ray [Fri, 23 Jul 2010 09:11:10 +0000 (09:11 +0000)]
Clean up struct tm handling. Instead of calling gmtime/localtime
and making copies (among other weird dances), use reentrant versions.

Not being able to tell the time is a fatal error, so die if that
happens.

Diff originally from nicm.

OK nicm xsa

14 years agoCiphers is documented in ssh_config(5) these days
dtucker [Fri, 23 Jul 2010 08:49:25 +0000 (08:49 +0000)]
Ciphers is documented in ssh_config(5) these days

14 years agoRename a bunch of variables and functions, removing the cvs_/rcs_
ray [Fri, 23 Jul 2010 08:31:19 +0000 (08:31 +0000)]
Rename a bunch of variables and functions, removing the cvs_/rcs_
prefixes to reduce differences between cvs and rcs files.

"yes!" nicm

14 years agoregen
mlarkin [Fri, 23 Jul 2010 08:21:12 +0000 (08:21 +0000)]
regen

14 years agoSIS 86C202 is not a VGA device, it's an AGP bridge. Use a better
mlarkin [Fri, 23 Jul 2010 08:19:52 +0000 (08:19 +0000)]
SIS 86C202 is not a VGA device, it's an AGP bridge. Use a better
description for this device.

ok kettenis@

14 years agoManuel Bouyer rescinded clauses 3 and 4 of his license text.
jsg [Fri, 23 Jul 2010 07:47:12 +0000 (07:47 +0000)]
Manuel Bouyer rescinded clauses 3 and 4 of his license text.

14 years agoOmit more IPI code from non-MP kernels. Found using --gc-sections.
matthew [Fri, 23 Jul 2010 07:21:02 +0000 (07:21 +0000)]
Omit more IPI code from non-MP kernels.  Found using --gc-sections.

ok deraadt@

14 years agoAdd suspend/resume logic.
phessler [Fri, 23 Jul 2010 06:43:00 +0000 (06:43 +0000)]
Add suspend/resume logic.

based heavily on the wpi change by kettenis@

OK deraadt@, kettenis@, damien@

14 years agoPermit a few more syscalls for named to run.
ray [Fri, 23 Jul 2010 03:13:51 +0000 (03:13 +0000)]
Permit a few more syscalls for named to run.

OK deraadt

14 years agoFor suspend/reume, ATI IXP chips (might) need 0x40-0x56 saved.. but
deraadt [Fri, 23 Jul 2010 02:50:04 +0000 (02:50 +0000)]
For suspend/reume, ATI IXP chips (might) need 0x40-0x56 saved.. but
these the 6 registers already saved

14 years agoansi. no binary change
jsg [Thu, 22 Jul 2010 21:52:17 +0000 (21:52 +0000)]
ansi. no binary change

14 years agoGive the drive a little bit more time to complete the STANDBY IMMED command.
kettenis [Thu, 22 Jul 2010 21:40:46 +0000 (21:40 +0000)]
Give the drive a little bit more time to complete the STANDBY IMMED command.
The ATA spec seems to suggest it may take up to 30s.  This seems a little bit
long.  To quote Theo: "by that time some drives have probably parked their own
heads in boredom".  But it shouldn't hurt unless your drive is seriously
broken.  Makes some laptops suspend much better.

ok deraadt@

14 years agoFix a crash: if remain-on-exit is set and the pane has exited, the
nicm [Thu, 22 Jul 2010 21:10:51 +0000 (21:10 +0000)]
Fix a crash: if remain-on-exit is set and the pane has exited, the
buffers may not be valid, so do not try to disable/enable them when
switching to copy mode.

14 years agogetopt_long.c replaced getopt.c 6+ years ago; we can retire
blambert [Thu, 22 Jul 2010 19:31:53 +0000 (19:31 +0000)]
getopt_long.c replaced getopt.c 6+ years ago; we can retire
the REPLACE_GETOPT macro, at long last

ok millert@

14 years agoWhen suspending, save & restore as many registers as we can from the
deraadt [Thu, 22 Jul 2010 18:11:16 +0000 (18:11 +0000)]
When suspending, save & restore as many registers as we can from the
pciide front-ends chips.  More registers will have to added here, chip
by chip (warning messages about unknown chipsets, on resume, mean that
you should talk to me).  Also call the wdc back-end (our child) to have
it reset the controller properly on resume.  This makes all pciide that
we've tested unsuspend.
ok kettenis mlarkin

14 years agoFirst part of better pciide resume. Wake the channel by performing two
mlarkin [Thu, 22 Jul 2010 18:10:37 +0000 (18:10 +0000)]
First part of better pciide resume. Wake the channel by performing two
resets separated by a small delay (a delay intended to offend jsg who will
definitely want to fix it by checking for RDY instead)

Tested on a variety of amd and i386 hardware by myself and deraadt@

ok deraadt

14 years agoFix the "no changes" detection when a file has RCS keywords.
millert [Thu, 22 Jul 2010 17:49:18 +0000 (17:49 +0000)]
Fix the "no changes" detection when a file has RCS keywords.
This is consistent with GNU RCS.  Also g/c an unused variable.
OK xsa@ nicm@

14 years agoRemove the VM_KMPAGESFREE sysctl. After the pmemrange
thib [Thu, 22 Jul 2010 17:31:39 +0000 (17:31 +0000)]
Remove the VM_KMPAGESFREE sysctl. After the pmemrange
changes it was returing a constant 0, changing to cope
with those changes makes less sense then just removing
as it provides the user with no usefull information.

sthen@ grepped the port's tree for me and found not hits,
thanks!

OK deraadt@, matthew@

14 years agoDon't deref a NULL pointer if tap or tag are not specified in the
jsg [Thu, 22 Jul 2010 17:16:45 +0000 (17:16 +0000)]
Don't deref a NULL pointer if tap or tag are not specified in the
config file.

14 years agoClean the macros from puc(4). Now with correct logic.
pirofti [Thu, 22 Jul 2010 17:16:10 +0000 (17:16 +0000)]
Clean the macros from puc(4). Now with correct logic.

Tested and okay sthen@.

14 years agoFix a few more scsi_scsi_cmd() removal regressions, caught by
matthew [Thu, 22 Jul 2010 15:59:46 +0000 (15:59 +0000)]
Fix a few more scsi_scsi_cmd() removal regressions, caught by
-Wuninitialized.

Silly typo in my first diff noticed by oga@ and krw@; ok krw@

14 years agoAdd suspend/resume logic. As discussed with phessler@, incorporating
kettenis [Thu, 22 Jul 2010 14:42:43 +0000 (14:42 +0000)]
Add suspend/resume logic.  As discussed with phessler@, incorporating
suggestions by damien@.

14 years agoInstead of trying to biowait on a buf that has errored, do the
thib [Thu, 22 Jul 2010 14:34:06 +0000 (14:34 +0000)]
Instead of trying to biowait on a buf that has errored, do the
right thing, throw it away by marking it as B_INVAL and setting
the B_ERROR flag and b_error to the errno that was returned.

B_RAW doesn't matter there.

Issue report my mlarkin@, this diff tested and confirmed to
fix the issue by mlarkin also, thanks!

OK krw@, beck@, deraadt@

14 years agoReset the keyboard controller on resume, and also alert the children
deraadt [Thu, 22 Jul 2010 14:27:44 +0000 (14:27 +0000)]
Reset the keyboard controller on resume, and also alert the children
(pckbd and pms) to do their part
started by mlarkin, cleaned up by me
ok miod

14 years agoDon't do anything on suspend/resume for now (there is a diff brewing,
deraadt [Thu, 22 Jul 2010 14:26:38 +0000 (14:26 +0000)]
Don't do anything on suspend/resume for now (there is a diff brewing,
but it has some problems still..)

14 years agoToggle the mouse through the disabled and enabled states when suspending
deraadt [Thu, 22 Jul 2010 14:25:41 +0000 (14:25 +0000)]
Toggle the mouse through the disabled and enabled states when suspending
and restoring.  Fixes most mice.

14 years agopretty large cleanup of SMALL_KERNEL
deraadt [Thu, 22 Jul 2010 14:19:47 +0000 (14:19 +0000)]
pretty large cleanup of SMALL_KERNEL

14 years agoRemove unused function prototypes
jordan [Thu, 22 Jul 2010 13:46:42 +0000 (13:46 +0000)]
Remove unused function prototypes
Add flags and type codes for AML resources

14 years ago- Fix wrong ioctl structure documentation for VIDIOC_QUERYBUF, VIDIOC_QBUF,
mglocker [Thu, 22 Jul 2010 13:32:24 +0000 (13:32 +0000)]
- Fix wrong ioctl structure documentation for VIDIOC_QUERYBUF, VIDIOC_QBUF,
and VIDIOC_DQBUF.
- Also document the VIDIOC_QUERYBUF part for the MMAP interface.

14 years agoFixes for AES CTR mode from mikeb:
thib [Thu, 22 Jul 2010 12:47:40 +0000 (12:47 +0000)]
Fixes for AES CTR mode from mikeb:

o Fix up counter increment for buffers larger then 64 bytes, by
  calling the increment routine before loading the IV into the
  encryption routine input register.

o In aesni_encdec() regenerate the IV for every new request.

Also use nice defines instead of magic constants for the size
of ses_iv.

14 years agoLet systat -N states resolve network addresses
giovanni [Thu, 22 Jul 2010 12:33:29 +0000 (12:33 +0000)]
Let systat -N states resolve network addresses
help and ok sthen@ lum@
ok canacar@

14 years agoReplace strncat() with strlcat().
mglocker [Thu, 22 Jul 2010 11:58:03 +0000 (11:58 +0000)]
Replace strncat() with strlcat().

14 years agoChange include ordering.
mglocker [Thu, 22 Jul 2010 11:55:26 +0000 (11:55 +0000)]
Change include ordering.

14 years agoInitial regression test program for video(4).
mglocker [Thu, 22 Jul 2010 11:53:24 +0000 (11:53 +0000)]
Initial regression test program for video(4).

14 years agoAdd a comment about MODPY_BUILDDEP and NO_BUILD in the python section.
ajacoutot [Thu, 22 Jul 2010 10:42:37 +0000 (10:42 +0000)]
Add a comment about MODPY_BUILDDEP and NO_BUILD in the python section.

14 years agoAs per OpenCVS, general usage in coversation and apparently newer
jsg [Thu, 22 Jul 2010 10:31:10 +0000 (10:31 +0000)]
As per OpenCVS, general usage in coversation and apparently newer
upstream versions of this code, add blame as an alias for annotate.

ok henning@ fgsch@ deraadt@ thib@ krw@

14 years agoPrevent a process from entering wpi_ioctl while another process is
kettenis [Thu, 22 Jul 2010 10:22:37 +0000 (10:22 +0000)]
Prevent a process from entering wpi_ioctl while another process is
tsleep'ing (for example waiting for the firmware to become alive)
in iwn_init.

ok damien@

14 years agovarious macro cleanup;
jmc [Thu, 22 Jul 2010 10:21:52 +0000 (10:21 +0000)]
various macro cleanup;

14 years agoWhen suspending, only call athn_stop() when IFF_RUNNING is set.
kettenis [Thu, 22 Jul 2010 10:19:37 +0000 (10:19 +0000)]
When suspending, only call athn_stop() when IFF_RUNNING is set.

ok damien@

14 years agoremove some groff \s escapes, which we do not support;
jmc [Thu, 22 Jul 2010 08:30:29 +0000 (08:30 +0000)]
remove some groff \s escapes, which we do not support;

14 years agomove exit returns blurb out of DIAGNOSTICS; from daniel dickman
jmc [Thu, 22 Jul 2010 08:09:29 +0000 (08:09 +0000)]
move exit returns blurb out of DIAGNOSTICS; from daniel dickman

14 years agoukc xr should be boot_config;
jmc [Thu, 22 Jul 2010 07:41:59 +0000 (07:41 +0000)]
ukc xr should be boot_config;

14 years agokeep our lists consistent for the exit values blurb; from daniel dickman
jmc [Thu, 22 Jul 2010 07:40:14 +0000 (07:40 +0000)]
keep our lists consistent for the exit values blurb; from daniel dickman

14 years agodocument exit returns; from daniel dickman
jmc [Thu, 22 Jul 2010 07:38:56 +0000 (07:38 +0000)]
document exit returns; from daniel dickman

14 years agoWe have this nice KMEMSTATS option to control when we use kmemstats,
matthew [Thu, 22 Jul 2010 06:30:13 +0000 (06:30 +0000)]
We have this nice KMEMSTATS option to control when we use kmemstats,
so no point in reserving space for kmemstats unless it's enabled.

ok thib@, deraadt@

14 years agoMark two more DMA accessible malloc(9)s.
matthew [Thu, 22 Jul 2010 05:32:10 +0000 (05:32 +0000)]
Mark two more DMA accessible malloc(9)s.

14 years agoIn st_space() and st_write_filemarks(), if scsi_xs_get() returns NULL,
matthew [Thu, 22 Jul 2010 05:26:34 +0000 (05:26 +0000)]
In st_space() and st_write_filemarks(), if scsi_xs_get() returns NULL,
set st->media_fileno and st->media_blkno before returning.  Not sure
if this is needed or even really correct, but it's an unintentional
behavior change due to removing scsi_scsi_cmd().

ok dlg@

14 years agoIn scsi_inquire_vpd(), actually just return EJUSTRETURN when dealing
matthew [Thu, 22 Jul 2010 05:21:58 +0000 (05:21 +0000)]
In scsi_inquire_vpd(), actually just return EJUSTRETURN when dealing
with UMASS devices.  Fixes scsi_scsi_cmd() removal regression.

ok dlg@

14 years agostyle(9) fix and release rwlock(9) if scsi_xs_get() returns NULL,
matthew [Thu, 22 Jul 2010 05:21:02 +0000 (05:21 +0000)]
style(9) fix and release rwlock(9) if scsi_xs_get() returns NULL,
which should never happen anyway.  Fixes scsi_scsi_cmd() removal
regression.

ok dlg@

14 years agoIn safte_match(), return 0 on SCSI errors, not an errno value. Fixes
matthew [Thu, 22 Jul 2010 04:59:31 +0000 (04:59 +0000)]
In safte_match(), return 0 on SCSI errors, not an errno value.  Fixes
regression from scsi_scsi_cmd() removal.

ok dlg@

14 years agoAppropriately set SCSI_DATA_IN or SCSI_DATA_OUT depending on type of
matthew [Thu, 22 Jul 2010 04:54:24 +0000 (04:54 +0000)]
Appropriately set SCSI_DATA_IN or SCSI_DATA_OUT depending on type of
dvd_auth command.  Fixes regression from scsi_scsi_cmd() removal.

ok dlg@

14 years agoSCSI HBA drivers are supposed to get their SCSI CDBs from xs->cmd, not
matthew [Thu, 22 Jul 2010 04:40:41 +0000 (04:40 +0000)]
SCSI HBA drivers are supposed to get their SCSI CDBs from xs->cmd, not
xs->cmdstore.

ok krw@ a while back (contingent upon testing), and deraadt@ says this
has been in snapshots for weeks now.

14 years agosync
deraadt [Thu, 22 Jul 2010 00:59:56 +0000 (00:59 +0000)]
sync

14 years agoremove unused variable
deraadt [Thu, 22 Jul 2010 00:41:29 +0000 (00:41 +0000)]
remove unused variable

14 years agoEliminate scsi_scsi_cmd() now that ss(4) is gone and with it the
krw [Thu, 22 Jul 2010 00:31:06 +0000 (00:31 +0000)]
Eliminate scsi_scsi_cmd() now that ss(4) is gone and with it the
last bastardized sync and buf call through scsi_scsi_cmd(). Flatten
code to call scsi_xs_sync() directly for all commands.

Airplane typos shaken out by various.

ok dlg@ matthew@ deraadt@

14 years agoSome ss(4) bits escaped the purge, eliminate them.
nicm [Wed, 21 Jul 2010 23:40:26 +0000 (23:40 +0000)]
Some ss(4) bits escaped the purge, eliminate them.

ok todd krw

14 years agoremove unnecessary ``return 0'' statements,
ratchov [Wed, 21 Jul 2010 23:00:16 +0000 (23:00 +0000)]
remove unnecessary ``return 0'' statements,
from Remco <remco at d-compu.dyndns.org>, thanks!

14 years agoIn the SYNOPSIS, .Nm at the beginning of an input line starts
schwarze [Wed, 21 Jul 2010 21:44:28 +0000 (21:44 +0000)]
In the SYNOPSIS, .Nm at the beginning of an input line starts
an .Nm block, and gets special handling (new line, indentation).
But .Nm in the middle of a line is just a normal in-line element,
so make sure it does NOT get the special handling.
Partly fixes the test(1) SYNOPSIS; indentation after "[" is still
excessive, which is an unrelated and more difficult issue.
Reminded of the problem by jmc@;
OK kristaps@.