commit 85814f5912618808ebe5b7065b70344675c98b5b Author: Abdelkader Boudih Date: Wed Jun 17 07:50:48 2026 -0700 est: gate "not recognized" message behind bootverbose On modern Intel CPUs that use HWP (hwpstate_intel: /usr/src/sys/x86/cpufreq/hwpstate_intel.c) instead of EST, this message prints unconditionally during probe even though it is expected and harmless. Gated behind bootverbose to reduce console noise on systems where EST is present but considered legacy. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57616 commit 021a190c88fc41f981a79fe6822bdafbcda14e99 Author: Abdelkader Boudih Date: Wed Jun 17 07:49:52 2026 -0700 est: prevent divide-by-zero in est_msr_info When hw.est.msr_info=1 is set, est_msr_info() extracts the bus clock from MSR_PERF_STATUS upper bits. On secondary CPUs, the MSR may contain zero in the frequency ratio field, causing a divide-by-zero panic. Observed in pre Skylake Intel cpu. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57614 commit f981fa12b760a5f0983eeec8065a4dec5295ab24 Author: Abdelkader Boudih Date: Wed Jun 17 07:30:21 2026 -0700 mtw: Fix firmware loading and memory leaks - Skip firmware reload if MCU already initialized - Fix firmware_put() memory leaks on error paths - Increase MCU init timeout to 15 seconds - Use debug macros instead of device_printf for verbose output - Remove unused 'ret' variable - Fix space indentation to tabs per style(9) Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57597 commit 142cba958b7a6dd11e4257740db03d335475ede8 Author: Abdelkader Boudih Date: Sun Jun 14 13:55:33 2026 -0700 bge: read MAC from loader hint for boards without NVRAM/EEPROM BCM57766 on Apple T2 Macs (Macmini8,1) has no dedicated EEPROM and the chip firmware handshake fails (the T2 intercepts PCI config space), leaving the SRAM mailbox unpopulated. All four existing MAC retrieval paths (SRAM mailbox, NVRAM, EEPROM, firmware stub) fail, causing bge to abort attach with "failed to read station address". Work around this with two changes: 1. Tolerate EEPROM read failure on BCM57766. The chip is copper-only so hwcfg=0 is correct; skip the fatal error that aborts attach before bge_get_eaddr() is ever called. 2. Implement bge_get_eaddr_fw() to read a "hint.bge.N.mac" string (e.g. "f0:18:98:f4:1e:2f") from loader(8) tunable / kenv. This is a workaround until the T2 BCE API is understood well enough to either poke the chip firmware into completing its handshake or read the MAC from the T2 directly. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57090 commit e37e49bfaa2763f0ce522a3e54de9b494e346465 Author: Abdelkader Boudih Date: Sun Jun 14 13:55:12 2026 -0700 asmc: fix asmc_key_dump() page fault on T2 MMIO backend asmc_key_dump() used I/O port macros (ASMC_DATAPORT_WRITE/READ, asmc_command()) unconditionally. On T2 Macs, sc_ioport is NULL (MMIO backend is used instead), causing a page fault when ASMC_DEBUG triggers asmc_dumpall() during attach. Add an MMIO guard at the top of asmc_key_dump(): delegate to asmc_key_dump_by_index() + asmc_key_read() for MMIO devices, consistent with the rest of the T2 code paths. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D56748 commit 9f90536c74b8172fc67cd977e5451f37a12462d5 Author: Abdelkader Boudih Date: Sun Jun 14 13:54:28 2026 -0700 apple_bce/vhci: add T2 virtual USB host controller Implements a VHCI driver on top of the BCE transport: - Virtual USB bus registration via usb_controller - Port discovery and device enumeration - Control, interrupt, and bulk endpoint support - Firmware event handling with taskqueue - Suspend/resume via BCE mailbox Provides keyboard, trackpad, and Touch Bar access on T2 Macs. Tested-on: MacBookPro16,2 (A2251), Mac mini 8,1 (A1993) Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57089 commit 6fd2ad9aa39db916bf2da9607653fb133f8fa078 Author: Abdelkader Boudih Date: Sun Jun 14 13:54:03 2026 -0700 apple_bce: add Apple T2 Buffer Copy Engine driver DMA ring transport between the host and the T2 coprocessor. Provides mailbox handshake, queue setup, and firmware keepalive for higher-level T2 services (VHCI, audio, etc.). Tested-on: MacBookPro16,2 (A2251), Mac mini 8,1 (A1993) Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57088 commit 5e0ba47aa00ed82a4a06cc45f0d1b34b6948e47f Author: Abdelkader Boudih Date: Sun Jun 14 13:43:57 2026 -0700 nvme: add Apple T2 ANS2 NVMe quirks The Apple T2 (ANS2, PCI 106b:2005) requires several quirks: - 128-byte submission queue entries (CC.IOSQES = 7) - Single MSI vector, one IO queue - Admin and IO queues share a CID table; IO CIDs offset by adminq.num_trackers to avoid overlap - No async event support - IDENTIFY CNS >= 2 rejected to avoid firmware confusion Tested-on: - MacBookPro16,2 (A2251) - Mac mini 8,1 (A1993) - Multiple Non-Apple computers Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D57087 commit a9519f7821c066c393690603eab33043f3804a0c Author: Abdelkader Boudih Date: Mon Jun 8 07:30:29 2026 -0700 firewire: Fix watchdog_clock aliasing and fw_tl2xfer UAF race Two bugs in the firewire bus layer that affect all consumers ( if_fwip, sbp): watchdog_clock was a static local in firewire_watchdog(), shared across all firewire_comm instances. With two controllers (e.g. built-in + Thunderbolt Display), both advance the same counter, so the second controller's 15-second boot-time timeout guard expires prematurely. fw_tl2xfer() released tlabel_lock before returning the xfer pointer. Reviewed by: zlei, adrian Differential Revision: https://reviews.freebsd.org/D57496 commit 4a299ef19c7ed20aca6593a1c01b2dc16d9af1a0 Author: Abdelkader Boudih Date: Sat Jun 6 13:17:18 2026 -0700 firewire: clean up XXX comments Remove stale and misleading XXX comments throughout firewire.c. Most were from the original 2002 codebase and either described correct behavior or noted aspirational improvements that never happended. Two actionable items retained as TODO: config ROM CRC validation and pending xfer cleanup on detach. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57466 commit a620746da173d1583b342b096419297e33d0ed15 Author: Abdelkader Boudih Date: Sat Jun 6 13:08:59 2026 -0700 fix(fwe): add missing net epoch around ether_input Wrap the if_input() call in fwe_as_input() with NET_EPOCH_ENTER/EXIT. The network stack requires epoch protection when delivering packets via if_input, and fwe was missing it. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D57459 commit a48b900300ebdbd5c47e664b4cc06e705da91bd8 Author: Abdelkader Boudih Date: Tue Jun 2 22:57:49 2026 -0700 asmc: add MMIO backend for T2 Macs T2 Macs (2018+) expose the SMC via memory-mapped registers instead of I/O ports. Add asmcmmio.c/asmcmmio.h implementing the MMIO transport: key read/write, getinfo, getbyindex, and a poll-based wait with exponential backoff. The driver probes for MMIO at attach time by checking the LDKN firmware version key; if MMIO is available it is used, otherwise the standard I/O port backend is used. T2 fan speeds use IEEE 754 floats instead of fpe2 fixed-point. Per-fan manual mode uses F%dMd keys instead of the FS! bitmask. Battery charge limit is exposed via dev.asmc.N.battery_charge_limit. Tested on: MacBookPro16,2 (A2251, iBridge2,10) MacBookPro15,4 (A2159, iBridge2,8) MacBookAir8,2 (A1932, iBridge2,5) Mac mini 8,1 (A1993, iBridge2,7) iMac20,2 (A2115, iBridge2,16) iMacPro1,1 (A1862, iBridge1,1) MFC after: 2 weeks Reviewed by: ngie, adrian Differential Revision: https://reviews.freebsd.org/D57086 commit 65341ec3172936804b081c8ceca9bae88f5c7192 Author: Abdelkader Boudih Date: Tue May 19 14:24:14 2026 +0200 snd_hda: Reassign duplicate HDMI/DP pin sequences instead of disabling Some firmware (e.g. Apple EFI on Sandy Bridge Mac hardware) programs all HDMI/DP output pins in an association with identical sequence numbers. The existing code disables the entire association on the first duplicate, leaving HDMI/DP audio non-functional. For digital output pins (HDMI/DP) with seq=0 duplicates, search for the next free sequence slot and reassign the duplicate rather than disabling. The seq=0 restriction targets the known Apple firmware pattern; any other duplicate sequence is more likely a genuine firmware error and the association is still disabled. Update first after reassignment so that hpredir is not left pointing at a stale sequence. Non-digital and input associations retain the existing disable behaviour. MFC after: 1 week Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D55473 commit 3abc07947c14f5c30e5328d56a2da8dbf8412ebf Author: Abdelkader Boudih Date: Mon May 18 07:01:20 2026 -0700 asmc: fix asmc_key_dump() page fault on T2 MMIO backend asmc_key_dump() used I/O port macros (ASMC_DATAPORT_WRITE/READ, asmc_command()) unconditionally. On T2 Macs, sc_ioport is NULL (MMIO backend is used instead), causing a page fault when ASMC_DEBUG triggers asmc_dumpall() during attach. Add an MMIO guard at the top of asmc_key_dump(): delegate to asmc_key_dump_by_index() + asmc_key_read() for MMIO devices, consistent with the rest of the T2 code paths. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D56748 commit 081d3ab24e03d271a0de3b173802fbe71f52e8aa Author: Abdelkader Boudih Date: Tue May 5 16:59:10 2026 -0700 ichsmb: add Ice Lake-LP (0x34a3) and Ice Lake-N (0x38a3) SMBus device IDs Add PCI device IDs for two Ice Lake PCH SMBus controller variants: - 0x34a3 (Ice Lake-LP), previously listed as the generic "Ice Lake" entry (ID_ICELAKE), renamed to ID_ICELAKELP for clarity. - 0x38a3 (Ice Lake-N), a separate PCH variant not previously supported. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D56732 commit 7619d14d08a0036a07dce670f55b9568f8133b38 Author: Abdelkader Boudih Date: Tue May 5 12:49:01 2026 -0700 acpi_panasonic: acquire serial lock before calling hkey_sound_mute in shutdown acpi_panasonic_shutdown() calls hkey_sound_mute() without holding the ACPI serial lock. Every other call site holds `ACPI_SERIAL_BEGIN(panasonic)` before calling it, as the locking model is caller-owned. This seems to affect the whole Panasonic Toughtbook lineup btw. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D56718 commit 36b399f55e3fa16063188b6f8ad8eaaf8c2215ab Author: Abdelkader Boudih Date: Mon May 4 07:26:44 2026 -0700 asmc: rename wol sysctl to auto_poweron Older SMC firmware exposed AUPO as a Wake-on-LAN control. On updated firmware, the key controls automatic power-on when AC power is restored after a power loss; WoL is handled by the GBE controller instead. Rename the sysctl to reflect the current semantics. No compatibility alias is provided as the sysctl has not appeared in any release. Reviewed by: ziaee, adrian Differential Revision: https://reviews.freebsd.org/D56747 commit e7f4269dbfad02119934c35d523cb33ff8c93493 Author: Abdelkader Boudih Date: Wed Apr 29 17:38:38 2026 -0700 asmc: replace hardcoded model table with universal probing Probe SMC keys at attach time to detect hardware capabilities, supporting all Intel Apple machines without per-model entries. Sensors are discovered by scanning sorted SMC key ranges for known prefixes and types. Capabilities such as SMS, fan safe speed, and ambient light are detected by key presence. A global key description table provides human-readable names for well-known temperature sensors. Tested on: - MacBook Pro (Early 2007, Mid 2014, Mid 2015) - MacBook Air (Early 2015, Mid 2017) - iMac (Mid 2011, Late 2013) - Mac mini (Mid 2011) Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D56405 commit aae9068404947dd9ffd8522359d0f9dffaa70414 Author: Abdelkader Boudih Date: Thu Apr 16 19:31:21 2026 -0700 asmc: add automatic voltage/current/power/ambient sensor detection Apple SMCs contain numerous undocumented voltage, current, power, and ambient light sensors. This change adds automatic detection and registration of these sensors as sysctls. New sysctl trees: dev.asmc.0.voltage.* - Voltage sensors (millivolts) dev.asmc.0.current.* - Current sensors (milliamps) dev.asmc.0.power.* - Power sensors (milliwatts) dev.asmc.0.ambient.* - Ambient light sensors Implementation: - Scans all SMC keys at attach time via asmc_key_dump_by_index() - Identifies sensors by key prefix patterns: - Voltage: VC*, VD*, VG*, VP*, VI* - Current: I{C,D,G,M,N,O,H,P,B,A,L}* - Power: P{C,D,N,S,T,H,F,Z,z}* - Light: ALV*, ALS* - Dynamically creates sysctls for detected sensors - Supports 8 fixed-point SMC data types: - sp78, sp87, sp4b, sp5a, sp69, sp96, sp2d, ui16 - Auto-converts all values to milli-units (mV, mA, mW) On Mac Mini 5,1, detects: - 7 voltage sensors - 18 current sensors - 27 power sensors - 2 ambient light sensors Enables power consumption monitoring, voltage rail debugging, and ambient light detection without hardcoding model-specific sensor lists. Tested on: - Mac Mini 5,1 (2011) running FreeBSD 15.0-RELEASE - 54 sensors auto-detected and exposed via sysctl - All sensor types verified with multimeter readings - Fixed-point conversions validated against known values - Memory management tested (malloc/free on detach) Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D55807 commit a85c4ab626ef52530400ace1957daaa35dd07534 Author: Abdelkader Boudih Date: Mon Apr 13 19:29:43 2026 -0700 appleir: Add Apple IR receiver driver HID driver for Apple IR receivers (USB HID, vendor 0x05ac). Supports Apple Remote and generic IR remotes using NEC protocol. Supported hardware: - Apple IR Receiver (0x8240, 0x8241, 0x8242, 0x8243, 0x1440) Apple Remote protocol (proprietary 5-byte HID reports): - Key down/repeat/battery-low detection - 17-key mapping with two-packet command support - Synthesized key-up via 125ms callout timer Generic IR remotes (NEC protocol): - Format: [0x26][0x7f][0x80][code][~code] - Checksum: code + ~code = 0xFF - Default keymap with 8 common codes - See: https://techdocs.altium.com/display/FPGA/NEC+Infrared+Transmission+Protocol Output via evdev with standard KEY_* codes. Raw HID access available at /dev/hidraw0 for custom remapping. Based on protocol reverse-engineering by James McKenzie et al. Reference: drivers/hid/hid-appleir.c (Linux) Tested on Mac Mini 2011 (0x05ac:0x8242). Differential Revision: https://reviews.freebsd.org/D55472 commit 3e27114a7f961aac49d75a663a55332375d0bef3 Author: Abdelkader Boudih Date: Tue Apr 14 21:20:52 2026 -0700 asmc: add raw SMC key read/write interface This patch adds a debugging interface to read and write arbitrary Apple SMC keys by name through sysctl, enabling hardware exploration and control of undocumented features. The interface provides four sysctls under dev.asmc.0.raw.*: - key - Set the 4-character SMC key name (e.g., "AUPO") - value - Read/write key value as a hex string - len - Auto-detected key value length (can be overridden) - type - Read-only 4-character type string (e.g., "ui8", "flt") Implementation includes a new asmc_key_getinfo() function using SMC command 0x13 to query key metadata. The interface automatically detects key lengths and types, uses hex string encoding for arbitrary binary values, and is safe for concurrent access via CTLFLAG_NEEDGIANT. This interface was essential for discovering that the AUPO key enables Wake-on-LAN from S5 state, and for mapping all 297 SMC keys on Mac Mini 5,1. Reviewed by: ngie, adrian, markj Differential Revision: https://reviews.freebsd.org/D54441 commit e7de7feb74262bfdb04d285846bac2fc6229f734 Author: Abdelkader Boudih Date: Sat Mar 28 19:54:28 2026 -0700 usbdevs: Add USB device IDs for Nuand bladeRF SDR Add vendor and product IDs for bladeRF family of USB software defined radios manufactured by Nuand LLC. Reviewed by: imp, adrian Differential Revision: https://reviews.freebsd.org/D54733 commit 3d218b6289cf4675abdeef17a4489e71f8e1935e Author: Abdelkader Boudih Date: Fri Mar 20 11:28:42 2026 -0400 cam (scsi): silence "Medium not present" SCSI sense logging for removable media Change SS_FATAL to SS_FAIL for SCSI sense code 0x3A (Medium not present) to suppress console spam when card readers or other removable media devices have no media inserted. The error is still returned to callers (ENXIO), but no longer prints to dmesg during boot/probe. Verified with Apple SD Card Reader - reduced boot messages from 4 to 2. Reviewed by: emaste, imp Differential Revision: https://reviews.freebsd.org/D55287 commit 94db365042d35ff7e3ee7365a87a89bab1560030 Author: Abdelkader Boudih Date: Tue Feb 24 22:32:42 2026 -0800 asmc: add Wake-on-LAN control via sysctl Apple Mac systems support Wake-on-LAN from powered-off state (S5/G2) via the AUPO SMC key. This change adds a convenience sysctl, `dev.asmc.0.wol`. This can be disabled if set to 0 and enabled if set to 1. The AUPO key is volatile and resets to 0x00 on every boot, so WoL must be manually enabled before each shutdown to work from powered-off state. Users need to run: `sysctl dev.asmc.0.wol=1` before shutting down the system. The sysctl is best set to persist in `/etc/sysctl.conf`. MFC after: 1 week Reviewed By: markj, ngie Differential Revision: https://reviews.freebsd.org/D54439 commit 16822dac32ab8955539ffa4eda05145df8638154 Author: Abdelkader Boudih Date: Mon Feb 23 17:11:10 2026 +0100 acpi_panasonic: Clear wireless RF_KILL on boot and resume On Panasonic FZ-Y1 and similar models, the EC latches RF_KILL on shutdown and suspend when battery is at certain level, causing wireless to boot with hard block. Call WLSW.SHRF during attach and resume to clear the block. Tested on Panasonic FZ-Y1 with Intel Wireless 7265. Reviewed by: adrian, obiwac Approved by: adrian, obiwac Differential Revision: https://reviews.freebsd.org/D55265 commit e4bcfe4ebf03e321a5f8317491cdeea49e4f6357 Author: Abdelkader Boudih Date: Sun Feb 15 19:58:41 2026 -0800 ichsmb: Add Intel Raptor Lake SMBus controller support 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 commit 90d79dd549461dac053b34d47ae32968afb2834c Author: Abdelkader Boudih Date: Sat Feb 14 17:44:50 2026 -0800 asmc: Add MacPro3,1 temperature sensor support Test and verified with Sonicblue7 Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D54952 commit 1a6bdd6266e3b53c8b6b597a77a100353b7ae13a Author: Abdelkader Boudih Date: Thu Feb 12 19:00:22 2026 -0800 asmc: Convert driver to CTLFLAG_MPSAFE 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 commit 067ad8b31bf68b6dcf1ad571746349ed88d63d00 Author: Abdelkader Boudih Date: Fri Feb 6 17:12:56 2026 +0100 thunderbolt: Fix tb_pcib device matching to check PCI class Light Ridge and earlier Thunderbolt controllers reuse the same device ID (0x1513) for both the NHI (class 0x088000) and PCI bridges (class 0x060400). Without checking the PCI class, tb_pcib would incorrectly match NHI devices, causing a panic when trying to attach bridge code to non-bridge hardware. Add PCI class check to tb_pcib_find_ident() to only match actual PCI-PCI bridges (PCIC_BRIDGE/PCIS_BRIDGE_PCI). Reviewed by: obiwac, jhb Approved by: obiwac, jhb Fixes: 2ed9833791f2 (thunderbolt: Import USB4 code) Differential Revision: https://reviews.freebsd.org/D55102 commit ed3a2469a71e0ef48cf8e636c35e64a011756da3 Author: Abdelkader Boudih Date: Mon Feb 2 21:21:43 2026 -0600 uart: fix sleeping while holding mutex in uart_tty_detach() Move swi_remove() call before acquiring the tty lock. swi_remove() calls intr_event_remove_handler() which may sleep via msleep(), causing a lock order violation when called with the tty mutex held. The software interrupt handler removal operates on the interrupt event structure independently and does not require the tty lock. This matches the pattern used in other drivers such as tcp_hpts.c where swi_remove() is called without holding other locks. Reviewed by: imp, kevans MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54953 commit 052a791b00555805f19ccc38a04d42d48b54104b Author: Abdelkader Boudih Date: Mon Feb 2 17:43:00 2026 -0800 acpi: add Darwin OSI quirk for Apple Mac hardware Mac firmware hides the Intel integrated GPU (iGPU) on dual GPU x86 systems, i.e., with AMD/NVIDIA dGPUs, when the Darwin OSI is not installed via ACPI. Prior to this change, FreeBSD always used the dGPU. This is fine in practice, but consumed more power than when the iGPU is used, resulting in reduced battery life. Linux handles this in `drivers/acpi/osi.c` by detecting Apple hardware via DMI, disabling all Windows OSI strings, and by explicitly installing the Darwin OSI ACPI handler. This change applies equivalent logic to the acpi(4) driver on FreeBSD. This feature can be enabled/disabled using the `hw.acpi.apple_darwin_osi` tunable. Setting this tunable to `0` restores the previous behavior by explicitly disabling the added support. Reviewed by: obiwac, ngie, adrian Differential Revision: https://reviews.freebsd.org/D54762 commit fdcd67be8274d237ae2c87d6475d9d34b440b8d8 Author: Abdelkader Boudih Date: Thu Jan 29 18:02:47 2026 -0600 firmware: Fix inverted FIRMWARE_GET_NOWARN logic The try_binary_file() function has inverted logic for the FIRMWARE_GET_NOWARN flag. When the flag is set (meaning "don't warn"), the code sets warn=true and makes noise anyway. Invert the assignment to warn to correctly suppress warnings when FIRMWARE_GET_NOWARN is set. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D54955 commit c498eaa2f9090d7bdc6456181d8bf74869288bbb Author: Abdelkader Boudih Date: Tue Jan 13 19:13:46 2026 -0800 asmc: Add support for MacBookPro11,5 Add support for the MacBookPro11,5 (Mid 2015, 15-inch with AMD Radeon R9 M370X GPU) to the Apple SMC driver. Debug testing revealed this model lacks several SMC keys present on MacBookPro11,4 (IBLC, ICMC, IC2C), that model-specific sensor definitions. Differential Revision: https://reviews.freebsd.org/D54665 Reviewed by: adrian commit a24166d23d2e93e787165064fac75215d4383c65 Author: Abdelkader Boudih Date: Tue Jan 13 18:35:53 2026 -0800 mtw(4): Fix warm reboot initialization failures for MT7601U The mtw(4) driver works correctly on initial boot, but fails to initialize the MT7601U WiFi adapter after a warm reboot. Users must either physically unplug and replug the USB adapter, or perform a full power cycle to restore functionality, if usb power is always powered (only a replug works) The root cause is that warm reboot does not power-cycle USB devices, leaving the MT7601U in a stale state from the previous session. The MCU retains its ready flag and the device ignores initialization commands, resulting in timeout waiting for MCU to initialize errors. At the OS Level, pinging 1.1.1.1 will work, but the speed will be very slow. In addition in debug mode, we see thousand of error logs. This patch addresses the issue by: * Performing USB re-enumeration on attach to reset the device state * Detecting when the MCU is already marked ready (stale from previous session) and forcing a reset of the MCU before loading firmware * Increasing the firmware load timeout from 3s to 10s to accommodate slower initialization after reset * Increasing MCU ready poll attempts from 100 to 300 with longer delays to handle devices that take longer to become ready after reset Note: The increase was random, lower value might work. Test Plan: Tested on MacBook Pro (late-2015) and a MacMini with MediaTek MT7601U USB adapter across multiple warm reboot cycles. With the mac-mini and a another desktop, the issue happens only if connected via an always powered usb hub port in the monitor. The laptop don't power cycle it power. Differential Revision: https://reviews.freebsd.org/D54659 Reviewed by: adrian commit 2c029cff5ba3716757646a2d2c89db49987c1e98 Author: Abdelkader Boudih Date: Mon Jan 12 00:55:45 2026 +0000 ads111x: Convert driver to CTLFLAG_MPSAFE Replace CTLFLAG_NEEDGIANT with CTLFLAG_MPSAFE for all ADC sensor sysctls. All of the sysctl handlers are serialized by a driver mutex. Sysctls converted: - dev.ads111x.X.channelN.gain_index (PGA setting) - dev.ads111x.X.channelN.rate_index (sample rate) - dev.ads111x.X.channelN.voltage (sampled voltage) - dev.ads111x.X.config (configuration register) - dev.ads111x.X.lo_thresh (comparator low threshold) - dev.ads111x.X.hi_thresh (comparator high threshold) Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54620 commit 0672e0e38a08c580f723a02bb183344d8c7cee65 Author: Abdelkader Boudih Date: Mon Jan 12 00:51:57 2026 +0000 isl: Convert driver to CTLFLAG_MPSAFE Replace CTLFLAG_NEEDGIANT with CTLFLAG_MPSAFE for all light sensor sysctls. All of the sysctl handlers are serialized by a driver mutex. Sysctls converted: - dev.isl.X.als (ambient light sensor) - dev.isl.X.ir (infrared sensor) - dev.isl.X.prox (proximity sensor) - dev.isl.X.resolution (sensor resolution) - dev.isl.X.range (sensor range) Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54621 commit c2a55efd74cccb3d4e7b9037b240ad062c203bb8 Author: Abdelkader Boudih Date: Mon Jan 12 00:36:09 2026 +0000 jme: Convert driver to CTLFLAG_MPSAFE Replace CTLFLAG_NEEDGIANT with CTLFLAG_MPSAFE for all interrupt coalescing sysctls. The driver uses jme_mtx mutex for proper synchronization and does not require Giant lock. Sysctls converted: - dev.jme.X.tx_coal_to (TX coalescing timeout) - dev.jme.X.tx_coal_pkt (TX coalescing packet count) - dev.jme.X.rx_coal_to (RX coalescing timeout) - dev.jme.X.rx_coal_pkt (RX coalescing packet count) - dev.jme.X.process_limit (max RX events to process) Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54618 commit 1ecac45cfc5f0886907c34ec0da2c1b32618665d Author: Abdelkader Boudih Date: Mon Jan 5 18:03:23 2026 +0000 asmc: add per-fan manual mode control via sysctl Add per-fan manual mode control via dev.asmc.0.fan.N.manual sysctl. Apple SMCs support manual fan control via the FS! SMC key, a 16-bit bitmask where each bit controls one fan (0=auto, 1=manual). This change adds a new sysctl per fan: dev.asmc.0.fan.N.manual (0=auto, 1=manual) When set to manual mode (1), the fan runs at the speed set via dev.asmc.0.fan.N.targetspeed instead of automatic thermal control. When set to auto mode (0), the SMC controls fan speed automatically. The FS! key was already defined in asmcvar.h but not accessible. This exposes it for debugging, testing, and advanced fan control. Implementation uses read-modify-write to allow independent control of each fan without affecting others. Reviewed by: adrian, markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D54437 commit 2a7c4685b7693bfa15e2bd4d5e82905a368b0030 Author: Abdelkader Boudih Date: Sat Jan 3 10:33:11 2026 -0800 asmc: improve asmc_dumpall to read actual SMC key count The asmc_dumpall debug function previously used a hardcoded loop limit of 0x100 (256) keys with a "XXX magic number" comment. This change improves asmc_dumpall to: * Read the actual number of keys from the ASMC_NKEYS SMC key * Print the key count being dumped for better debugging output * Loop only up to the actual key count (e.g., 297 on Mac Mini 5,1) This provides more accurate debug output and removes the magic number. Tested on Mac Mini 5,1 (FreeBSD 16.0-CURRENT): * Rebuild kernel with DEBUG enabled in asmc driver * Boot with new kernel * Verify dmesg shows "asmc_dumpall: dumping 297 keys" (or actual count) * Verify all 297 keys are dumped Differential Revision: https://reviews.freebsd.org/D54436 Reviewed by: markj, adrian