Section 2.4.3 of the UVC 1.5 class specification states that the bulk
endpoint only supports the alternative setting of zero, which is the
default stream, and which is switched at uvideo_attach_hook.
Inside uvideo_vs_close, the code uses the same switch to the alternative
setting of zero to turn off the cam LED.
The additional uvideo_vs_set_alt inside uvideo_vs_open turns off the cam
LED in the case of the bulk endpoint cam. I see this behavior on both
available bulk endpoint cams: it flashes the LED flashes after ffplay
starts, and looks like it was turned off.
OK mglocker@ kn@
removal of shadow timer, cookie configuration, updates to WMI and
start of updates for buffer handling. This brings us forward:
qwz0: wcn7850 hw2.0 fw 0x100301e1 address xx:xx:xx:xx:xx:xx
qwz_dp_htt_htc_t2h_msg_handler: htt event 48 not handled
regdb, which the firmware did not like. This adjusts the way we load
and cache FW, and places the right data for the chip. This allows the
WLAN FW to boot up properly.
range of DeviceIDs we can set up for translation.
Peripherals capable of doing DMA/MSIs are supposed to show up with
unique DeviceIDs. The Device Table maps the DeviceID to a Interrupt
Translation Table. So far we only used a single contiguous block for
the Device Table, but on some machines this does not cover the whole
range of physical devices. Using the GIC's indirect mode allows to
move to a two-level setup to increase the range.
ok kettenis@
agintcmsi(4) from attaching in this case such that an upcoming change
to make it work (with DTB) on this hardware doesn't break the initial
install.
ok patrick@
Without usbd_get_xfer_status the code is built on the assumption that
usbd_transfer always reads dwMaxPayloadTransferSize bytes from a device.
If this assumption doesn't hold, it produces broken frames which has
unexpected zeros.
OK mglocker@ kn@
even if we miss the press event. Change the driver such that wakeup is
signalled when the button is pressed such that it matches what happens
when wakeup is handled by the PMIC.
ok patrick@
So make sure that sleep_signal_check() returns ERESTART in that case so
that the syscall is retried once ptrace intercepted the signal.
This should fix unexpected EINTR returns of waitpid for precesses that
left SIGCHLD ignored (default). Not the perfect fix but a good enough
bandaid to allow people to debug processes doing forks and waitpid calls.
Problem reported and fix tested by stsp@
OK kettenis@ stsp@
No locks required for per-CPU counters based protocol statistics.
Atomically accessed `udpctl_vars' variables are already moved from the
net lock, sysctl(2) related locks are useless for them.
Complicated UDPCTL_BADDYNAMIC and UDPCTL_ROOTONLY cases were left as is.
ok bluhm
Keep locking only for ICMPCTL_REDIRTIMEOUT case. It is complicated, so
left it as is.
ICMPCTL_STATS loads per-CPU counters into local data, so no locking
required.
`icmpctl_vars' are atomically accessed integers. Except `icmperrppslim'
they are simply booleans, so nothing special required. Used the local
`icmperrppslim_local' variable to load `icmperrppslim' value because it
it could have negative values. claudio@ proposed to always load such
values to local variables, so I want to try this notation.
ok bluhm
Both `gre_allow' and `gre_wccp' are atomically accessed integers. They
could have only '0' and '1' values, so no extra dances around
atomic_load_int(9) required.
ok bluhm
Run without kernel lock. Use the network stack functions used for
multiqueue, but still only run on one queue.
Add a virtio interface for an interrupt barrier.
This is the reverted diff plus a missing chunk.
Tested by dtucker, bluhm, sf
vfs_busy() uses RW_SLEEPFAIL in a broken way. It is possible that the
object holding the rwlock is freed while other processes are sleeping
on this lock. This worked before by luck and no longer does now since
part of the struct needs to be updated after the sleep.
vfs_busy() needs to be fixed but that will take a bit of time.
OK dlg@
Reports the % of the available UPS power drawed by output outlets.
tested by sthen@, matthieu@ and Walter Alejandro Iglesias
ok sthen@ as part of a larger diff
Jabra PanaCast 20 needs uvideo_vs_negotiation between usbd_set_interface
and usbd_open_pipe, otherwise it doesn't work with error:
ioctl VIDIOC_DQBUF: Invalid argument
OK mglocker@
turns out the __thrsleep and __thrwakeup syscalls largely coordinate
using a single lock per process. if you have heavily threaded code
building locks in userland out of thrsleep, this kernel lock gets
hammered. this is true even if userland thinks it's operating on
separate locks, it all ends up serialised in the kernel. this reduces
the throughput of these heavily threaded programs.
the big change is hashing thrsleep waiters into an different
locks/lists based on their "id" to try and avoid all locks in a
process contending on a single lock. the hash is shared by all
processes though.
the change also avoids having a waiter re-take the lock to avoid
contention on the thrwakeup code which is currently holding the lock.
__thrsleep and __thrwakeup seem to be largely unused these days,
except by go. go still uses it as a backend to it's locks, and also
creates a lot of threads which end up contending on the lock. these
changes provide an improvement for go programs.
the contention was pointed out by nick owens
jsing@ and nick owens did a bit of testing
In pte_insert(), if both the primary page table entry group and the
secondary pteg are full, then we delete an old pte and replace it with
the new pte. We might have set "idx" wrong and inserted the new pte
into the wrong pteg (with the wrong PTE_HID bit). This problem almost
never happened; it is rare for both ptegs to be full.
When the loop "for (try = 0; try < 16; try++)" looks for a slot for
the new pte, set "idx" to the new pte's primary pteg. Put it in the
primary pteg "idx" or secondary pteg "idx ^ pmap_ptab_mask". When we
delete the old pte, set "idx" to the old pte's primary pteg.
Eric Gosse reported a bug where the kernel crashed on an unexpected
fault. I suspect that a pte fell into the wrong "idx" and got lost.
ok kettenis@