aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
...
* rge: log silicon revision during attachChristos Longros2026-02-221-7/+7
| | | | | | | | | | | | | | | | | The initial import from OpenBSD contained chip revision printf() calls commented out, as OpenBSD's bare printf() style does not translate to FreeBSD's device_printf() idiom. The result is that users cannot distinguish RTL8125 from RTL8125B, RTL8125D_1, RTL8125D_2 etc. via dmesg alone, even though all variants show as '<RTL8125>' from the PCI probe string. Add proper device_printf() calls including the raw hwrev value, consistent with how re(4) reports chip revisions. Signed-off-by: Christos Longros <chris.longros@gmail.com> Reviewed by: zlei, imp, adrian Differential Revision: https://reviews.freebsd.org/D55402
* rge: correctly free busdma memory / zero things out only if allocatedJohn2026-02-221-15/+18
| | | | | | | | | | * Only free busdma memory that was allocated * Don't free tx/rx rings until their buffers have also been freed PR: kern/293307 Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D55420
* rge: fix callout setup/teardown; handle invalid ethernet addressJohn2026-02-221-5/+14
| | | | | | | | | | | | * Do the callout init early; since some of the teardown path expects the callout to be valid * Handle an invalid ethernet address by generating a local one. PR: kern/293307 Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D55419
* regulator_fixed: add support for 'gpios' propertyMichal Meloun2026-02-221-5/+12
| | | | | | This is a newer version of the "gpio" property. MFC after: 3 weeks
* pci_dw: improve pci_dwMichal Meloun2026-02-222-18/+63
| | | | | | | | Add support for 64-bit ranges. Process 'bus-range' property. Add some debug prints. MFC after: 3 weeks
* fdt,simple_mfd: Map memory as shareable.Michal Meloun2026-02-221-1/+1
| | | | | | It may be submapped in child drivers. MFC after: 3 weeks
* TCA64xx: Convert mutex to SX lock.Michal Meloun2026-02-221-13/+14
| | | | | | I2C devices are permitted to sleep during transfers. MFC after: 3 weeks
* OFW: Improve OFW_CPU.Michal Meloun2026-02-221-1/+10
| | | | | | | | Accept the assigned clock on the CPU node. Don't report a missing "clock-frequency" property if the CPU node has a "clocks" property. MFC after: 3 weeks
* HYM8563: Add support for clock output.Michal Meloun2026-02-221-25/+213
| | | | | | The RTC contains a configurable clock output. MFC after: 3 weeks
* rsu: migrate to new net80211 encryption key APIAdrian Chadd2026-02-221-7/+12
| | | | | | | Migrate to the new encryption key API rather than poking at the key struct directly. Differential Revision: https://reviews.freebsd.org/D54483
* asmc: resource cleanup simplificationsEnji Cooper2026-02-221-14/+19
| | | | | | | | | | This change makes `asmc_detach(..)` reentrant by setting freed resources to known invalid values when done, and makes `asmc_attach(..)` call `asmc_detach(..)` instead of attempting to the semi-equivalent way of cleaning up the driver resources allocated in `asmc_detach(..)`. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55413
* sound: Detect unsupported formatsChristos Margiolis2026-02-211-1/+15
| | | | | | | | | | | This way we can avoid edge-cases like 8af6aee96ed609456900c6dd92dafabac5e89c0a ("virtual_oss(8): Remove floating point formats from preference list"). Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D55403
* asmc: code style modernization and minor cleanupsEnji Cooper2026-02-211-59/+47
| | | | | | | | | | | | | - Allow `ASMC_DEBUG` to be treated as a variadic macro. - Add ellipses around `sizeof(..)` calls. - Reindent some of the lines to better follow style(9) with line wrapping. A number of other clang-format changes were not taken as they are not compatible with style(9). MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55394
* nvmf: Limit the default I/O queue size to 128 entriesJohn Baldwin2026-02-201-1/+2
| | | | | | | | Previously the size defaulted to the maximum supported size reported by the remote host. The value of 128 matches the default on Linux and avoids excessive resource usage for I/O queues. Sponsored by: Chelsio Communications
* chore: asmc: use designated initializers in macrosEnji Cooper2026-02-201-23/+38
| | | | | | | | | | | This code cleanup makes it easier for human readers to understand what each of the fields actually represents, as well as makes it easier to modify what the macros actually do under the covers, without introducing potential human errors. No functional change intended. MFC after: 1 week
* asmc: use symbolic names with the MacPro3,1 modelEnji Cooper2026-02-201-2/+2
| | | | | | | | | | | | Use `ASMC_LIGHT_FUNCS_DISABLED` and `ASMC_SMS_FUNCS_DISABLED` instead of the unrolled versions of the macros. This makes it easier to adjust the underlying macros/fields for `struct asmc_model`. No functional change intended. MFC after: 1 week
* asmc: use `ASMC_FAN_FUNCS2` with the Macmini4,1Enji Cooper2026-02-201-1/+1
| | | | | | | | | | | | | | | | | The Macmini4,1 model does not have "fansafespeed" support. This issue typically manifests with messages like so: ``` asmc0: asmc_key_read for key F0Sf failed 10 times, giving up ``` Swap out `ASMC_FAN_FUNCS` with `ASMC_FAN_FUNCS2` to explicitly drop "fansafespeed" checks in the driver for the model as it doesn't support that hardware feature. MFC after: 1 week Reported by: @probonopd Closes: https://github.com/helloSystem/ISO/issues/357
* vmm: Start using exterrorMark Johnston2026-02-191-1/+4
| | | | | | | | | | | For now, just describe the error where an unprivileged user attempts to run a VM without DESTROY_ON_CLOSE semantics, i.e., monitor mode. Reviewed by: bnovkov MFC after: 2 months Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D54743
* vmm: Enable unprivileged bhyveMark Johnston2026-02-191-5/+5
| | | | | | | | | | | | | | - Add the vmm group. - Let /dev/vmmctl belong to the vmm group by default, and give group write permissions. - When creating a VM's device files, make them owned by the creating process' effective UID. Reviewed by: bnovkov MFC after: 2 months Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D54741
* vmm: Add privilege checks to vmmctl operationsMark Johnston2026-02-191-0/+21
| | | | | | | | | | | | | | | | In preparation for supporting creation of VMs by unprivileged users, add some restrictions: - Disallow creation of non-transient VMs by unprivileged users. That is, if an unprivileged user creates a VM, the VM must be destroyed automatically once the last fd referencing it is gone. - Disallow destroying VMs created by a different user, unless the caller has the PRIV_VMM_DESTROY privilege. Reviewed by: bnovkov MFC after: 2 months Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D54740
* iommu_gas: Fix assertion.Ruslan Bukin2026-02-191-1/+1
| | | | | | | | placeholder entry end changed to 0 in f591287756368 ("iommu_gas: make placeholder entry at the start of the GAS zero size") Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D55326
* acpi: Factor out the power off code into acpi_poweroff()Olivier Certner2026-02-191-19/+28
| | | | | | | | | | | | | | While here, make it print that we are trying to power off upfront, not really treating differently power off preparation via acpi_EnterSleepStatePrep() and actual power off via AcpiEnterSleepState(), which the user does not care about. While here, capitalize the messages. Reviewed by: obiwac MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55226
* acpi: Factor out message printing on failure of AcpiEnterSleepStatePrep()Olivier Certner2026-02-191-7/+21
| | | | | | | | | | | | | | To this end, create a small wrapper, acpi_EnterSleepStatePrep(), which itself prints the failure message. While here, when trying to power down (acpi_shutdown_final()), and AcpiEnterSleepStatePrep() failed, print an additional message more explicit about the power down request having failed. Reviewed by: obiwac MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55225
* nvme: Fix sim unit number to match nvme deviceWarner Losh2026-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The CAM sim unit numbner should match the nvme device number. We need this to match unit numbers in some wiring scenarios. For example: hint.nvme.0.at="UEFI:PciRoot(0x3)/Pci(0x1,0x1)/Pci(0x0,0x0)" hint.nvme.1.at="UEFI:PciRoot(0x3)/Pci(0x1,0x2)/Pci(0x0,0x0)" hint.nvme.2.at="UEFI:PciRoot(0x3)/Pci(0x1,0x3)/Pci(0x0,0x0)" hint.nvme.3.at="UEFI:PciRoot(0x3)/Pci(0x1,0x4)/Pci(0x0,0x0)" hint.scbus.33.at="nvme0" hint.nda.0.at="scbus33" hint.scbus.34.at="nvme1" hint.nda.1.at="scbus34" hint.scbus.35.at="nvme2" hint.nda.2.at="scbus35" hint.scbus.36.at="nvme3" hint.nda.3.at="scbus36" If the devices that are nvme0 and nvme3 are the only ones populated, you still want them associated with nda0 and nda3. The nvme_sim device changes meant we were passing the wrong device's unit number to cam_sim_alloc. This fixes the problem. Sponsored by: Netflix
* nvme: fix panic if we boot w/o a namespaceWarner Losh2026-02-181-0/+10
| | | | | | | | | | | | If we format a drive, and then crash, we'll come back up. nvme_sim_ns device won't attach because we don't have a namespace. Some drives (all? I couldn't find it in the standard) send an AER with a namespace change, which causes a NULL dereference because s_sim wasn't initialized because we didn't attach. So, if we get into the ns_changed routine, bail early if we didn't attach. We'll attach later, and deal with the ns correctly if it's really there, or not attach one if it's not. Sponsored by: Netflix
* pcib: Assume a window where both the base and limit are 0 is uninitializedJohn Baldwin2026-02-181-0/+18
| | | | | | | | | | | | | | Since the low bits of a window's limit are hardwired to 1, this configuration looks like a minimally sized window at address 0. However, PCI resources are not generally at address 0 (see the __PCI_BAR_ZERO_VALID macro that was only defined on sparc64), and some PCI-PCI bridges report these register values after a reset. The result today is a lot of spam in dmesg as the minimally-sized windows fail to allocate. By ignoring these windows and treating them as closed the end result is the same, but there is less spam during boot. Reported by: jrtc27 Differential Revision: https://reviews.freebsd.org/D43922
* bus: Drop a couple of unused IVAR indicesJohn Baldwin2026-02-171-1/+0
| | | | | | | This changes the in-kernel ABI, but that is permitted across major versions and is cleaner than leaving these around forever. Differential Revision: https://reviews.freebsd.org/D54160
* bus: Change a few bus drivers to use consistent IVAR rangesJohn Baldwin2026-02-172-2/+2
| | | | | | | | A few bus drivers used 1 instead of 0 as the starting index of their private IVARs. Fix those drivers to start at BUS_IVARS_PRIVATE for consistency. Differential Revision: https://reviews.freebsd.org/D54934
* bus: Document special ranges of IVARsJohn Baldwin2026-02-1725-47/+61
| | | | | | | | | | | | | Some IVAR indices are special in that they have global meaning across multiple buses where as other IVARs are always private to the local bus. Try to document this a bit and add constants for the various ranges to avoid future conflicts. This is a no-op, but IVAR indices are now generally defined as enums as that makes it easier to define them in terms of ranges. Reviewed by: imp, royger, andrew Differential Revision: https://reviews.freebsd.org/D54159
* acpi_gpiobus: Reuse the existing IVAR index for an ACPI handleJohn Baldwin2026-02-173-15/+2
| | | | | | | | ACPI_IVAR_HANDLE is a global index shared across multiple busses, there is no need for a unique constant here. Reviewed by: vexeduxr, imp Differential Revision: https://reviews.freebsd.org/D54155
* mfi(4)/mrsas(4): Print driver versions consistentlyMichael Osipov2026-02-172-7/+4
| | | | | | Reviewed by: ziaee, des MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54519
* vmm: Allow the use of PCI passthrough in a jailMark Johnston2026-02-162-8/+14
| | | | | | | | | | | | | | | | | | | | | After commit e11768e94787 ("vmm: Add PRIV_DRIVER checks for passthru ioctls"), it is not possible to use PCI passthru from jails, as PRIV_DRIVER is not granted to jails. Apparently some users expect this to work, understanding that jailing bhyve provides little security benefit in this configuration. I believe we should disable ppt access in jails even when allow.vmm is configured. To provide an escape hatch for users, add a new allow.vmm_ppt jail configuration knob, and check it when handling ppt ioctls in jails. Also add a new PRIV_VMM_PPTDEV to replace the use of PRIV_DRIVER. PR: 292750 Reviewed by: corvink MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55066
* ichsmb: Add Intel Raptor Lake SMBus controller supportAbdelkader Boudih2026-02-161-0/+3
| | | | | | | | Add PCI device ID 0x7a23 for Intel 700 Series (Raptor Lake) chipset SMBus controller. This enables hardware monitoring functionality on 13th and 14th generation Intel Core platforms. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D54957
* asmc: Add MacPro3,1 temperature sensor supportAbdelkader Boudih2026-02-152-0/+78
| | | | | | | Test and verified with Sonicblue7 Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D54952
* cxgbe(4): Show correct range of tids in sysctl_tidsNavdeep Parhar2026-02-131-1/+1
| | | | | | | The highest valid tid has to be adjusted for the hi-pri filter region. MFC after: 1 week Sponsored by: Chelsio Communications
* nvme: Use size_t for payload sizeDag-Erling Smørgrav2026-02-131-1/+3
| | | | | | | | | | Using uint32_t here can cause spurious compiler warnings. I assume it was done to constrain the range; use a KASSERT instead. Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55279
* nvme: Change fail_on_reset to boolDag-Erling Smørgrav2026-02-132-2/+2
| | | | | | | | | This is safe since sysctl_handle_bool() handles ints transparently. Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55263
* e1000: Increase FC pause/refresh time on PCH2 and newerKevin Bowling2026-02-131-2/+2
| | | | | | | | | | | | This corresponds to Linux f74dc880098b4a29f76d756b888fb31d81ad9a0c That commit does not provide any public background detail, but it's been in use for over 5 years and corresponds to previous chip bugs w.r.t. automatic generation of PAUSE frames. Reviewed by: kgalazka MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D54555
* asmc: Convert driver to CTLFLAG_MPSAFEAbdelkader Boudih2026-02-131-14/+14
| | | | | | | | | | | | Replace CTLFLAG_NEEDGIANT with CTLFLAG_MPSAFE for all sysctls. The driver already uses spin mutexes (sc->sc_mtx) for hardware access protection and does not require the Giant lock. This improves scalability by allowing concurrent sysctl access without Giant serialization. Reviewed by: ngie, adrian Differential Revision: https://reviews.freebsd.org/D54613
* cxgbe(4): Fix assertion in timer calibrationNavdeep Parhar2026-02-131-1/+1
| | | | | | | | The calibration callout is stopped when the adapter is marked off limits but not when the adapter is merely stopped. MFC after: 1 week Sponsored by: Chelsio Communications
* igc: remove M_HASHTYPE when RSS is not enabledCheng Cui2026-02-121-1/+1
| | | | | | | Summary: manually cherry-pick 21dd554d1697 Reviewed by: kbowling Differential Revision: https://reviews.freebsd.org/D55256
* iwx: migrate to new net80211 encryption key APIAdrian Chadd2026-02-111-4/+6
| | | | | | | | | | | Migrate to the new encryption key API rather than poking at the key struct directly. Locally tested: * STA mode - iwx0: <Wi-Fi 6 AX210> mem 0x84c00000-0x84c03fff at device 0.0 on pci4 Differential Revision: https://reviews.freebsd.org/D54463
* run: rum: migrate to new net80211 encryption key APIAdrian Chadd2026-02-112-15/+26
| | | | | | | | | | | Migrate to the new encryption key API rather than poking at the key struct directly. Locally tested: * STA mode - run0: MAC/BBP RT2860 (rev 0x0101), RF RT2820 (MIMO 2T2R), address 00:0e:2e:e5:ae:3a Differential Revision: https://reviews.freebsd.org/D54462
* evdev: Drop comments from input-event-codes.hVladimir Kondratyev2026-02-101-308/+177
| | | | | | | They were copied intact from the Linux GPL-only file. Requested by: imp, glebius MFC after: 1 week
* psm(4): Add middle button support for Elantech V4 touchpadsVladimir Kondratyev2026-02-101-2/+13
| | | | | | | based on firmware version. PR: 291262 MFC after: 1 month
* ure: improve receive checksum offloadingMichael Tuexen2026-02-101-23/+15
| | | | | | | | | | | Let the receive checksum offload for TCP/IPv6 and UDP/IPv6 be controlled by ifconfig rxcsum6 and not by ifconfig rxcsum. While there, make the code more compact and improve stlye.9 conformity. Reviewed by: Timo Völker MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55188
* vtgpu: Support virtio gpu on Parallels DesktopAndrew Turner2026-02-101-13/+38
| | | | | | | | | | | The Parallels Desktop Virtio GPU implementation doesn't handle enqueuing the VIRTIO_GPU_CMD_RESOURCE_ATTACH_BACKING request and memory list together. Work around this by splitting them before sending them to be enqueued. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D55147
* pci_iov: Reuse downstream bridge bus window if it already covers VF busChandrakanth Patil2026-02-101-10/+21
| | | | | | | | | | | If the parent bridge's [secondary, subordinate] window already covers the VF bus (e.g., programmed by BIOS or a prior PF), skip allocating PCI_RES_BUS. This avoids a duplicate rman allocation in the multi-PF case while still allocating when growth is actually needed. Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D52163 MFC After: 1 week
* dev/mfi: include sys/abi_compat.h unconditionallyKonstantin Belousov2026-02-101-2/+0
| | | | | | | | not only for COMPAT_FREEBSD32 case. The driver uses INPTR() for non-compat32 code. Sponsored by: The FreeBSD Foundation MFC after: 1 week
* sys/event.h: reduce namespace pollution from sys/abi_compat.hKonstantin Belousov2026-02-101-2/+3
| | | | | | | | | | Split out types definitions into sys/abi_types.h, and only include abi_types.h into sys/event.h. Tested and reviewed by: bz Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55202