Offsets for ISOCHRONOUS IN frames are now based on a fixed packet size
(xfer->length / xfer->nframes), ensuring accuracy even with shorter frames.
OK: mpi@
Some invalid frames or frames with an error flag from the camera might be
essential for a stream consumer for synchronization and other purposes.
Without this, the consumer may be unable to synchronize the stream or play
it at all.
Instead of skipping frames that the driver considers incorrect, this change
forwards them to the V4L consumer with the V4L2_BUF_FLAG_ERROR flag set,
allowing the consumer to decide whether to skip the frame or use parts of it.
The behavior for non-mmap consumers remains unchanged, and error frames
are still skipped by the driver.
This change fixes the integrated camera on:
- ThinkPad T14 Gen 5
- ThinkPad X1 nano 2
- Lenovo x13
Plus made progress with support of Elgato HD60 S+
OK: mglocker@
Some invalid frames or frames with an error flag from the camera might be
essential for a stream consumer for synchronization and other purposes.
Without this, the consumer may be unable to synchronize the stream or play
it at all.
Instead of skipping frames that the driver considers incorrect, this change
forwards them to the V4L consumer with the V4L2_BUF_FLAG_ERROR flag set,
allowing the consumer to decide whether to skip the frame or use parts of it.
The behavior for non-mmap consumers remains unchanged, and error frames
are still skipped by the driver.
This change fixes the integrated camera on:
- ThinkPad T14 Gen 5
- ThinkPad X1 nano 2
- Lenovo x13
Plus made progress with support of Elgato HD60 S+
OK: mglocker@
mappings from the respective ACPI tables.
This patch is an adaptation from a NetBSD commit spotted by patrick@:
575554bd38
Tested and ok kirill@, kettenis@
Lines are logged using a single function call, which makes the sources
easier to read and reduces the binary size. Debug strings that would
be too difficult to produce with snprintf(3) are simplified.
On accept(2), httpd(8) sets the timeout based on ip:port. Once we have
parsed the http headers we can find the name-based server block and
apply its request timeout.
Problem identified and fix from Nick Owens, thanks!
OK tb
Fixes the short noise when playback of unsigned samples stops. We've
to call enc_sil_do() instead of padding with 0 (0 doesn't represent
silence for unsigned encodings).
Mostly from gkoehler@
"The Mach kernel has a builtin kernel debugger (kdb) based on adb"
Mach: A New Kernel Foundation For UNIX Development, USENIX Summer 1986
"The new kernel debugger has most of the features of the old kdb, but
with a more rational (gdb-like) syntax."
Mach 3.0 (mk83), ddb.man
Mark W. Eichin explains how ddb came to be in 386BSD 0.1 in
a June 1992 post to comp.unix.bsd
https://groups.google.com/g/comp.unix.bsd/c/LY3hbHwjdG0/m/ca1hS0Hp5HcJ
comp.unix.bsd and was part of the 0.2.2 patchkit. The first two commits
to NetBSD were 386BSD 0.1 and the 0.2.2 patches.
uk.c did not appear till NetBSD 1.0.
ok miod@
I admit this is unusually long for a manual page. But that's not my fault
as a documentation author. An example in a manual page ought to be minimal
to show what needs to be demonstrated, and this example is minimal in that
sense. Making it shorter without loosing important aspects does not seem
possible.
When an API is poorly designed, one of the consequences is that that
documentation becomes harder to understand and often longer - in this
case to the point of becoming outright intimidating. If people dislike
that, they should design better APIs in the first place rather than
blasting the poor manual page for being too long or too complicated.
OK tb@
This was the list where PCBs were temporary linked to avoid sleep with
`inpt_mtx' mutex(9) held. in_pcbnotifyall() and in6_pcbnotify are the
last list users, so switch them to in_pcb_iterator() too, moreover they
already do in_pcb_is_iterator() check.
Note, in_pcb_iterator() does necessary reference couter handling,
unlocked `inp' dereference is safe.
ok bluhm
virtio 1.x requires that all queue setup, including the queue interrupt
vector, is done before setting the queue_enable register to 1. This
conflicts with how we do things right now:
* We implicitly make queue setup in virtio_alloc_vq(), which is called
from the child driver attach functions. This also sets queue_enable=1.
* Later, we allocate the interrupts and set the queue interrupt vectors
in the second half of the virtio transport attach functions.
This is a violation of a MUST from the standard and causes problems with
some hypervisors, in particular those that have no virtio 0.9 support,
which has no such ordering requirements.
To fix this:
* Move the interrupt allocation to a new virtio_attach_finish() function.
This does all queue setup, including the interrupt vectors.
* Don't call virtio_setup_queue() in virtio_alloc_vq() anymore.
* We can also move the setting of the DRIVER_OK flag into this function.
virtio_attach_finish() must be called before using any virtqueue or
writing any virtio config register.
While there,
* also streamline the attach error handling in all drivers.
* skip initially setting sc_config_change to NULL, the softc is
initialized to 0.
ok jan@
tested by bluhm@
with an unsupported control command, return -1 rather than 0
to the caller to indicate the error because in general, these
control hooks ought to return -1 for unsupported control commands
and 0 for other errors, for example other invalid arguments.
Not a big deal because this change does not change when operations
succeed or fail, and because callers are unlikely to pass unsupported
control commands in the first place. The only functional change is that
if a calling program inspects the ERR(3) stack after this failure,
it will now find the correct error code rather than nothing.
Even that wasn't a huge problem because for most EVP_CIPHER control
failures, getting no reason for the error is the usual situation.
Then again, giving the reason when easily possible may occasionally
be useful. OpenSSL also returns -1 in this case, so it also helps
compatibility a tiny bit.
Found while auditing the return values of all the EVP_CIPHER
control hooks in our tree. This was the only fishy one i found.
OK tb@
In tcp_mss_adv() max(9) was used to guarantee that mss it not too
small. Unfortunately max() uses u_int and mss could get negative
in some error conditions.
Rearrange the code to directly return in case of errors. Also read
tcp_mssdflt only once to head towards atomic integer sysctl.
OK mvs@
. uvm_pagewait(): do not require an exclusive lock to release it & sleep
. uvm_page{de,}activate(): lists updates are serialized by the `pageqlock' mutex
More assertions could be relaxed but only those 3 are necessary for running
the lower fault handler in parrallel.
ok miod@
With this change, any line is logged using a single function call
(instead of one function call per logged token). This makes the
sources easier to read and reduces the binary size. Debug strings that
would be too difficult to produce with snprintf(3) are simplified.
ok tb, dlg
algorithm-independent EVP_EncryptInit(3) manual as another step
in making the latter leaner and more palatable.
As a side benefit, the new EVP_aes_128_ccm(3) manual page may provide
a better fighting chance to programmers who see themselves forced to
support CCM for whatever reason. It documents the mandatory, but so
far undocumented EVP_CTRL_CCM_GET_TAG control command and makes the
description of the three EVP_CTRL_CCM_SET_* control commands and the
numerous related quirks more precise.
Make proper use of CBB and CBS. If a CBS ever owns data, you're holding
it wrong. Ditch gross macros, sscanf, and globals. The use of fgets is
annoying here, so replace it with getline, which be provided by portable
if needed.
Most importantly, make the tests actually signal failure rather than
only printing an error. Fix the state machines in a few of them. Some
tests didn't parse the .txt file at all. Others mostly did but didn't
actually test what they were supposed to be testing. Such failures
were hidden by the way the tests were written.
This basically needed a complete revamp. It still isn't pretty and much
of it could be deduplicated, but I only have so much time alotted on this
blue planet.
Only unlock soreceive() path, somove() path still locked exclusively. Also
exclusive socket lock will be taken in the soreceive() path each time
before pru_rcvd() call.
Note, both socket and `sb_mtx' locks are held while SS_CANTRCVMORE
modified, so socket lock is enough to check it in the protocol input
path.
ok bluhm
This is the statistics implemented with per-CPU counters and the
`carp_opts' array of atomically accessed integers.
Replace the `carp_opts' array with individual `carpctl_*' variables
and use sysctl_bounded_arr() instead of sysctl_int(). Keep current
`carpctl_*' variables bounds as is, they would be adjusted with
separate diff.
ok bluhm
This should not have any functional difference on existing setups, as
so far any time this function would have been used, it would have led
to a kernel panic as it's been a NULL pointer.
This fixes bootup on the MNT Reform2 with the RK3588 module.
ok kettenis@
In some cases, following a fallback from RRDP to RSYNC, files are
moved to the wrong place. With this change, only rsync repositories
are considered when looking up where to move DIR_TEMP files.
repo.c requires more study, this fix might be a bandaid for a problem
not fully understood.
"put it in" claudio@ OK tb@