video(4): add extended controls and remaining V4L2 compat symbols
Add the extended control interface
Values match the reference ABI; the new struct layouts are pinned
with static assertions.
Reported by: thierry
Reviewed by: adrian, thierry
Differential Revision: https://reviews.freebsd.org/D59496
intel: add hfsts debug-probe driver for Intel ME/HECI firmware status
Add an amd64-only, Intel-only diagnostic driver that reads ME Host
Firmware Status registers from PCI configuration space without mapping the messaging BAR.
Select the HFS register count per device generation, decode sparse
HFS1 state, mode, and error fields, and expose raw and summarized
status via sysctl. Register an ISA-side hfstsfd probe for supported
RCBA/FD2 generations so firmware-hidden HECI functions can be diagnosed.
Reviewed by: kbowling, adrian
Differential Revision: https://reviews.freebsd.org/D58863
iw_cxgbe: Remove unused return value from destroy_cq
Part of the original Linux commit was already applied during a prior
OFED update in commit b633e08c705fe43180567eae26923d6f6f98c8d9, but
this portion of the changes to the Linux iw_cxgb4 driver were not
included.
Obtained from: Linux commit a52c8e2469c30cf7ac453d624aed9c168b23d1af
iw_cxgbe: Fix qpid leak
Add await in destroy_qp() so that all references to qp are dereferenced
and qp is freed in destroy_qp() itself. This ensures freeing of all QPs
before invocation of dealloc_ucontext(), which prevents loss of in use
qpids stored in the ucontext.
Obtained from: Linux commit f70baa7ee3d1b5a9e66ac7549e31641a656f23c1
Sponsored by: Chelsio Communications
iw_cxgbe: Miscellaneous changes from the iw_cxgb4 driver
These include changes to use newer APIs, cosmetic changes to reduce
diffs between the two drivers, and other minor fixes.
Sponsored by: Chelsio Communications
Co-authored-by: Arjun V <arjun at chelsio.com>
Co-authored-by: Krishnamraju Eraparaju <krishna2 at chelsio.com>
Co-authored-by: Vishal Kulkarni <vishal at chelsio.com>
iw_cxgbe/libcxgb4: Pass ftid_base to libcxgb4 through status page
While here, fix incorrect frees in error paths in c4iw_alloc_context().
Sponsored by: Chelsio Communications
cxgbe: Enable RDMA WRITE_CMPL work requests if the firmware supports them
This work request permits combining RDMA WRITE and SEND_INV commands
into a single work request.
Sponsored by: Chelsio Communications
libcxgb4: remove update_qp_state()
Remove it because it is not needed. If we're flushing the qp, it is
because we've had a fatal error, so just set the user qp state to ERR
and continue on.
Sponsored by: Chelsio Communications
iw_cxgbe/libcxgb4: Support for RDMA WRITE_COMPL work requests
To optimize NVME-oF READ IOPs, use a specialized work request that
combines a RDMA WRITE and SEND_INV chain into a single request.
Sponsored by: Chelsio Communications
Co-authored-by: Potnuri Bharat Teja <bharat at chelsio.com>
iw_cxgbe: use __raw_write*() to allow write-combining
pio_copy() is suppose to be used for write-combining work requests.
However, for some architectures like powerpc and arm64, write[ql]()
include an explicit memory barrier which will flush the WC buffer and
render this path useless. To prevent that use the relaxed variant.
Sponsored by: Chelsio Communications
iw_cxgbe: Various fixes around waiting for replies to work requests
Allocate wait objects dynamically and add a refcount instead of
allocating them on the current thread's stack. This permits
c4iw_wait_for_reply() to safely fail with an error and mark the device
as dead if a reply is not received after C4IW_WR_TO seconds. Once a
device is marked dead, future requests fail immediately.
Sponsored by: Chelsio Communications
libcxgb4: Support send/recv drain work requests
This change allows libcxgb4 to post send/recv drain work requests
after a QP is flushed and schedules a CQE on the software CQ for the
application to note the drain's completion.
Sponsored by: Chelsio Communications
iw_cxgbe: Fixes around work queue flushing and draining
- Only insert drain CQEs if a work queue is flushed
- Preserve the request opcode of the original request when flushing a
request. Use bit 10 of the CQE header word to indicate the CQE is a
special drain completion, and save the original WR opcode in the cqe
header opcode field.
- If a work request chain was posted and needed to be flushed, only
the first request in the chain was completed with FLUSHED status.
The rest were never completed.
- When a CQ is shared by multiple QPs, c4iw_flush_hw_cq() needs to
acquire the corresponding QP lock before moving the CQEs into its
corresponding SW queue and accessing the SQ contents for completing
a WR.
- Once a user QP has been flushed, it cannot be flushed again.
[3 lines not shown]
iw_cxgbe/libcxgb4: Support 64B CQEs
The larger CQE exports the RSS header to userspace. Note that this
changes the ABI between the driver and library, so the ABI version is
bumped. A new user->kernel create_cq request message is defined to
disallow a CQE size mismatch between iw_cxgbe and libcxgb4.
Sponsored by: Chelsio Communications
Co-authored-by: Steve Wise <swise at opengridcomputing.com>
riscv: Preserve savectx return address with vector support
Calling vector_state_store_savectx() overwrites ra with the address of
the following ret instruction. The ret consequently branches to itself
and prevents kernel dumps from progressing past dump_savectx().
Tail-call vector_state_store_savectx() so that it returns directly to
the original savectx() caller.
Reviewed by: br, jrtc27
Approved by: jrtc27
Fixes: d7a393095cfd ("riscv: Vector Extension (RVV) support.")
Sponsored by: FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D59689
bhyve: tpm: allow the last dword of the CRB command buffer
The bounds check rejected any access ending exactly at the end of the
register block, so a four byte write at offset 0xffc was refused,
returning EINVAL and killing the VM.
MFC after: 1 week
PR: 291063
Fixes: 75909086a45d ("bhyve: allow read/write to full CRB buffer")
Sponsored by: Defenso
Signed-off-by: Quentin Thébault <quentin.thebault at defenso.fr>
Reviewed-by: aokblast, kevans, markj
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2362
ntb_tool: Bound memory window option strings
parse_mw_buf() copies option names from privileged sysctl input into
eight-byte stack buffers. Unbounded %s conversions permit option tokens
longer than seven bytes to write past those buffers before the parser
validates them.
Limit each conversion to seven characters, leaving space for the
terminating NUL.
Signed-off-by: Yudi Yang <yudi.yang at rice.edu>
Fixes: 96f556f5044a ("NTB Tool: Test driver for NTB hardware drivers.")
Reviewed by: markj
MFC after: 1 week
snd_uaudio: Read the UAC2 sample rate back after setting it
Some devices only apply a new sample rate once it has been read back,
and produce no sound at all otherwise.
PR: 294803
Reported by: tatsuki_makino at hotmail.com
Tested by: tatsuki_makino at hotmail.com
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D59616
linuxkpi: Compile `x86_match_cpu()` on amd64 and i386 only
This fixes the build on other architectures where `struct x86_cpu_id` is
unavailable.
Sponsored by: The FreeBSD Foundation