stand: Teach the zfs loader about dynamic gang headers
There is a pool feature, dynamic_gang_header, that is enabled by default
in new pools. When this feature is active, gang headers may be larger
than 512 bytes. The loader needs to be taught to cope with that.
Try using the vdev ashift to pick the gang block header size. If the
checksum fails, fall back to the old gang block header size.
This is based on a patch by Paul Dagnelie, with testing, bug-fixing and
some simplifications from me.
Approved by: re (cperciva)
PR: 289690
Co-authored by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53578
[2 lines not shown]
cxgbe(4): Expanded interrupt handling for T7
- Catch up with the new cause/perr registers. The high level approach
is the same but the T7 has an extra top level INT_CAUSE concentrator
and a PERR_CAUSE concentrator with a changed layout.
- Add various flags to control the interrupt handlers' behavior.
- Implement a t4_intr_clear that internally use the slow handler as an
iterator over known cause/perr registers. This lets the driver clear
all of the interrupt sources that it knows about. The firmware sets
up the interrupt enables and clears the causes normally so this call
should be redundant.
MFC after: 1 week
Sponsored by: Chelsio Communications
mmc_fdt: handle broken-cd property
The documented properties [1] for card-detection are one of:
- cd-gpios
- non-removable
- broken-cd
In cd_setup() we handle the first two, but not the latter, resulting in
a silently undetected card on an affected system.
To work around this, force cd_disabled when broken-cd is specified, so
that the card detect helper function gets to run. A more complete
solution would implement some kind of polling mechanism to detect the
card's presence or removal.
Some variants of the Allwinner D1, such as the Lichee Rv, specify this
property in the mmc0 device node.
[1] sys/contrib/device-tree/Bindings/mmc/mmc-controller.yaml
[9 lines not shown]
uart: provide and use default rclk for JH7110 UART
A regression in the u-boot-provided JH7110 device tree leaves the uart
incorrectly configured.
The issue arises when a baud rate is specified ('current-speed'
property), but the rclk value is not ('clock-frequency'). Previous
releases, e.g. v2025.04, provided both.
The alternative way to retrieve this value is to query the parent clock,
but our clk framework is not available during early console probing and
configuration.
In this instance, we end up defaulting to DEFAULT_RCLK in ns8250_init(),
which is the wrong value. The relevant uart class (uart_snps) should
provide a default rclk in its definition, but it does not. Add a new
variant class with the correct default rclk of 24000000.
Finally, uart_cpu_fdt_probe() needs to be updated to actually query this
[11 lines not shown]
arm64: Fix calculating kernel size for preload metadata
Cast &end to vm_offset_t before subtracting VM_MIN_KERNEL_ADDRESS to
ensure the resulting size is correct for PRELOAD_PUSH_VALUE.
Previously the correct size was effectively divided by sizeof(void *).
Reviewed by: andrew
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D53699
sound: Retire SND_DIAGNOSTIC PCM locking macros
Disabled by default, but also redundant, since most of the errors they
catch will be caught anyway by WITNESS and the locking subsystem.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D53735
sound: Do not use double pointer in dsp_io_ops()
No reason to do so.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D53734
sound: Remove unnecessary uio checks in dsp_io_ops()
uiomove_faultflag() takes care of that already.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D53733
stand: Teach the zfs loader about dynamic gang headers
There is a pool feature, dynamic_gang_header, that is enabled by default
in new pools. When this feature is active, gang headers may be larger
than 512 bytes. The loader needs to be taught to cope with that.
Try using the vdev ashift to pick the gang block header size. If the
checksum fails, fall back to the old gang block header size.
This is based on a patch by Paul Dagnelie, with testing, bug-fixing and
some simplifications from me.
PR: 289690
Co-authored by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53578
(cherry picked from commit 4d6801a6b5bdd4d055a00484a743cb4ada659669)
sound: Retire OLDPCM_IOCTL
It is defined by default, and there is no reason to have a switch for
it. While here, also get rid of some unnecessary comments and ioctl
definitions.
No functional change intended.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
cuse: Fix cdevpriv bugs in cuse_client_open()
If devfs_set_cdevpriv() fails, we will panic when we enter the
cuse_client_free() callback, for a number of reasons:
- pcc->server is not yet assigned, so we'll use a NULL pointer.
- pcc has not yet been added to the pcs->hcli TAILQ, but we'll try to
remove it.
- pccmd->sx and pccmd->cv are not yet initializated, but we'll try to
destroy them.
Even if we'd get past all these somehow, we'd still get two errors in
the devfs_set_cdevpriv() failure block:
- We'll unref the server twice, once in cuse_client_free(), and again in
cuse_client_open().
- A double-free panic, since we'd be trying to free(pcc), which has
already been freed in cuse_client_free().
[7 lines not shown]
ministat: Clean up usage message, manual page, and chameleon
In the manual page:
- Fix synopsis and use better argument names
- Improve description of flags.
- In EXAMPLES, list the contents of iguana and chameleon files.
- Use Rs to reference The Cartoon Guide to Statistics
- Fix misc indentation and style issues
- Tag SPDX
MFC after: 1 week
Reviewed by: bcr, ziaee
Differential Revision: https://reviews.freebsd.org/D53710
apm(8): Drop MLINK to apmconf(8)apmconf(8) was merged into apm(8) back in 2000 and this note and MLINK
were added as a transition aid, but that aid is no longer needed.
cxgbe(4): T7 related updates to shared code
- Avoid some more registers with read side-effects during regdump.
- mps_tcam_size is 3x the size of T6/T5.
- Update rss_rd_row to work with T7.
Obtained from: Chelsio Communications
MFC after: 1 week
Sponsored by: Chelsio Communications
cxgbe(4): Add support for QSFP-DD connector and 400G transceivers
Tested with SR8 and DR4 transceivers.
MFC after: 1 week
Sponsored by: Chelsio Communications
libpfctl: fix error handling
In two cases we returned E2BIG where it should have been a boolean ('false').
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit 9bb1c46b4c38c44565fc24f13acdc19b0cb5a1c4)
tarfs: Fix support for large files
* When fast-forwarding through a zstd frame, we incorrectly used the
min() inline function instead of the MIN() macro. The function
truncates the result to unsigned int, resulting in a decompression
error when trying to seek more than 4 GB into the frame.
* POSIX states that a size extended header record overrides the size
field in the header if present, and that one must be included if the
size of the file exceeds 8 GB (the size field maxes out at 64 GB).
* Reduce repetition in the exthdr parser by deduplicating the syntax
error handler.
MFC after: 1 week
Sponsored by: Klara, Inc.
Fixes: 69d94f4c7608 ("Add tarfs, a filesystem backed by tarballs.")
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D53718