matthew [Sat, 7 Aug 2010 19:46:58 +0000 (19:46 +0000)]
Link against libkern's timingsafe_bcmp.c, so key_wrap regress tests
can compile again.
ok phessler@, "Get it in right away" deraadt@
espie [Sat, 7 Aug 2010 19:40:45 +0000 (19:40 +0000)]
document new default
espie [Sat, 7 Aug 2010 19:39:33 +0000 (19:39 +0000)]
new test for merging because of wrong deps that must lead to failure.
also, PKG_ADD -> ADD_PKG to avoid confusion with bsd.port.mk.
oga [Sat, 7 Aug 2010 19:32:44 +0000 (19:32 +0000)]
Suspend/resume for agp_amd.c
Note: the unconditional restore of the status register is ok because all
of the bits are either ones we want to preserve or read-only.
ok deraadt@
oga [Sat, 7 Aug 2010 19:31:23 +0000 (19:31 +0000)]
Suspend/resume handler for viaagp.
ok deraadt@.
schwarze [Sat, 7 Aug 2010 19:22:50 +0000 (19:22 +0000)]
sync to bsd.lv:
* When discussing compatibility, be more specific whether we are
referring to GNU troff or to troff in general.
* Move one compatibility note to the appropriate section.
* And a few minor tweaks.
While here, EXIT STATUS is also ok in section 6.
With permission from deraadt@ to still improve mandoc manuals.
oga [Sat, 7 Aug 2010 18:15:38 +0000 (18:15 +0000)]
save/restore functions for aliagp.
Very similar to other agp suspend functions.
ok kettenis@, deraadt@.
oga [Sat, 7 Aug 2010 18:09:09 +0000 (18:09 +0000)]
Suspend/resume handler for sisagp save/restoring the gtt window/size and
tlb enable states before we go down and whacking them back in on
bringup.
``commit'' deraadt@
schwarze [Sat, 7 Aug 2010 18:06:45 +0000 (18:06 +0000)]
Groff allows the initial macro on a line to be delimited by a space
of by a tab; so allow the tab in mandoc, too.
Bug found by me, fix by kristaps@, "sure" deraadt@.
claudio [Sat, 7 Aug 2010 17:59:02 +0000 (17:59 +0000)]
Fix carp demotion on tables. For some reason the default values were
inherited from the table definition even though these values could
not be changed there. While there fix a memory leak in a rather strange
case.
OK phessler, jsg, pyr, sthen, deraadt
oga [Sat, 7 Aug 2010 17:44:09 +0000 (17:44 +0000)]
Save and restore registers on suspend/resume.
An earlier iteration of this fixed the "no X, suspend, resume, startx,
boom" problem for sthen on his machine.
ok deraadt@
schwarze [Sat, 7 Aug 2010 17:26:11 +0000 (17:26 +0000)]
In -Thtml output, preserve blank lines at the end of .Bd -literal.
Patch from kristaps@, analoguous to mdoc_term.c rev. 1.100.
With permission from deraadt@ to still fix bugs in mandoc.
kettenis [Sat, 7 Aug 2010 17:12:16 +0000 (17:12 +0000)]
Enforce acpi register access rescrictions.
ok mlarkin@, deraadt@, tested by marco@
canacar [Sat, 7 Aug 2010 16:55:38 +0000 (16:55 +0000)]
Generate power change events for APM. Makes powerup and powerdown scripts
work with ACPI.
ok deraadt@, phessler@, feedback kettenis@
deraadt [Sat, 7 Aug 2010 16:21:20 +0000 (16:21 +0000)]
The wakeup of the acpi thread is not needed. This code is being called
from inside the thread context, and will unwind into the middle of
acpi_thread, where it will check these variables
ok jordan marco kettenis canacar
kettenis [Sat, 7 Aug 2010 16:16:18 +0000 (16:16 +0000)]
Unmap registers upon detach. Avoid panics when detaching a partially attached
device. Found out the hard way by hotplugging an unsupported "Soft-Mac"
device.
ok deraadt@
kettenis [Sat, 7 Aug 2010 15:50:23 +0000 (15:50 +0000)]
Add resume support for serial consoles.
Tested by sthen@, ok deraadt@
deraadt [Sat, 7 Aug 2010 15:48:26 +0000 (15:48 +0000)]
upon resume, notify all the acpiac and acpibat drivers to update
their status. some laptops do not do this automatically.
ok kettenis canacar
espie [Sat, 7 Aug 2010 10:26:58 +0000 (10:26 +0000)]
need to check that kept packages are still okay.
fixes:
sudo pkg_add -r ghostscript-8.63p13-no_x11.tgz
quirks-1.17: 1/1
ghostscript-8.63p13->ghostscript-8.63p13-no_x11 forward dependencies:
| Dependency of libspectre-0.2.6 on ghostscript-*-!no_x11 doesn't match
Merging libspectre-0.2.6->libspectre-0.2.6 (1/3)
[libspectre-0.2.6]ghostscript-8.63p13->ghostscript-8.63p13-no_x11: 3/3
Read shared items: ok
phessler [Sat, 7 Aug 2010 10:22:28 +0000 (10:22 +0000)]
disable lidsuspend when we are powering down
"I like this" marco@, "Sure" deraadt@
espie [Sat, 7 Aug 2010 09:37:44 +0000 (09:37 +0000)]
dep is an object, needs to become a string for error messages
espie [Sat, 7 Aug 2010 08:33:35 +0000 (08:33 +0000)]
explain quite a bit more what PLIST_DB does
deraadt [Sat, 7 Aug 2010 07:08:34 +0000 (07:08 +0000)]
In the resume case we need to check IFF_UP
deraadt [Sat, 7 Aug 2010 07:04:35 +0000 (07:04 +0000)]
In fxp_pci_activate use the correct softc's; then use a workq since some
fxp's need load firmwares.....
tested by sebastia
deraadt [Sat, 7 Aug 2010 06:10:04 +0000 (06:10 +0000)]
On resume, re-activate the host RNG on the host bridges that need it.
ok kettenis
krw [Sat, 7 Aug 2010 03:50:01 +0000 (03:50 +0000)]
No "\n" needed at the end of panic() strings.
Bogus chunks pointed out by matthew@ and miod@. No cookies for
marco@ and jasper@.
ok deraadt@ miod@ matthew@ jasper@ macro@
krw [Sat, 7 Aug 2010 00:13:09 +0000 (00:13 +0000)]
No "\n" needed at the end of panic() strings.
Some stragglers from last diff.
marco [Fri, 6 Aug 2010 21:12:27 +0000 (21:12 +0000)]
Always call _PSW on _LID devices that support it to enable lid open to
resume the machine. Conversely disable it when the machine wakes up.
Tested by several ok deraadt
deraadt [Fri, 6 Aug 2010 21:08:26 +0000 (21:08 +0000)]
com@isa suspend and resume; logic cloned from ../puc/com_puc.c
ok kettenis
kettenis [Fri, 6 Aug 2010 21:04:14 +0000 (21:04 +0000)]
Initial stab at making com@puc suspend and resume properly. Works fine
for using cu(1) between two OpenBSD machines. Probably doesn't work for
serial consoles but we don't support those on puc(4) anyway.
ok deraadt@
marco [Fri, 6 Aug 2010 18:32:38 +0000 (18:32 +0000)]
repost hp g62
ok deraadt
jsg [Fri, 6 Aug 2010 14:32:13 +0000 (14:32 +0000)]
Correct a problem which could cause the wrong af to be displayed.
Found via the clang static analyser.
ok henning@ claudio@ deraadt@
deraadt [Fri, 6 Aug 2010 14:20:14 +0000 (14:20 +0000)]
As part of a revamp of the PM1/GPE code, I write this diff to look for
unmanaged EN & STS bits in the PM1 register at interrupt time and report
them. As a side effect this splits the STS acknowledgement into two writes
(for power, and sleep) instead of one. The printf that is added (to spot
unmanaged STS bits) has not yet been triggered as far as we know.
Before the "write to PM1 registers at the right offset" diff went in, this
was not neccessary. But newer thinkpads do not have a working soft power
button without this diff.
We have no idea why.
ok mlarkin kettenis
deraadt [Fri, 6 Aug 2010 14:11:42 +0000 (14:11 +0000)]
ca_activate for suspend/resume; tested by andrew@afresh1.com
oga [Fri, 6 Aug 2010 13:12:20 +0000 (13:12 +0000)]
save/restore the *correct* clock gating registers on suspend/resume
instead of accidentally writing zeros to ones that may not even exist on
the chipset we're running on.
problem noted by damien@, fix by me.
been in theo's tree a couple of days. ``commit'' deraadt@.
oga [Fri, 6 Aug 2010 13:09:52 +0000 (13:09 +0000)]
Previous code to handle suspend/resume for intagp assumed that
everything was unbound before we go down.
Due to software fallbacks from the vt-switched X this is not strictly
true, so save/restore the gtt (which is stored in a BAR and thus
volatile).
i915 and i945 still have some (unrelated) coruption on dzen2 on resume
which I am looking for still (theory: fence registers), but this helps a
LOT of machines.
``commit'' deraadt@. tested by many (and in snaps the last few days.
ratchov [Fri, 6 Aug 2010 06:52:17 +0000 (06:52 +0000)]
If audio interrupts are missed (as this happens on some MP systems
now), play and record directons may be out of sync, and since the play
direction is used as clock source, we may end up with data ariving
_before_ the time it was recorded. This breaks the sndio ``device
model'' and most full-duplex apps relying on it, starting with aucat
in its default mode.
Workaround this by using the direction that's ahead as clock source,
ensuring that recorded data never arrives before the clock tick it was
recorded. This prevents apps from crashing but won't fix stuttering
caused by missed interrupts.
ok deraadt@
jakemsr [Fri, 6 Aug 2010 05:57:48 +0000 (05:57 +0000)]
reenabling unsolicited responses in the resume path was lost in
rev 1.172. restore it so headphone/speaker switching can work
after resume.
ok deraadt
jakemsr [Fri, 6 Aug 2010 05:34:50 +0000 (05:34 +0000)]
no need to save/restore the state of the master volume
ok deraadt
deraadt [Fri, 6 Aug 2010 05:34:29 +0000 (05:34 +0000)]
ok, that is the last of the easy chips to check for register saves. i'm
going to give up on reading gobs of crap for a while and hope that someone
else takes on the next few.
mglocker [Fri, 6 Aug 2010 05:26:24 +0000 (05:26 +0000)]
ACPI suspend/resume for bwi(4). Initial diff from todd@, finished and
tested by me on X40 with a BCM4306.
OK deraadt@
deraadt [Fri, 6 Aug 2010 05:24:16 +0000 (05:24 +0000)]
ca_activate function for suspend/resume; tested by mlarkin
jakemsr [Fri, 6 Aug 2010 04:43:20 +0000 (04:43 +0000)]
since r1.171 pin widgets get fully reinitialized on resume, which
means they lose their quirk fixups. check for widget quirks and
apply as necessary.
ok deraadt
mlarkin [Fri, 6 Aug 2010 03:02:24 +0000 (03:02 +0000)]
ca_activate function for nfe(4) for suspend/resume
tested on nvidia mcp51
ok deraadt@
deraadt [Fri, 6 Aug 2010 02:47:27 +0000 (02:47 +0000)]
another set of chips which do not need register rewrites at resume time
deraadt [Fri, 6 Aug 2010 02:45:53 +0000 (02:45 +0000)]
ca_activate function for suspend/resume
tested by mlarkin
deraadt [Fri, 6 Aug 2010 02:43:57 +0000 (02:43 +0000)]
document machdep.lidsuspend by example
jakemsr [Fri, 6 Aug 2010 00:08:49 +0000 (00:08 +0000)]
attempt to deal with situations where the hardware has processed more
than one block of data since the interrupt handler was last run.
when azalia detects these situations, it will print a line to the
dmesg buffer like:
stream 1: swpos XXXX hwpos XXXX, adding intr
getting these messages in itself is not bad, but if audio breaks, I
need to see these messages. this will be changed to a DPRINTF once
I get more feedback.
ok deraadt
miod [Fri, 6 Aug 2010 00:00:38 +0000 (00:00 +0000)]
Every time you ignore uiomove() return value, $DEITY kills a little
$ADORABLE_FELINE.
ok deraadt@ matthew@
miod [Fri, 6 Aug 2010 00:00:16 +0000 (00:00 +0000)]
don't return (potential errno) + (potential errno), instead only perform
the second errno-capable function if the first one didn't fail.
ok deraadt@
sthen [Thu, 5 Aug 2010 22:06:20 +0000 (22:06 +0000)]
sync
deraadt [Thu, 5 Aug 2010 21:10:06 +0000 (21:10 +0000)]
new i386/amd64 machdep.lidsuspend sysctl which decides whether a lid
close causes a suspend. resumes are not tied to this; they happen
unconditionally. this is a temporary knob for the 4.8 release; afterwards
it will move to a more convenient place
much moaning discussing where to put the knob with kettenis
tested by various including phessler
kettenis [Thu, 5 Aug 2010 20:21:36 +0000 (20:21 +0000)]
Suspend/resume support for sili(4). Not perfect yet, but prevents us from
getting stuck. Based on an initial diff from deraadt@.
deraadt [Thu, 5 Aug 2010 20:11:32 +0000 (20:11 +0000)]
lid suspend logic was backwards
marco [Thu, 5 Aug 2010 19:23:06 +0000 (19:23 +0000)]
Wakeup machine when lid is opened on laptops that have acpibtn _LID.
initial diff from me, this version pruned by deraadt
ok deraadt
marco [Thu, 5 Aug 2010 17:33:12 +0000 (17:33 +0000)]
die aml parser die
ok deraadt
marco [Thu, 5 Aug 2010 17:30:28 +0000 (17:30 +0000)]
kill kill kill the aml parser, kill kill kill it until it is dead
ok deraadt
deraadt [Thu, 5 Aug 2010 17:26:57 +0000 (17:26 +0000)]
PM1 power button events were generating 'fake events' to acpibtn PWRB,
but if there is no such device these were being tossed. Instead, arrange
for all power button handlers to flag a softc variable which is processed
by the thread; so that one place will know to request a powerdown (psignal
to init)
ok marco mlarkin
bluhm [Thu, 5 Aug 2010 17:21:19 +0000 (17:21 +0000)]
In pf_icmp_mapping() the ICMP and ICMPv6 types shared the same
number space. In fact they are independent and must be handled
separately. Fix traceroute via pf by splitting pf_icmp_mapping()
into IPv4 and IPv6 sections.
ok henning@ mcbride@; tested mcbride@; sure deraadt@
stsp [Thu, 5 Aug 2010 17:13:53 +0000 (17:13 +0000)]
The UTF-8 decoder should not accept byte sequences which decode to unicode
code positions U+D800 to U+DFFF (UTF-16 surrogates), U+FFFE, and U+FFFF.
http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
http://unicode.org/faq/utf_bom.html#utf8-4
ok phessler, millert, miod, deraadt
deraadt [Thu, 5 Aug 2010 17:00:50 +0000 (17:00 +0000)]
rename a variable which is annoyingly poorly named
mlarkin [Thu, 5 Aug 2010 16:57:03 +0000 (16:57 +0000)]
Write to the correct offset for various ACPI pmreg registers. Writing to
the correct register does properly clear the wake status bits and fixed
event bits, which allows some machines to have more than 1 suspend cycle.
bug spotted by deraadt@
tested by deraadt@ and myself on a half-dozen machines and others on
hackers@
ok deraadt@, marco@
deraadt [Thu, 5 Aug 2010 16:13:03 +0000 (16:13 +0000)]
Fix the power button. The pm1 register is 16 bits in size.
My mistake, a while back.
tested by krw
deraadt [Thu, 5 Aug 2010 15:46:20 +0000 (15:46 +0000)]
Add Windows2009 to the valid osi table; from marco, suggested as a trial
by kettenis a while back, lots of you have been running this.
If you have new problems try without this and report.
miod [Thu, 5 Aug 2010 13:50:00 +0000 (13:50 +0000)]
Change the management of commands in the active commands TAILQ to let issuers
of synchronous commands perform the TAILQ_REMOVE of the command themselves,
instead of relying upon this being done for us if tsleep() returns zero.
Since we momentarily set `cold' again around suspend, tsleep() becomes a
no-op, which broke this assumption, and in turn caused TAILQ corruption,
with items being put on the freelist while still on the active list.
Found the hard way by ray@ playing with wsmoused after resume.
miod [Thu, 5 Aug 2010 13:13:17 +0000 (13:13 +0000)]
Allow bthidev_output() to not grab the bt lock, to prevent lock
recursion when trying to send commands from input callbacks. Makes the
caps/num/scroll lock keys on btkbd correctly lit the leds instead of
panic'ing.
Noticed and fix tested by mlarkin@, "do whatever you want in bt" deraadt@
djm [Thu, 5 Aug 2010 13:08:42 +0000 (13:08 +0000)]
Fix a trio of bugs in the local/remote window calculation for datagram
data channels (i.e. TunnelForward):
Calculate local_consumed correctly in channel_handle_wfd() by measuring
the delta to buffer_len(c->output) from when we start to when we finish.
The proximal problem here is that the output_filter we use in portable
modified the length of the dequeued datagram (to futz with the headers
for !OpenBSD).
In channel_output_poll(), don't enqueue datagrams that won't fit in the
peer's advertised packet size (highly unlikely to ever occur) or which
won't fit in the peer's remaining window (more likely).
In channel_input_data(), account for the 4-byte string header in
datagram packets that we accept from the peer and enqueue in c->output.
report, analysis and testing 2/3 cases from wierbows AT us.ibm.com;
"looks good" markus@
halex [Thu, 5 Aug 2010 10:45:32 +0000 (10:45 +0000)]
Return the old behaviour of exiting if a mount fails rather than ignoring it
ok krw@
sthen [Thu, 5 Aug 2010 10:22:15 +0000 (10:22 +0000)]
sync from mirrors.dat
deraadt [Thu, 5 Aug 2010 07:57:04 +0000 (07:57 +0000)]
ca_activate function for suspend/resume; tested by mlarkin on a
Davicom DM9102. (bit of noise on suspend or resume, but that can be
dealt with later)
guenther [Thu, 5 Aug 2010 07:45:31 +0000 (07:45 +0000)]
Regenerate files that were affected by changes to asn1_compile that were
made years ago.
ok deraadt@
deraadt [Wed, 4 Aug 2010 23:23:36 +0000 (23:23 +0000)]
re-post all ATI and all PowerVR (with an annoying message)
ok kettenis oga pirofti
deraadt [Wed, 4 Aug 2010 21:43:37 +0000 (21:43 +0000)]
Disable bce(4) because it can only access 1GB of memory and developers
who have the device (only found in laptops) refuse to realize it is
their own problem and should dig into the code and fix it.
deraadt [Wed, 4 Aug 2010 21:29:29 +0000 (21:29 +0000)]
sync
ray [Wed, 4 Aug 2010 21:28:17 +0000 (21:28 +0000)]
exit(2) on xcalloc failure. From Daniel Dickman <didickman () gmail
! com>, thanks!
OK deraadt
deraadt [Wed, 4 Aug 2010 21:02:24 +0000 (21:02 +0000)]
on resume: calling sc_power after ath_init() is silly. ath_init()
gets down to there through ath_init() -> ath_enable() -> ...
from a discussion with damien
damien [Wed, 4 Aug 2010 19:49:49 +0000 (19:49 +0000)]
use a workq for resume.
ok deraadt@
damien [Wed, 4 Aug 2010 19:48:33 +0000 (19:48 +0000)]
add suspend/resume support for PCI ral(4) devices.
ok deraadt@, sthen@
tested by matthew@ (RT2560), dcoppa@ (RT2790), okan@ (RT2860), todd@ (RT2560)
deraadt [Wed, 4 Aug 2010 19:46:13 +0000 (19:46 +0000)]
switch back to kqueue for now, since (a) kqueue has been fixed to deal
with strange devices and (b) since there appears to be a bull in the
poll code in libevent as well...
requested by nicm who is away
deraadt [Wed, 4 Aug 2010 19:43:52 +0000 (19:43 +0000)]
Wake up cdroms attached to pciide; same as in wd.c 1.86
tested by phessler
schwarze [Wed, 4 Aug 2010 18:52:55 +0000 (18:52 +0000)]
In .Bd -literal, break the output line after the last element of each
input line, not after the first element. Since free-form text lines
only have a single element in literal mode, this is only relevant for
macro lines inside literal displays, and only for those containing
more than one macro. Fixes e.g. awk(1) and boot_config(8).
Note this fix differs from what kristaps@ committed to bsd.lv because
those changes introduce regressions with respect to blank lines in
literal mode.
With permission from deraadt@ to still fix bugs in mandoc.
matthew [Wed, 4 Aug 2010 18:29:43 +0000 (18:29 +0000)]
Add missing brace.
ok deraadt@
kettenis [Wed, 4 Aug 2010 18:25:24 +0000 (18:25 +0000)]
Revert previous since it makes the tests fail.
millert [Wed, 4 Aug 2010 18:24:50 +0000 (18:24 +0000)]
Add missing #ifndef YY_NO_INPUT around the input() function when
"%option noinput" is specified. OK deraadt@
jordan [Wed, 4 Aug 2010 18:11:55 +0000 (18:11 +0000)]
Remove unused code, conditional in fixup node was never true
ok deraadt
deraadt [Wed, 4 Aug 2010 18:09:45 +0000 (18:09 +0000)]
fixup keylength for aes-128-cbc in quickmode
from mikeb
millert [Wed, 4 Aug 2010 18:08:13 +0000 (18:08 +0000)]
Update to tzdata2010k from elsie.nci.nih.gov
OK deraadt@
deraadt [Wed, 4 Aug 2010 17:50:38 +0000 (17:50 +0000)]
Print annoying stuff when re-posting the video, so that people will
eventually want to remove their video cards from the list here.
ok kettenis
kettenis [Wed, 4 Aug 2010 17:35:39 +0000 (17:35 +0000)]
Print supported sleep states.
ok marco@, phessler@, deraadt@
jsg [Wed, 4 Aug 2010 17:10:34 +0000 (17:10 +0000)]
Correct a problem reported by Holger Mikolon that turns out to be
a bug in the initial EP80579 commit from dms that was exposed by gcc4.
Lots of help tracking down the block of code at fault from
Mike Belopuhov, but I spotted the problem in the end :)
ok kettenis@ deraadt@
sthen [Wed, 4 Aug 2010 16:47:01 +0000 (16:47 +0000)]
Print the MTU in OSPF dd packets. Borrowed from the ospf6 printer.
ok claudio@ deraadt@
deraadt [Wed, 4 Aug 2010 16:29:42 +0000 (16:29 +0000)]
activate function for suspend/resume; tested by mcbride
halex [Wed, 4 Aug 2010 07:07:41 +0000 (07:07 +0000)]
Set an appropriate To: header in /var/mail/$user which is copied from
/var/mail/root
idea and first version from deraadt@, ok deraadt@ krw@
djm [Wed, 4 Aug 2010 06:08:40 +0000 (06:08 +0000)]
clean for -Wuninitialized
djm [Wed, 4 Aug 2010 06:07:11 +0000 (06:07 +0000)]
Support CA keys in PKCS#11 tokens; feedback and ok markus@
guenther [Wed, 4 Aug 2010 06:06:31 +0000 (06:06 +0000)]
Add the new kqueue+rfork test, but disable the tests that use RFMEM
as they don't work right now
guenther [Wed, 4 Aug 2010 06:05:26 +0000 (06:05 +0000)]
Regression test for the recent rfork+kqueue fix
guenther [Wed, 4 Aug 2010 05:57:21 +0000 (05:57 +0000)]
tun* interfaces are now automatically destroyed on last close when
originally created by opening /dev/tun*
guenther [Wed, 4 Aug 2010 05:55:29 +0000 (05:55 +0000)]
Confirm that a NOTE_EXIT knote is delivered when the child exits
Fix a C thinko
djm [Wed, 4 Aug 2010 05:49:22 +0000 (05:49 +0000)]
commited the wrong version of the hostbased certificate diff; this
version replaces some strlc{py,at} verbosity with xasprintf() at
the request of markus@