sym(4): Use memcpy(9) instead of bcopy(9)
The overlap handling of bcopy(9) is not required in these cases.
Obtained from: BSD-licensed Linux sym53c8xx driver
(cherry picked from commit c8e9479c74a2af0f6c665e930091c163bf760fd5)
sym(4): Provide a DEVICE_DETACH(9) method
This also fixes sym_cam_free() to tear things down correctly, i. e. in
opposite order of setup, as well as sym_cam_attach() to not free devq
and SIM twice in the failure case.
(cherry picked from commit 518c01b31e96bbe8353a551885a61e7da6aed5f6)
sym(4): Map HCB memory as uncacheable also on x86
As part of making the chip-specific mix and match of different accesses
(DMA/bus space) work as desired, the intent is to map the HCB memory as
uncacheable. Prior to VM_MEMATTR_*, the !x86 way of indicating this to
bus_dmamem_alloc(9) was BUS_DMA_COHERENT. Then later on in 2db99100a4,
BUS_DMA_NOCACHE was hooked up to VM_MEMATTR_UNCACHEABLE for x86. As it
turns out, still as of today bus_dmamem_alloc(9) differs in this regard
across architectures. On arm, it still supports BUS_DMA_COHERENT only
for requesting uncacheable DMA and x86 still uses BUS_DMA_NOCACHE only.
On arm64 and riscv, BUS_DMA_COHERENT seems to effectively be an alias
for BUS_DMA_NOCACHE.
Thus, allocate the HCB memory with BUS_DMA_COHERENT | BUS_DMA_NOCACHE,
so we get uncacheable memory on all architectures including x86 and so
loads and stores from/to HCB won't get reordered. However, even on x86
we still need to use at least compiler barriers to achieve the desired
program order.
[12 lines not shown]
style(9): white space after ; and around binary operators
in for() loops. Also, use 'while', where only the
conditional test of 'for' was used.
Reviewed by: sjg
(cherry picked from commit 0050289464fa56ec79e060b8d8378b9ff7145a0e)
vt.4: Sprinkle mdoc macros
Now that we have angle bracket characters for all common display sizes,
sprinkle in the correct macros for the structures in this page. While
here, fix a mdoc typo, a linter warning, and switch a parenthetical to
a much smoother appositive.
MFC after: 3 days
Fixes: 7cd6da268a8f (vt.4: Style pass)
(cherry picked from commit a97ed3a39c1044dd1b8056d68a76de74821f2bff)
contrib/spleen: Update to 2.2.O
This release adds several new characters critical to the manual pages
that were previously missing on high-dpi displays: em-dash, en-dash,
hyphen, angle brackets, white square, dagger, and double dagger. It
also features improved alignment for numerous characters in different
sizes.
Thanks: Fredric Cambus
MFC after: 3 days
Discussed with: emaste
(cherry picked from commit 0d602f923ed8a889c3a848ab9f19aa52f917f6ee)
INDEX.fonts: Minor maintenance
+ Mention relevance of this file in the vt manual screen.font entry
+ The vidfont manual is in section one, not eight
+ Remove leftover blank line from freebsd tag removal
MFC after: 3 days
(cherry picked from commit 1f5795b6422a1c6e4b71fd7e93717522ccb822f9)
termios.4: Cross-reference stack(9) for STATUS
If the kernel is built without stack(9) (options STACK),
then the mentioned sysctl(8) kern.tty_info_kstacks will not be found.
MFC after: 3 days
Reviewed by: kib, ziaee
Differential Revision: https://reviews.freebsd.org/D54701
(cherry picked from commit fd34f549b711f0481336a838a99af710ab24644a)
wc: Fix usage and manual SYNOPSIS + nits
The -c and -m flags are mututally exclusive. Also minor manual fixes:
+ Angle quotes do not work in prose, use double quote matching extant
+ Align manual page options list
+ Tag SPDX license identifier for manual
PR: 292408
MFC after: 3 days
(cherry picked from commit 4cb65fde79a2412558d10fdbf3427fc0e4536d80)
cxgbe.4: Update for recent HARDWARE
Adjust document description, description section, and hardware section
to include Chelsio T7. Since this driver now supports many generations,
order reverse chronologically. Compare language to ice.4 and bnxt.4,
the other terabit ethernet drivers.
This list of HARDWARE is obtained from the Chelsio prouduct selector.
MFC after: 3 days (T7 support shipped with 15.0)
Discussed with: jhb, np
Differential Revision: https://reviews.freebsd.org/D54276
(cherry picked from commit 03e1605cdf17c48d5e0d6d42a9f15b78b3b7adb0)
manuals: Correct some sysctl markup
This enables additional searching the manual by sysctl variable.
This syntax is standardized in style.mdoc(5).
Reported by: bapt
MFC after: 3 days
(cherry picked from commit 75866d71e8d93fe1a1ff469b8a9c6c6c9908a6c8)
cxgbe(4): sysctl to disable/enable the TCB cache
The TCB cache can be enabled/disabled at any time on the T7 and this
commit adds a sysctl to do that. This is for debug only.
# sysctl dev.chnex.0.misc.tcb_cache=0
# sysctl dev.chnex.0.misc.tcb_cache=1
MFC after: 1 week
Sponsored by: Chelsio Communications
nfscl: Fix handling of case insensitive file systems
Name caching must be handled somewhat differently
for case insensitive file systems. Negative name
caching does not work and, for rename, all names
associated with the rename'd vnode must be disabled.
For a case insensitive ZFS file system that is exported,
the unpatched code did work, since the change in mtime
or ctime of the directory when other case names were
created or rename'd would disable the false name cache
hit. However, an export of an msdosfs file system
breaks the NFS client, because it only works if ctime/mtime
is changed whenever a name is added/removed. Depending
on what the server file system is, this may not happen,
due to clock resolution or lack of support for these
attributes.
This patch checks to see if the server file system is
[9 lines not shown]
nfsd: Fix handling of attributes during Open/Create/Exclusive_41
When an NFSv4.n client specifies settings for attributes other
mode during a Open/Create/Exclusive_41, these other attributes
were not being set.
This patch resolves the problem by calling nfsrv_fixsattr()
after the VOP_CREATE() call in nfsvno_open() for this case.
There is no extant NFSv4.n client that currently does this,
as far as I know.
(cherry picked from commit 4fc11c92d324c9099ecc28f25a96591a2ff6105c)
diff: Report I/O errors in Stone algorithm
In the legacy Stone algorithm, we do a first pass over the files to
check if they're identical before we start diffing them. That code
would correctly set the exit status if an I/O error was encountered,
but would not emit an error message. Do so.
PR: 292198
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: thj
Differential Revision: https://reviews.freebsd.org/D55125
bhyve/virtio: check negotiated_caps for indirect descriptor support
vq_getchain() erroneously checked vc_hv_caps for indirect descriptor
support when it encountered an indirect descriptor. vc_hv_caps is used
in feature negotiation to advertise what features our device emulation
supports, but we should really check what features we have negotiated
with the driver.
Reviewed by: corvink
Differential Revision: https://reviews.freebsd.org/D53465