| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
We don't need to check for NULL before calling free().
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
| |
Reported by: markj
Fixes: 97d152698f48 ("acpi: Use sleep types defined in sys/power.h")
Event: AsiaBSDCon 2026
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The TPM driver currently has a single buffer per instance to hold the
result of a command, and does not allow subsequent commands to be sent
until the current result is read by the same OS thread that sent the
command, with a timeout to throw away the result after a while if the
result is not read in a timely fashion. This has a couple problems:
- The timeout code has a bug which causes all subsequent commands to
hang forever if a different OS thread tries to read the result
before the OS thread which sent the command, and the OS thread
which sent the command never tries to read the result.
- Even if the first problem is fixed, applications expect to be able
to read the result from a different OS thread than the OS thread
which sent the command. The particular case that we saw was a go
application where the go runtime scheduled the goroutine which read
the result to a different OS thread from one where the goroutine
that sent the command ran, and there's no way to force these to
always run on the same OS thread.
Fix all of this by replacing the global result buffer with a per-open
result buffer via devfs_set_cdevpriv(), so that we no longer need to
block subsequent commands until the results of a previous command are
retrieved or care about which OS thread is reading the result of a
command.
Sponsored by: Netflix
Reviewed by: olivier, imp
Differential Revision: https://reviews.freebsd.org/D52328
|
| |
|
|
|
|
|
| |
The layout for the main INT_CAUSE is a bit different for T7.
MFC after: 1 week
Sponsored by: Chelsio Communications
|
| |
|
|
|
|
|
|
|
|
| |
- Display an appropriate alert character instead of a question mark for
unknown bits.
- Display all fatal bits for a register and not just the ones that are
currently set.
MFC after: 1 week
Sponsored by: Chelsio Communications
|
| |
|
|
|
|
|
|
|
|
|
| |
Some platforms enforce power-of-two alignment for bus_dma tags. Rounding up
the natural size may result in over-alignment, but should be safe.
PR: 293770
Reviewed by: andrew
Fixes: c499ad6f997c ("virtio: Use bus_dma for ring and indirect buffer allocations")
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D55843
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This change allows for fine-grained capabilities per counter index. This
is particularly useful for AMD where subclasses are not exposed to the
general PMC code, but other architectures also have asymmetric behaviors
when it comes to specific counter indices.
A new PMC_OP_GETCAPS op is added to the hwpmc(4) ioctl interface.
Reviewed by: mhorne
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/2058
|
| |
|
|
|
|
|
|
|
|
| |
The goal this change is to remove the use of the tag and handle
needed by bus_space_[read|write]_4.
Fixes: b3d9e5013f3e5 (Don't active memory space)
Requested by: jhb
Reviewed by: gallatin, imp, jhb, jrtc27
Differential Revision: https://reviews.freebsd.org/D55818
|
| |
|
|
|
|
|
|
|
|
| |
The private struct has a 'regs' member that's only written to
and otherwise unused. This change removes it.
Fixes: b3d9e5013f3e5 (Don't active memory space)
Requested by: jhb
Reviewed by: imp, jhb, jrtc27
Differential Revision: https://reviews.freebsd.org/D55817
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
A race condition in the MII layer causes spurious link down events.
In `statchg`, on link down, check if the PHY reports the link as
actually down using the BMSR register, if not, force the status of the
link to back up and restart TX. Do the same in a MII `linkchg` handler.
On actual link up, restart TX in case it went idle and down.
PR: 252165
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Reviewed by: pouria
Differential Revision: https://reviews.freebsd.org/D55682
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
FreeBSD style(9) mandates C style comments. The initial import from
OpenBSD left several C++ style // comments in if_rge.c and if_rgevar.h.
Replace them with proper /* */ comments.
Also fix a malformed comment that mixed // with a closing */.
Signed-off-by: Christos Longros <chris.longros@gmail.com>
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D55743
|
| |
|
|
|
|
|
|
|
|
|
| |
* Improve sysctl descriptions.
* Rename battery charging-threshold sysctl for clarity.
* Fix mis-spelled words.
* Style: sort headers.
Reported by: olce, jhb
Reviewed by: olce
Differential Revision: https://reviews.freebsd.org/D55848
|
| |
|
|
|
|
|
|
| |
Per the watchdog driver contract, if the driver successfully arms the
watchdog it must set error to 0, and if it's unable to arm the watchdog
it must leave error alone.
Sponsored by: Hewlett Packard Enterprise
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update Intel irdma driver to version 1.3.56-k
Notable changes:
- adding E830 support
- adding E835 support
Signed-off-by: Sobczak, Bartosz <bartosz.sobczak@intel.com>
Reviewed by: Andrew Zhu <anzhu@netapp.com>
Tested by: Mateusz Moga <mateusz.moga@intel.com>
MFC after: 2 weeks
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D55479
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ix driver now supports Energy Efficient Ethernet (EEE) on Intel
E610 devices. EEE allows the network interface to enter low-power
states during periods of low link utilization, reducing power
consumption while maintaining full performance when needed.
E610 adapters provide EEE support through BASE-T PHY functionality.
Due to this PHY-based implementation, EEE is supported only
on 2.5Gb speeds and above.
Signed-off-by: Yogesh Bhosale <yogesh.bhosale@intel.com>
Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Authored-by: Yogesh Bhosale <yogesh.bhosale@intel.com>
Approved by: kbowling (mentor)
Tested by: Mateusz Moga <mateusz.moga@intel.com>
MFC after: 2 weeks
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D55304
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MASTER mute (vol.mute) works while audio is playing. However, if a
stream is stopped and restarted (PCMTRIG_STOP -> PCMTRIG_START), the
audio will resume even though the mixer shows the MASTER volume as
muted. Other streams that are already playing remain silent. New streams
may also start playing audio regardless of the MASTER mute state.
The volume feeder now considers the MASTER mute when determining whether
a channel should be muted. This ensures MASTER mute is consistently
enforced for all streams and removes the dependency on trigger-driven
state propagation.
Tested with Creative Labs CA0132 card.
MFC after: 1 week
Reviewed by: christos
Differential Revision: https://reviews.freebsd.org/D55605
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous code subtracted AMD_PMC_PERFCTR_0 (0xC0010004) from all
perfctr MSR addresses to compute a relative offset. This is incorrect
for counters using AMD_PMC_CORE_BASE (0xC0010200), AMD_PMC_L3_BASE
(0xC0010230), and AMD_PMC_DF_BASE (0xC0010240), producing wrong offsets.
Fix by promoting amd_core_npmcs, amd_l3_npmcs, and amd_df_npmcs to
static module-level variables and computing the correct flat RDPMC
index per AMD BKDG 24594 page 440:
ECX 0-5: Core counters 0-5
ECX 6-9: DF counters 0-3
ECX 10-15: L3 Cache counters 0-5
ECX 16-27: DF counters 4-15
ECX > 27: Reserved, returns EINVAL
Reviewed by: Ali Mashtizadeh <ali@mashtizadeh.com>, mhorne
Sponsored by: NLINK (https://nlink.com.br), Recife, Brazil
Fixes: 37bba2ad92d8 ("hwpmc_amd: Add support for additional counters")
Differential Revision: https://reviews.freebsd.org/D55607
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug Fixes:
* Verify that an ENA ring is in netmap only in native mode
Minor Changes:
* Move parenthesis to correct place in switch
* Add comment
* Reorder define
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
Reviewed by: cperciva
Differential Revision: https://reviews.freebsd.org/D55698
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
netmap operates in two modes:
1) Emulated - netmap handling is done by the network stack, the
NIC driver operates transparently to netmap.
2) Native - netmap management is done by the NIC driver.
When checking whether a specific ENA ring is running in netmap
mode, only the following checks were done:
1. IFCAP_NETMAP - Check whether netmap capability is enabled on
the device.
2. NKR_NETMAP_ON - Check whether netmap is actively using this
ring.
The above checks implied that the netmap mode is native and the
ENA driver needs to handle the netmap logic.
The code was missing an explicit check on whether native mode
is actually on (NAF_NATIVE).
This led to a case where though emulated mode was used and
a netmap application was turned on, the ENA driver still managed
netmap logic partially and caused missing buffers and lack of
refill as part of the datapath.
Note: Enabling netmap emulated mode is insufficient and there's
a need to load a netmap program in order to trigger this use-case.
Add an explicit check of whether NAF_NATIVE mode is set.
The issue was reported in [1].
[1]: https://github.com/amzn/amzn-drivers/issues/361
Fixes: 358bcc4c6cde ("Add support for ENA NETMAP partial initialization")
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
Reviewed by: cperciva
Differential Revision: https://reviews.freebsd.org/D55697
|
| |
|
|
|
|
|
|
|
|
|
| |
1. Move parenthesis to correct place in switch and fix include order
2. Add comment at the end of an ifdef for clarity
3. Change include order.
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
Reviewed by: cperciva
Differential Revision: https://reviews.freebsd.org/D55696
|
| |
|
|
|
|
|
|
|
|
| |
Until an issue seen on amd64 can be investigated restore two mb() calls
to virtio.
Reviewed by: andrew
Fixes: c499ad6f997c ("virtio: Use bus_dma for ring and indirect buffer allocations")
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D55766
|
| |
|
|
| |
This reverts commit d99e725c26a7745aa349eab01ae56ca630b6d0f5.
|
| |
|
|
|
|
|
|
|
|
| |
Until an issue seen on amd64 can be investigated restore two mb() calls
to virtio.
Reviewed by: andrew
Fixes: c499ad6f997c ("virtio: Use bus_dma for ring and indirect buffer allocations")
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D55766
|
| |
|
|
|
|
|
|
|
|
|
| |
This exports bus information about bridges to userspace via the
less-privileged PCIOCGETCONF ioctl. Previously if userspace wished to
query this information, it had to use direct PCI config register
access which requires higher privilege.
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D55771
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several Realtek (and lots other) USB dongles present themselves as
CDROM device first. Upon eject they do a mode switch and suddenly
are a different kind of device (sometimes even with different IDs),
e.g., a wireless dongle.
In order to avoid the CDROM stage and rather than adding the quirk
handling to more drivers, add support to umass and if enabled
automatically eject the "CDROM" to make it the real device.
Longer-term some other drivers could stop using their hand-rolled
support for this. It is unclear as-to how much we need the list of
(eject) quirks from u3g here, or if these are very specific to that
kind of devices.
Sponsored by: The FreeBSD Foundation
Fixes: b3b6a959c85a, 9c0cce328363
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D54901
|
| |
|
|
|
| |
Reviewed by: wulf
Differential Revision: https://reviews.freebsd.org/D55716
|
| |
|
|
|
| |
Reviewed by: wulf
Differential Revision: https://reviews.freebsd.org/D55710
|
| |
|
|
|
|
|
|
|
| |
1. ncores and devlog information is read as a combination so it makes
sense to validate them in the same routine (and nowhere else).
2. ncores is never 0 and idx % ncores is always a valid coreid.
MFC after: 1 week
Sponsored by: Chelsio Communications
|
| |
|
|
|
|
|
| |
The checksum types fit in 4b and don't need a full 32b int.
MFC after: 1 week
Sponsored by: Chelsio Communications
|
| |
|
|
|
|
| |
Reported by: tinderbox
Fixes: cdad55809ef5 ("acpi_system76: Support for ...")
Differential Revision: https://reviews.freebsd.org/D55694
|
| |
|
|
|
|
|
|
| |
Add acpi_system76 for handling acpi-controlled buttons
on System76 Laptops.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55694
|
| |
|
|
|
|
| |
Signed-off-by: tslight <tslight@pm.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1992
|
| |
|
|
|
|
| |
Signed-off-by: tslight <tslight@pm.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2051
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the current current behavior the 2nd and 3rd BARs can be activated
when they're configured with address zero. This change defers the
activation of all BARs until after they've all been configured with an
address.
This enables FreeBSD on Google Compute Engine C4-LSSD Machines.
Sponsored by: Google
Tested by: NetApp (previous version)
Reviewed by: gallatin, imp
Discussed with: jrtc27 (improved error reporting)
Differential Revision: https://reviews.freebsd.org/D55541
|
| |
|
|
|
|
|
|
|
|
| |
__SIZEOF_*__ is in bytes, not in bits...
Reported by: brooks
Fixes: 35da55c28dbb ("iwx: Fix 32-bit compilation")
MFC after: 1 minute
MFC to: stable/15
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Avoid shifts wider than integer types, by wrapping the corresponding
checks into '#if __SIZEOF_SIZE_T__ > 32' blocks. 'bus_addr_t'
currently has the same width as 'size_t' on all architectures (and
this is not going to change for 32-bit architectures).
- Use appropriate printf(3) format for 'wk_keytsc'.
Reviewed by: adrian
MFC after: 1 minute
MFC to: stable/15
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55667
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Not all bus drivers for ACPI-aware devices implement the ACPI flags
IVAR used by the acpi_wake_set_sysctl handler. In some cases this may
be a feature as some new-bus devices share the same ACPI handle (e.g.
a pcibX device and its child pciY device) which can lead to confusing
results (e.g. setting the sysctl on pciY changes the behavior of the
parent pcibX device, but the "wake" sysctl for pcibX won't reflect the
new behavior, or reflect the device's state).
Reviewed by: obiwac, ngie, imp
Differential Revision: https://reviews.freebsd.org/D55562
|
| |
|
|
|
|
|
|
|
|
|
| |
Add BTI note to fdt_static_dtb.o
- resolves "Branch Target Exception" panic on FDT systems with static DTB
due to missing landing pads (bti note has to be in all object files used
for linkage)
- also required by bti_report linker feature
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D55636
|
| |
|
|
|
|
|
| |
Reviewed by: wulf, obiwac
Approved by: wulf, obiwac
Fixes: d97d5c0ce89d ("hid: Import hidmap-based drivers written by Greg V")
Differential Revision: https://reviews.freebsd.org/D55626
|
| |
|
|
|
|
|
|
|
|
|
| |
The ACPI bus uses the flags IVAR for any device with a _PRW method
including devices such as PCI bridges/devices that are not direct
children of acpi0.
Reported by: ngie
Reviewed by: ngie
Fixes: 0bb867e9f565 ("acpi: Split ACPI IVARs into global and private sets")
Differential Revision: https://reviews.freebsd.org/D55561
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
amdsmu_suspend() and amdsmu_resume() for sending hints to the AMD SMU
power management firmware (PMFW) that we are entering and exiting
s2idle. We also dump sleep metrics once we tell it we're exiting sleep,
so the relevant metrics are updated.
Register these as acpi_post_dev_suspend and acpi_post_dev_resume
eventhandlers.
Reviewed by: olce
Approved by: olce
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48721
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In acpi_spmc_get_constraints_spec(), the revision of the device
constraint detail package was mistakenly read from
constraint_obj->Package.Elements[0], which is the device name
(a string), instead of from the detail sub-package's first element.
Move the initialisation of 'detail' before the revision check and
read the revision from detail->Package.Elements[0] as the comment
already states
Approved by: obiwac
Differential Revision: https://reviews.freebsd.org/D55639
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
| |
Fix the error message in nvme_sim_ns_removed that was cut and pasted
from nvme_sim_ns_changed to reflect its new home. No functional change.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D55522
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
While the majority of virtio platforms will be fully coherent, some may
require cache maintenance or other specific device memory handling (eg for
secure partitioning). Using bus_dma allows for these usecases.
The virtio buffers are marked as coherent; this should ensure that sync
calls are no-ops in the common cases.
Reviewed by: andrew, br
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D54960
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
While the majority of virtio platforms will be fully coherent, some may
require cache maintenance or other specific device memory handling (eg for
secure partitioning). Using bus_dma allows for these usecases.
The virtio buffers are marked as coherent; this should ensure that sync
calls are no-ops in the common cases.
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D54959
|
| |
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55531
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we have virtual_oss running, this devd notification will make sure to
automatically transfer sound to the new default unit, while also making
sure that we switch to it only for the supported directions (recording
and/or playback).
For more information, please refer to 2ffaca551eaf ("snd_hda: Implement
automatic redirection between associations").
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55530
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We retired most obsolete 10 and 10/100 Ethernet NIC drivers in 2019 --
see commits following ebcf740a32ae ("FCP-101: remove obsolete 10 and
10/100 Ethernet drivers.).
le(4) was retained with with the note "Emulated by QEMU, alternatives
don't yet work for mips64." MIPS has since been removed from the tree
and emulators and virtual machines offer many other, more suitable
devices.
Reviewed by: brooks
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55516
|
| |
|
|
|
|
|
|
|
|
| |
virtio_pci uses two loader tunables that should be more visible.
This patch adds these loader tunables to sysctl and describes them
in the virtio(4) man page.
Reviewed by: imp (erlier version), tuexen
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55533
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The SMC firmware revision can prove helpful when determining why the
behavior of a given controller varies from the maintainers' expected
behavior.
This should be a sysctl (eventually), but for now dumping out the
information via `device_printf(..)` suffices, given that only one
asmc(4) compatible device can exist in an Apple platform at any
given point in time. This will become a sysctl in the future after
additional improvements are incorporated from OpenBSD and NetBSD.
MFC after: 1 week
Obtained from: https://github.com/openbsd/src/ (sys/dev/acpi/asmc.c @ 142d064)
Differential Revision: https://reviews.freebsd.org/D55577
|