FreeBSD/src 82a3337usr.sbin/pmc view.cc

pmc: Use isascii(3) to check if a character is ASCII

The previous check did not work on architectures where `char` is
unsigned as noted by GCC on aarch64:

usr.sbin/pmc/view.cc: In member function 'void pmcview::loadsymboltable(image*, Elf*, Elf_Scn*, GElf_Shdr*)':
usr.sbin/pmc/view.cc:627:38: error: comparison is always false due to limited range of data type [-Werror=type-limits]
  627 |                         if (fname[i] < 0) {
      |                             ~~~~~~~~~^~~

Reported by:    GCC 15
DeltaFile
+1-1usr.sbin/pmc/view.cc
+1-11 files

FreeBSD/src 8bea280sys/dev/netmap if_ptnet.c, sys/dev/virtio/network if_vtnet.c virtio_net.h

Revert "vtnet: move offload functions to virtio_net.h to share them"

This reverts commit 44cddaa99dee0a634cf2713f71e799eb41397355.
It breaks the LINT-NOIP config.
DeltaFile
+165-192sys/dev/virtio/network/virtio_net.h
+296-49sys/dev/virtio/network/if_vtnet.c
+3-19sys/dev/netmap/if_ptnet.c
+2-17sys/net/if_tuntap.c
+466-2774 files

FreeBSD/src a793cablib/libusb libusb10_hotplug.c

libusb: Avoid signed integer overflow UB

Instead, just reset next_callback_id to 1 at INT_MAX.  The potential for
duplicate callback IDs remains.

Sponsored by:   The FreeBSD Foundation
DeltaFile
+8-3lib/libusb/libusb10_hotplug.c
+8-31 files

FreeBSD/src 2916ae6usr.sbin/makefs/tests makefs_msdos_tests.sh

makefs: Fix atime tests on MS-DOS (FAT) file systems

On FAT file systems, access time has a resolution of 1 day, so it is
really the access date.

Strip the time component from the epoch timestamp in order to check the
access time.

Reference: https://learn.microsoft.com/en-us/windows/win32/sysinfo/file-times

Reviewed by:    ngie
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54584
DeltaFile
+10-6usr.sbin/makefs/tests/makefs_msdos_tests.sh
+10-61 files

FreeBSD/src 5fece24usr.sbin/makefs zfs.c makefs.8, usr.sbin/makefs/tests makefs_zfs_tests.sh

makefs: zfs: Allow the path vdev property to be set

This allows specifying custom vdev paths (such as GPT labels like
/dev/gpt/...) when creating ZFS filesystem images via makefs(8), rather
than defaulting to /dev/null.

Reviewed by:    markj
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D59031
DeltaFile
+45-0usr.sbin/makefs/tests/makefs_zfs_tests.sh
+21-17usr.sbin/makefs/makefs.8
+9-1usr.sbin/makefs/zfs.c
+1-0usr.sbin/makefs/zfs/zfs.h
+76-184 files

FreeBSD/src 26b921dsys/dev/intel spi_pci.c

intelspi: add Cannon Lake SPI controller IDs

Add PCI device IDs for Cannon Lake-generation LPSS peripheral SPI
controllers.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D58999
DeltaFile
+6-0sys/dev/intel/spi_pci.c
+6-01 files

FreeBSD/src 9fb03ddsys/dev/intel spi_pci.c

intelspi: add Comet Lake SPI controller IDs

Add PCI device IDs for Comet Lake-generation LPSS peripheral SPI
controllers.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D59000
DeltaFile
+6-0sys/dev/intel/spi_pci.c
+6-01 files

FreeBSD/src a3489ccsys/dev/intel spi_pci.c

intelspi: add Broxton SPI controller IDs

Add PCI device IDs for Broxton-generation LPSS peripheral SPI
controllers.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D58997
DeltaFile
+6-0sys/dev/intel/spi_pci.c
+6-01 files

FreeBSD/src 7287754sys/dev/intel spi_pci.c

intelspi: sort PCI ID table by device ID

Sort the existing LPSS peripheral SPI controller PCI ID table by
numeric device ID so new entries have an unambiguous insertion point.

Reviewed by:    wulf
Differential Revision:  https://reviews.freebsd.org/D58996
DeltaFile
+3-3sys/dev/intel/spi_pci.c
+3-31 files

FreeBSD/src 4c998ffsys/dev/intel spi_pci.c

intelspi: add Apollo Lake SPI controller IDs

Add PCI device IDs for Apollo Lake-generation LPSS peripheral SPI
controllers.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D58998
DeltaFile
+3-0sys/dev/intel/spi_pci.c
+3-01 files

FreeBSD/src 76f1421sys/sys libkern.h

libkern.h: remove HAVE_INLINE_* macros

The final consumer of this was OpenZFS, fixed in ffaea0831973 (thanks
mav@). That change has been present in all active OpenZFS release
branches for at least 6 months. These can finally be retired.

Reviewed by:    mav
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55201
DeltaFile
+0-11sys/sys/libkern.h
+0-111 files

FreeBSD/src 3d20f8asys/riscv/starfive jh7110_gpio.c

jh7110_gpio: driver enhancements

Fix reporting of state and capabilities by the gpioctl command.

Support selection of pull-up and pull-down resistors.

Support second gpio device (AON - always on power domain) to allow
attaching gpioled device to visionfive2 status LED or querying boot
selection switches.

Reviewed by:    mhorne
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D58693
DeltaFile
+111-36sys/riscv/starfive/jh7110_gpio.c
+111-361 files

FreeBSD/src 2af2ec5sys/riscv/starfive jh7110_gpio.c

jh7110_gpio: remove unneeded cleanup

Any failure within bus_alloc_resources() will call bus_release_resources();
thus the call is redundant here.

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
DeltaFile
+0-1sys/riscv/starfive/jh7110_gpio.c
+0-11 files

FreeBSD/src 7221614sys/riscv/starfive jh7110_gpio.c

jh7110_gpio: style

- Fix whitespace
- Replace JH7110_GPIO_READ with RD4 (and WR4)
- Trim headers
- Explicit conditional checks
- Use correct method typedefs

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
DeltaFile
+49-52sys/riscv/starfive/jh7110_gpio.c
+49-521 files

FreeBSD/src e2f2b18. ObsoleteFiles.inc

ObsoleteFiles: Add missing headers

The header files for dialog, figpar, dpv were never listed.

PR:             297612
Fixes:          af202a5052b6 ("Retire dialog")
DeltaFile
+7-0ObsoleteFiles.inc
+7-01 files

FreeBSD/src 0c5eb09tools/build/mk OptionalObsoleteFiles.inc

OptionalObsoleteFiles: Add missing headers

The header files for dialog, figpar, dpv were never listed.

Fixes:          bc6c827078b7 ("OptionalObsoleteFiles: Add figpar to dialog section")
(cherry picked from commit acf6518a2d6f33fb56c861861cbad0c0cb56817e)
DeltaFile
+7-0tools/build/mk/OptionalObsoleteFiles.inc
+7-01 files

FreeBSD/src fdf3e57sys/dev/sdhci sdhci_fdt_spacemit.c

sdhci: Remove redundant device_get_softc

Fixes: 550db3d6f502 ("sdhci: Initial support for the SpacemiT K1 sdhci controller")
Reviewed by:    bnovkov
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D59083
DeltaFile
+1-1sys/dev/sdhci/sdhci_fdt_spacemit.c
+1-11 files

FreeBSD/src 97e24b4sys/arm/broadcom/bcm2835 bcm2835_audio.c, sys/contrib/vchiq/interface/vchi vchi.h

vchiq: Merge two commits from Linux

6e474d8e3981 ("staging: vchiq_shim: avoid code duplication") refactors
some code which makes applying the subsequent patch easier.

49bec49fd7f2 ("staging: vc04_services: remove vchiq_copy_from_user")
addresses a user-triggerable integer overflow via the
VCHIQ_IOC_QUEUE_MESSAGE ioctl on /dev/vchiq (which has mode 0600 by
default).  It also addresses insufficient validation of user-controlled
addresses in vchiq_copy_from_user().

Update the bcm2835_audio driver to follow the change to
vchi_msg_queue().

Reported by:    Vicki Pfau
Reviewed by:    Abdelkader Boudih <freebsd at seuros.com>
Tested by:      Abdelkader Boudih <freebsd at seuros.com>
Tested by:      Marco Devesas Campos <devesas.campos at gmail.com>
MFC after:      2 weeks

    [2 lines not shown]
DeltaFile
+165-108sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.c
+41-75sys/contrib/vchiq/interface/vchiq_arm/vchiq_shim.c
+102-1sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c
+24-14sys/arm/broadcom/bcm2835/bcm2835_audio.c
+6-19sys/contrib/vchiq/interface/vchi/vchi.h
+0-14sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c
+338-2312 files not shown
+344-2378 files

FreeBSD/src 250db71lib/libusb libusb10_hotplug.c

libusb: Add an XXX comment for possible duplicate callback IDs

If next_callback_id wraps we could end up with two callbacks with the
same ID.  I recommitted the original change despite this issue in order
to fix the libusb API as soon as possible after SHLIB_MAJOR was bumped
in commit 527a82474cb3 (libusb: versioning symbols).

It's very unlikely in practice that software will register and
deregister a sufficient number of callbacks to trigger this, but it is
a real issue to be fixed in a subsequent commit.

Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-0lib/libusb/libusb10_hotplug.c
+1-01 files

FreeBSD/src 6bda9f2lib/libusb libusb10.c libusb10.h

libusb: change callback register handler to int

libusb upstream uses int for register handler. This causes some library
user (like pyusb) to assume that we have int in all implementations and
therefore provides a 4 byte storage only. This causes Segmentation
fault as we will right the pointer.

Reviewed by:    adrian
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54211

(cherry picked from commit ce9ced951a0b9d004a3b007d4ac6e9087a1301a2)
DeltaFile
+32-18lib/libusb/libusb10_hotplug.c
+2-3lib/libusb/libusb.h
+2-0lib/libusb/libusb10.h
+1-0lib/libusb/libusb10.c
+37-214 files

FreeBSD/src f71abf3usr.bin/netstat netstat.h main.c

netstat(1): Add nexthop statistics support with -os flag

Add support nexthop statistics and update its manual.
While here, fix manual of other nexthop related options.

Reviewed by: kfv
Differential Revision:  https://reviews.freebsd.org/D58538
DeltaFile
+54-1usr.bin/netstat/netstat.1
+24-0usr.bin/netstat/nhops.c
+9-3usr.bin/netstat/main.c
+1-0usr.bin/netstat/netstat.h
+88-44 files

FreeBSD/src 5c3bc8asys/dev/sound/usb uaudio.c

snd_uaudio: Use uDWord for the UAC2 sample rate

uaudio20_set_speed() split the sample rate into bytes by hand. Use
uDWord and USETDW() instead.

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D59066
DeltaFile
+3-6sys/dev/sound/usb/uaudio.c
+3-61 files

FreeBSD/src 2346300sys/dev/clk/spacemit k1_apmu.c

clk: Correct SpacemitT typo

SpacemiT has only one T.

Fixes: dcb10e3add17 ("clk: Initial support for the SpacemiT K1 clock control units")

Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-1sys/dev/clk/spacemit/k1_apmu.c
+1-11 files

FreeBSD/src 240d811sys/dev/dpaa if_memac.c dpaa_eth.h

dpaa/dtsec: advertise RX/TX csum

Apply 6464974 to dTSEC, since it supports the same offload capabilities
as mEMAC.

The DPAA_CSUM_TX_OFFLOAD macro moves from if_memac.c to the shared
dpaa_eth.h since both drivers now reference it.
DeltaFile
+19-1sys/dev/dpaa/if_dtsec.c
+4-0sys/dev/dpaa/dpaa_eth.h
+0-2sys/dev/dpaa/if_memac.c
+23-33 files

FreeBSD/src 81ac9c6sys/dev/dpaa qman_portals.c qman.c

dpaa/qman: Make `show fqid <N>` actually work

Set the verb correctly so the query works.  Also print out the
programmable FQID fields as well.
DeltaFile
+39-0sys/dev/dpaa/qman_var.h
+0-38sys/dev/dpaa/qman.c
+23-0sys/dev/dpaa/qman_portals.c
+62-383 files

FreeBSD/src 86a8897sys/dev/dpaa qman.h qman_var.h

DPAA: Minor performance improvements

* Add interrupt coalescing for DQRR and MR, with thresholds and period
  as tunable sysctls under the `hw.qman` tree.
* Do lazy/sloppy buffer management to avoid constantly checking
  thresholds via QMan portal round-trips.
* Add cache stashing to prewarm caches, reducing latency.
* Fix the definition of Context_A in the init_fq MC command/result
  structures, they're 64-bit fields, not 32-bit.
* Reorder the dpaa_eth_frame_info as a bit of cleanup.
* Take advantage of the fact that UMA small allocations are returned in
  the DMAP, and avoid pmap_kextract().

These changes together improve throughput by ~1.5%
(925Mbps->935-940Mbps) consistently, and reduce CPU usage by a bit,
increasing idle CPU from 30%->35% minimum.
DeltaFile
+96-39sys/dev/dpaa/dpaa_eth.c
+88-0sys/dev/dpaa/qman_portals.c
+27-1sys/dev/dpaa/qman.c
+8-1sys/dev/dpaa/dpaa_eth.h
+4-2sys/dev/dpaa/qman_var.h
+2-1sys/dev/dpaa/qman.h
+225-446 files

FreeBSD/src 86715a3sys/dev/dpaa fman.c

fman: Fix duplicate port identifiers

fman_qman_channel_id returns the QMan FMan channel for a given port.
If a port isn't found, the wrong channel number will be returned.
DeltaFile
+2-2sys/dev/dpaa/fman.c
+2-21 files

FreeBSD/src 6b57054sys/dev/dpaa fman_port.c

dpaa/fman_port: Fix register config typo
DeltaFile
+2-1sys/dev/dpaa/fman_port.c
+2-11 files

FreeBSD/src 4860904sys/conf files.powerpc, sys/dev/sdhci fsl_sdhci.c sdhci_fsl_fdt.c

sdhci_fsl_fdt: Add support for PowerPC eSDHC controllers

Migrate all PowerPC QorIQ to the sdhci_fsl_fdt SDHC driver.  There are a
few differences that need to be accounted for:
* On PowerPC device trees, the `clock-frequency` property defines the
  clock rate, not a `clocks` reference property.
* On some older SoCs (P1022 only?) the BURST fields of the WML register
  are reserved, and must be 0x10, so add a FSL quirk (errata field) to
  account for this.
* The PowerPC eSDHC controllers must have the DMA SNOOP bit set for DMA
  to work properly and avoid corruption.

As part of this, make the fallback "fsl,esdhc" compat data work for
PowerPC.  If these fallbacks are not compatible with ARM SoCs, newer
compat strings could be added for those, but the conservative catch-all
should work for most SoCs, though perhaps less optimal.

Differential Revision:  https://reviews.freebsd.org/D58630
DeltaFile
+119-23sys/dev/sdhci/sdhci_fsl_fdt.c
+5-77sys/dev/sdhci/fsl_sdhci.c
+6-0sys/powerpc/conf/QORIQ64
+6-0sys/powerpc/conf/MPC85XX
+1-1sys/conf/files.powerpc
+137-1015 files

FreeBSD/src 601312bsys/powerpc/powerpc busdma_bounce.c

powerpc/dma: Fix accounting and loading large segments

When the first page of a segment fits alignment, the second likely does
not, so the DMA infrastructure (must_bounce()) thinks it needs to bounce
the pages.  Fix this by passing the previous end (address of byte
following the previous segment) as a third argument to must_bounce(), so
that the alignment check is done against the start of a new segment if
and only if necessary, instead of the current page.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D58627
DeltaFile
+59-8sys/powerpc/powerpc/busdma_bounce.c
+59-81 files