openbsd
14 years agoMake sure we stop DMA before suspend instead of doing it as the first thing
kettenis [Mon, 26 Jul 2010 19:21:24 +0000 (19:21 +0000)]
Make sure we stop DMA before suspend instead of doing it as the first thing
we do upon resume and failing to cope with the fact that the state has changed
under our feet.  Fixes watchdog timeout issues in at least one case.

ok deraadt@, tested by thib@

14 years agoSome machines include VID devices for hardware that doesn't exist. Avoid
kettenis [Mon, 26 Jul 2010 17:46:29 +0000 (17:46 +0000)]
Some machines include VID devices for hardware that doesn't exist.  Avoid
attaching those devices by checking whether the PCI bus on which they are
supposed to sit exists.  Fixes issues with brightness controls on my Dell
laptop.

ok marco@, pirofti@

14 years agoremove merge error which was commited
deraadt [Mon, 26 Jul 2010 17:25:44 +0000 (17:25 +0000)]
remove merge error which was commited

14 years ago- replace SP with sp calls. this was defined within cvs.1, but unsupported
jmc [Mon, 26 Jul 2010 16:43:59 +0000 (16:43 +0000)]
- replace SP with sp calls. this was defined within cvs.1, but unsupported
by mandoc; diff from kristaps

- while here, fix a bad width specifier

14 years agosync description of acpisony w/ man page;
jmc [Mon, 26 Jul 2010 16:34:53 +0000 (16:34 +0000)]
sync description of acpisony w/ man page;

14 years agolast item of SEE ALSO should not have a comma;
jmc [Mon, 26 Jul 2010 16:20:15 +0000 (16:20 +0000)]
last item of SEE ALSO should not have a comma;

14 years agoXr acpisony, and make the name better
deraadt [Mon, 26 Jul 2010 15:00:43 +0000 (15:00 +0000)]
Xr acpisony, and make the name better

14 years agofix the Cecil Beaton quote; from Rob Farmer, freebsd pr #148916
jmc [Mon, 26 Jul 2010 14:53:59 +0000 (14:53 +0000)]
fix the Cecil Beaton quote; from Rob Farmer, freebsd pr #148916

14 years agoAdd support for Sony ACPI hotkeys via a new driver: acpisony(4).
pirofti [Mon, 26 Jul 2010 11:29:23 +0000 (11:29 +0000)]
Add support for Sony ACPI hotkeys via a new driver: acpisony(4).

Currently it only works for the suspend button and tries to do right for
the brightness events, but I haven't found a Sony laptop that like to do
right so far.

In the future I want to make the brightness keys work on all Sony's and
also add support for the zoom hotkeys and whatever other funky keys I can
find on those things.

Okay deraadt@.

14 years agoeven if you write signal handlers to not do anything stupid when you're
espie [Mon, 26 Jul 2010 10:59:32 +0000 (10:59 +0000)]
even if you write signal handlers to not do anything stupid when you're
not on a terminal, they STILL interrupt long system calls and cause sysread
to fail, so disable them when they're not needed.

problem found by mlarkin@

this is just a band-aid, I guess I really need to "reset" non-needed signals
globally whenever I fork... sigh.

14 years ago- use warnx instead of warn when skipping large lines, as errno is
miod [Mon, 26 Jul 2010 10:55:17 +0000 (10:55 +0000)]
- use warnx instead of warn when skipping large lines, as errno is
  nonsensical in that case (and usually zero).
- when altering the groups file, preserve a single "+" line instead of
  complaining it is incorrect and removing it.
ok fgsch@ millert@ ray@

14 years agoFix a sigbus due to unaligned memory access, found when compacting on
martinh [Mon, 26 Jul 2010 09:27:14 +0000 (09:27 +0000)]
Fix a sigbus due to unaligned memory access, found when compacting on
sparc64.

reads ok to gilles@

14 years agotypo (canacar@)
espie [Mon, 26 Jul 2010 07:28:29 +0000 (07:28 +0000)]
typo (canacar@)

14 years agoFix some spacing / comment.
mglocker [Mon, 26 Jul 2010 07:12:21 +0000 (07:12 +0000)]
Fix some spacing / comment.

14 years agoAlways force GNU inline semantics here as well.
kettenis [Mon, 26 Jul 2010 07:08:22 +0000 (07:08 +0000)]
Always force GNU inline semantics here as well.

14 years agoMake one more Sonix chipset cam work with 640x480 by a) adding it to the
mglocker [Mon, 26 Jul 2010 07:01:08 +0000 (07:01 +0000)]
Make one more Sonix chipset cam work with 640x480 by a) adding it to the
UVIDEO_FLAG_FIX_MAX_VIDEO_FRAME_SIZE quirk list and b) cranking the
manually calculated frame size by pixels * 4 bytes (discussed with
jakemsr@).

14 years agoCorrect the links between threads, processes, pgrps, and sessions,
guenther [Mon, 26 Jul 2010 01:56:27 +0000 (01:56 +0000)]
Correct the links between threads, processes, pgrps, and sessions,
so that the process-level stuff is to/from struct process and not
struct proc.  This fixes a bunch of problem cases in rthreads.
Based on earlier work by blambert and myself, but mostly written
at c2k10.

Tested by many: deraadt, sthen, krw, ray, and in snapshots

14 years agoAdd missing braces so a loop will function as intended.
jsg [Sun, 25 Jul 2010 23:36:31 +0000 (23:36 +0000)]
Add missing braces so a loop will function as intended.
ok dlg@

14 years agobasic regress tests (based on test-19.c) for _Bool and _Complex support
guenther [Sun, 25 Jul 2010 23:00:05 +0000 (23:00 +0000)]
basic regress tests (based on test-19.c) for _Bool and _Complex support

14 years agoIn pmsi_setintellimode(), make sure we send commands with
miod [Sun, 25 Jul 2010 22:46:17 +0000 (22:46 +0000)]
In pmsi_setintellimode(), make sure we send commands with
pckbc_enqueue_cmd() if interrupts are enabled at this point.

14 years agoin the clock drivers, seperate the soft-state and hard-state which was
deraadt [Sun, 25 Jul 2010 21:43:35 +0000 (21:43 +0000)]
in the clock drivers, seperate the soft-state and hard-state which was
all jumbled up in the same functions. the rtc (mc chip) and clock (i8243)
startup was also mixed up.  they the soft state and hardware state can
be started in the right order, and it is easy to restart just the
neccessary parts upon resume.  tested in numerous cases:
(apic, pic) * (GENERIC.MP, GENERIC) * (mp, non-mp) * (i386, amd64)
ok kettenis

14 years ago^U scrolls backwards, not forwards; from marrob at lavabit com
jmc [Sun, 25 Jul 2010 20:23:41 +0000 (20:23 +0000)]
^U scrolls backwards, not forwards; from marrob at lavabit com

14 years agoSync to bsd.lv; in particular, pull in lots of bug fixes.
schwarze [Sun, 25 Jul 2010 18:05:54 +0000 (18:05 +0000)]
Sync to bsd.lv; in particular, pull in lots of bug fixes.
new features:
* support the .in macro in man(7)
* support minimal PDF output
* support .Sm in mdoc(7) HTML output
* support .Vb and .nf in man(7) HTML output
* complete the mdoc(7) manual
bug fixes:
* do not let mdoc(7) .Pp produce a newline before/after .Sh; reported by jmc@
* avoid double blank lines related to man(7) .sp and .br
* let man(7) .nf and .fi flush the line; reported by jsg@ and naddy@
* let "\ " produce a non-breaking space; reported by deraadt@
* discard \m colour escape sequences; reported by J.C. Roberts
* map undefined 1-character-escapes to the literal character itself
maintenance:
* express mdoc(7) arguments in terms of an enum for additional type-safety
* simplify mandoc_special() and a2roffdeco()
* use strcspn in term_word() in place of a manual loop
* minor optimisations in the -Tps and -Thtml formatting frontends

14 years agoMissing SCSI_DATA_IN flag in dvd_read_copyright() caused
krw [Sun, 25 Jul 2010 16:34:41 +0000 (16:34 +0000)]
Missing SCSI_DATA_IN flag in dvd_read_copyright() caused
confusion. Fixes at least my usb DVD reader and The Blue Tick.

14 years agoRestore previous behaviour of always bzero()'ing the buf passed to
krw [Sun, 25 Jul 2010 15:39:32 +0000 (15:39 +0000)]
Restore previous behaviour of always bzero()'ing the buf passed to
scsi_inquire_vpd(). scsi_inquire_vpd() oddness noted by jsg@ after
report of macppc problems by kili@.

14 years agoWhen using GCC, we always want GNU inline semantics. Fixes issues with
kettenis [Sun, 25 Jul 2010 15:35:29 +0000 (15:35 +0000)]
When using GCC, we always want GNU inline semantics.  Fixes issues with
-Wsystem-headers and -std=c99, where GCC 4.2 would warn that it couldn't
give us C99 inline semantics.

ok guenther@, dcoppa@, millert@, deraadt@

14 years agosync
mglocker [Sun, 25 Jul 2010 11:20:37 +0000 (11:20 +0000)]
sync

14 years agoAdd another uvideo(4) device which needs the
mglocker [Sun, 25 Jul 2010 11:20:06 +0000 (11:20 +0000)]
Add another uvideo(4) device which needs the
UVIDEO_FLAG_FIX_MAX_VIDEO_FRAME_SIZE quirk.

14 years agohandle portslock. reminded by antoine@
espie [Sun, 25 Jul 2010 08:49:03 +0000 (08:49 +0000)]
handle portslock. reminded by antoine@

14 years agoecho behaves differently in sh and csh, only handling C-style escapes
guenther [Sun, 25 Jul 2010 07:51:39 +0000 (07:51 +0000)]
echo behaves differently in sh and csh, only handling C-style escapes
in the former, so switch an example that needs them to use printf instead.
From bcr at freebsd.org.
ok halex@

14 years agoLet DVD's play again. Logic reversal prevented copyright reading.
krw [Sun, 25 Jul 2010 05:35:42 +0000 (05:35 +0000)]
Let DVD's play again. Logic reversal prevented copyright reading.

Symptoms noted by oga@. actual bug spotted by dlg@

14 years agooops
espie [Sun, 25 Jul 2010 05:20:34 +0000 (05:20 +0000)]
oops

14 years agoAdd a newline to the input we feed to cpp to get rid of its 'no newline
guenther [Sat, 24 Jul 2010 23:32:52 +0000 (23:32 +0000)]
Add a newline to the input we feed to cpp to get rid of its 'no newline
at end of file' warnings.  Simplify the shell quoting to make it easier
to read while we're at it

"looks allright" beck@

14 years agomissed a couple indents in previous
jakemsr [Sat, 24 Jul 2010 22:48:28 +0000 (22:48 +0000)]
missed a couple indents in previous

14 years agoMention that acpidock(4) sets up a sensor and that it can be used with
mk [Sat, 24 Jul 2010 22:18:58 +0000 (22:18 +0000)]
Mention that acpidock(4) sets up a sensor and that it can be used with
sensorsd to do actions when docking or undocking.

ok jordan

14 years agoTeach lint about C99's _Bool and _Complex, plus some related gcc
guenther [Sat, 24 Jul 2010 22:17:03 +0000 (22:17 +0000)]
Teach lint about C99's _Bool and _Complex, plus some related gcc
extensions: __real__ and __imag__ operators, the use of '~' for
complex conjugation, and 'i' or 'j' as a suffix for complex constants.
While this doesn't handle folding and overflow detection for complex
constants correctly, it's good enough to make it through libm...and
found several bugs once it could do so.

"no objections" miod@, krw@

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@.