summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2026-08-14HID: stadia: use open/close to manage workqueue lifecycleDmitry Torokhov1-33/+38
Override input device open() and close() callbacks to enable and disable the force-feedback workqueue item synchronously. When the input device is opened by userspace, call hid_hw_open() and enable_work(). When it is closed, disable_work_sync() ensures that any pending or running work item is cancelled/flushed and no further work items can be scheduled. In close(), zero out magnitudes and issue a final report to turn off the rumble motors on the physical controller before shutting down transport I/O. Pack strong and weak magnitudes into a single u32 integer using WRITE_ONCE() and READ_ONCE() for atomic, lockless updates. This allows eliminating the manual 'removed' boolean flag and spinlock completely. Assisted-by: Antigravity:gemini-3.6-flash Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
2026-08-14HID: gaff: move FF initialization to .input_configured()Dmitry Torokhov1-43/+10
The driver currently initializes force-feedback in its probe() function after calling hid_hw_start() with HID_CONNECT_DEFAULT. This is racy as the input device is already registered and visible to userspace at that point. Move the FF initialization to the .input_configured() callback to ensure the device is fully prepared before registration. Assisted-by: Gemini:gemini-3.1-pro Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
2026-08-14HID: emsff: move FF initialization to .input_configured()Dmitry Torokhov1-42/+8
The driver currently initializes force-feedback in its probe() function after calling hid_hw_start() with HID_CONNECT_DEFAULT. This is racy as the input device is already registered and visible to userspace at that point. Move the FF initialization to the .input_configured() callback to ensure the device is fully prepared before registration. Assisted-by: Gemini:gemini-3.1-pro Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
2026-08-14HID: dragonrise: move FF initialization to .input_configured()Dmitry Torokhov1-51/+15
The driver currently initializes force-feedback in its probe() function after calling hid_hw_start() with HID_CONNECT_DEFAULT. This is racy as the input device is already registered and visible to userspace at that point. Move the FF initialization to the .input_configured() callback to ensure the device is fully prepared before registration. Assisted-by: Gemini:gemini-3.1-pro Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
2026-08-14HID: bigben: move FF initialization to .input_configured()Dmitry Torokhov1-46/+43
The driver currently initializes force-feedback in its probe() function after calling hid_hw_start() with HID_CONNECT_DEFAULT. This is racy as the input device is already registered and visible to userspace at that point. Move the FF initialization to the .input_configured() callback to ensure the device is fully prepared before registration. Assisted-by: Gemini:gemini-3.1-pro Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
2026-08-14HID: betop: move FF initialization to .input_configured()Dmitry Torokhov1-22/+11
The driver currently initializes force-feedback in its probe() function after calling hid_hw_start() with HID_CONNECT_DEFAULT. This is racy as the input device is already registered and visible to userspace at that point. Move the FF initialization to the .input_configured() callback to ensure the device is fully prepared before registration. Assisted-by: Gemini:gemini-3.1-pro Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
2026-08-14HID: axff: move FF initialization to .input_configured()Dmitry Torokhov1-28/+12
The driver currently initializes force-feedback in its probe() function after calling hid_hw_start() with HID_CONNECT_DEFAULT. This is racy as the input device is already registered and visible to userspace at that point. Move the FF initialization to the .input_configured() callback to ensure the device is fully prepared before registration. Assisted-by: Gemini:gemini-3.1-pro Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
2026-08-14HID: core: automatically initialize generic FF if no other FF is presentDmitry Torokhov1-1/+14
Some HID drivers initialize their own force-feedback support within their .input_configured() callback. In such cases, we should skip the generic PID force-feedback initialization to avoid conflicts and redundant setup. Add hid_has_ff_input() helper and use it to check for existing FF capabilities before calling hdev->ff_init(). Since we now have a dynamic way to detect if force-feedback is needed, the HID_CONNECT_FF flag is redundant for conflict resolution and can be ignored in the core initialization logic. Generic PID support will now be attempted by default for any claimed input device that doesn't already have FF capabilities. Assisted-by: Gemini:gemini-3.1-pro Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
2026-08-14Input: misc: Add AMD SFH tablet-mode switch driverBasavaraj Natikar3-0/+97
Report whether an AMD convertible is in laptop or tablet mode using the operating-mode sensor provided by the Sensor Fusion Hub, and expose it to userspace as SW_TABLET_MODE, so userspace can react to the device being folded into tablet posture. Cc: Helge Bahmann <hcb@chaoticmind.net> Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
2026-08-14HID: amd_sfh: Register tablet-mode auxiliary deviceBasavaraj Natikar3-0/+53
Register an auxiliary device when the operating-mode sensor is present, so a dedicated input driver can bind to it and report the device posture. This keeps the input handling out of the sensor transport driver. Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
2026-08-14HID: amd_sfh: Add accessor to read the operating-mode sensorBasavaraj Natikar5-1/+58
Allow other drivers to query the operating mode (laptop or tablet) reported by the Sensor Fusion Hub. This is the interface used by the tablet-mode switch driver to report the device posture to userspace. Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
2026-08-14HID: amd_sfh: Serialize access to the shared emp2 pointerBasavaraj Natikar1-0/+6
The SFH accessors reach the device through a file-global emp2 pointer that is published at probe and cleared on remove. amd_get_sfh_info() is exported and called from other modules on unrelated threads, so a reader can observe a non-NULL emp2 and then race a concurrent unbind that clears it and frees the device. Serialize the emp2 publish/clear and all readers under a mutex, so a reader either sees a live device for the whole access or sees NULL. Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
2026-08-14HID: amd_sfh: Track MP2 version explicitlyBasavaraj Natikar2-4/+11
The MP2 version is currently known only implicitly, from whether an ops pointer was stored in the PCI driver_data. Subsequent changes need to act on the MP2 version directly, for example to read the operating-mode register only on confirmed MP2 v2. Track the MP2 version explicitly so that version-specific behaviour can be gated on it, and leave it unset for generations that do not require such handling. Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
2026-08-14drm/virtio: Fix a NULL vs ERR_PTR() bug in virtio_gpu_user_framebuffer_create()Dan Carpenter1-1/+1
Smatch complains that returning a NULL here will lead to a NULL pointer dereference in drm_mode_addfb2(). Return an error pointer instead. Fixes: dc5698e80cf7 ("Add virtio gpu driver.") Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Link: https://patch.msgid.link/an1tWfHIHwtXd9SO@stanley.mountain
2026-08-14spi: ma35d1-qspi: Improvements and DTR supportMark Brown1-40/+68
Miquel Raynal <miquel.raynal@bootlin.com> says: I am in possession of an MA35D1 NuMaker board. The SPI controller has been contributed, but: 1- it lacks a DT descriptions [1] 2- it does not work with current clock driver [2] 3- it can be improved Link: https://lore.kernel.org/linux-arm-kernel/20260813-perso-ma35d1-upstream-dts-v1-0-bb237fd7c3c2@bootlin.com [1] Link: https://lore.kernel.org/linux-clk/20260813-perso-ma35d1-upstream-clk-v1-1-e78e5e6172ea@bootlin.com [2] This series is addressing #3 by: - reusing existing helpers - refactoring a bit the code - adding DTR support Link: https://patch.msgid.link/20260813-perso-ma35d1-upstream-qspi-v1-0-b217b9870eb1@bootlin.com
2026-08-14spi: ma35d1-qspi: Use the existing update helperMiquel Raynal1-7/+8
Read modify writes are already covered by a local helper, so use it. No functional change. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20260813-perso-ma35d1-upstream-qspi-v1-5-b217b9870eb1@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-14spi: ma35d1-qspi: Add DTR supportMiquel Raynal1-8/+19
The controller has DTR support, a bit must be set for it. The behaviour is interesting though, as the speed won't improve when enabled. This is because there seems to be an internal divisor (/2) which keeps the rate equal when DTR is enabled. As a result, this commit also doubles the target bus speed, which in practice does not happen. This way, there is a real gain: Before: $ flash_speed /dev/mtd0 -dc10 eraseblock write speed is 1000 KiB/s [...] eraseblock read speed is 1199 KiB/s [...] After: $ flash_speed /dev/mtd0 -dc10 eraseblock write speed is 985 KiB/s [...] eraseblock read speed is 1540 KiB/s [...] Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20260813-perso-ma35d1-upstream-qspi-v1-4-b217b9870eb1@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-14spi: ma35d1-qspi: Allow several command bytesMiquel Raynal1-6/+5
The controller is capable of sending several bytes for the command, it does not even know this is a command. Just mimic the address steps here to allow double byte commands, which may be needed for DTR support. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20260813-perso-ma35d1-upstream-qspi-v1-3-b217b9870eb1@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-14spi: ma35d1-qspi: Move speed setting to bus configurationMiquel Raynal1-25/+44
The speed setting is wrongly placed inside the "setup transfer" helper, since the bus configuration may require the speed to be correct. Indeed, DTR mode (not yet available) divides by 2 the bus clock when enabled. As a result, to remain at a constant clock speed (and improve the data rate), we must double the bus clock when enabling DTR. In order to prepare for this change, move all the bus configuration required for each step of the operation inside a unique helper called nuvoton_qspi_configure_bus(). Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20260813-perso-ma35d1-upstream-qspi-v1-2-b217b9870eb1@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-14spi: ma35d1-qspi: Remove redundant reset operationMiquel Raynal1-2/+0
The bus width is always set before every operation, no need to reset it manually at the end of each transfer. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20260813-perso-ma35d1-upstream-qspi-v1-1-b217b9870eb1@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-14HID: sony: fix UAF of ghl_poke_timer / ghl_urb at driver unbindDoruk Tan Ozturk1-1/+3
For GHL (Guitar Hero Live) dongles, sony_probe() arms a periodic timer: ghl_magic_poke() (the timer callback) submits sc->ghl_urb, and the URB completion ghl_magic_poke_cb() re-arms the timer with mod_timer(). sony_remove() drained the timer with timer_delete_sync() and then freed the URB with usb_free_urb(): timer_delete_sync(&sc->ghl_poke_timer); usb_free_urb(sc->ghl_urb); timer_delete_sync() does not block re-arming, and while the URB is in flight the timer is not pending, so the sync delete is a no-op. A URB completion that runs after the delete re-arms the timer, and usb_free_urb() only drops a reference -- it does not kill an in-flight URB. sc is allocated with devm_kzalloc() and freed once sony_remove() returns, so the re-armed ghl_poke_timer (embedded in sc) then fires on freed memory, a use-after-free from timer softirq. This is a disconnect/rmmod race. Poison the URB first, then shut the timer down, before freeing the URB. usb_poison_urb() kills any in-flight URB and permanently rejects further submissions, so a poke timer that is still pending cannot re-submit the URB from ghl_magic_poke() in the window before timer_shutdown_sync() runs. usb_kill_urb() would not suffice: it only cancels the in-flight URB and leaves it submittable once it returns, so the pending timer could re-submit it and put a fresh URB in flight over the freed sc. timer_shutdown_sync() then drains any last callback and blocks re-arming. The probe error path is unaffected: it is only reached before the timer is armed. Reproduced under KASAN on next-20260710 via dummy_hcd + raw-gadget emulation of the GHL PS4 dongle (VID 0x1430 / PID 0x07bb): hid-sony binds and arms the poke timer, the poke URB is held in flight, the driver is unbound (freeing sc), then the URB is released. The completion re-arms the timer on the freed sc, and the re-armed timer fires ~8 s later: BUG: KASAN: slab-use-after-free in ghl_magic_poke+0x98/0xb0 Read of size 8 at addr ffff88810b02fd50 by task swapper/0/0 ghl_magic_poke+0x98/0xb0 call_timer_fn+0x35/0x2b0 __run_timers+0x69c/0x9a0 run_timer_softirq+0x173/0x2a0 Allocated by task 169: sony_probe Freed by task 338: devres_release_group <- hid_device_remove (sony_remove) Found by 0sec (https://0sec.ai) using automated source analysis. Fixes: cc894ac55360 ("HID: sony: support for ghlive ps3/wii u dongles") Cc: stable@vger.kernel.org Assisted-by: 0sec:multi-model Signed-off-by: Doruk Tan Ozturk <doruk@0sec.ai> Signed-off-by: Jiri Kosina <jkosina@suse.com>
2026-08-14spi: dw: Remove shadowed dws in dw_spi_setup()Liang Hao1-1/+0
The controller private data is already fetched at the start of dw_spi_setup(). Drop the redundant inner declaration that shadows it. Signed-off-by: Liang Hao <haohlliang@gmail.com> Link: https://patch.msgid.link/20260814114235.31281-1-haohlliang@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-14Merge tag 'nvme-7.3-2026-08-13' of git://git.infradead.org/nvme into ↵Jens Axboe30-274/+741
for-7.3/block Pull NVMe updates from Keith: "- Enable context analysis for the nvme host driver, annotating the subsystem's locks, along with the LIST_HEAD_GUARDED support it needs (Nilay, Marco) - Harden the tcp host and target against malformed PDUs and out of range SGL lengths (Yehyeong, Ibrahim, Greg) - Fix unserialized page_frag_cache use in nvme-tcp request setup (Dmitry) - Bound identify, FDP and passthrough descriptor parsing to the allocated buffers (Hari, Guixin) - Zoned namespace fixes for host and the target (Xixin, Guixin, Yao) - Apple controller fixes: page aligned admin queue buffers, NVMMU TCB setup, DMA direction and admin queue teardown (Sven, Gui-Dong) - Add a namespace level debugfs directory exposing reservation state, and ABI documentation for the host sysfs and target configfs interfaces (Guixin) - Fix cdev and namespace lifetimes (John) - Parallelize nvme-rdma I/O queue allocation and startup (Surabhi) - Fix nvmet-rdma response resource leak on queue teardown (Shin'ichiro) - Authentication fixes: AUTH_RECEIVE buffer and an out of bounds read in negotiate (Xixin, Bryam, Guixin, Eric) - Fix pci-epf use-after-free and CQ reference leak (Shin'ichiro, Yifei) - Reject passthrough of driver managed Set Features (Chao) - Various error path and teardown fixes across the host and target addressing issues with use-after-free and leaking resources (Guixin, Maurizio, Ewan, Zhengrong, Jiang HongHui, Myeonghun, Yang, Geliang, Yehyeong) - Various cleanups and typo fixes (Nilay, Guixin, Pan Chuang)" * tag 'nvme-7.3-2026-08-13' of git://git.infradead.org/nvme: (81 commits) nvmet: fix max_qid race between configfs and controller allocation nvme: nvme-fc: Fix nvme_fc_create_hw_io_queues() queue deletion in error path nvme: ratelimit the completion-path messages driven by device data nvme-tcp: fix host memory disclosure on R2T for a read command nvme-tcp: do not accept C2HData based on blk_rq_payload_bytes() alone nvme-tcp: reject a read that transferred too few bytes nvmet: zns: reject full zone report when buffer is too small nvme-tcp: fix usage of page_frag_cache nvme: reject passthrough of driver-managed Set Features nvmet: fix NULL pointer dereference in nvmet_execute_identify_ns_zns() nvmet: pci-epf: fix use-after-free in nvmet_pci_epf_exec_iod_work() nvmet: pci-epf: put CQ ref on create_cq mapping failure nvme-apple: Drop the PRP null check chicken bit nvme-apple: Require page aligned buffers on the admin queue nvme: Add a quirk for page aligned admin queue buffers nvme-apple: Never set the opcode in the NVMMU TCB nvme-apple: Don't set a DMA direction for commands without a data transfer nvme-apple: Destroy the admin queue on removal nvmet: fix heap out-of-bounds read in nvmet_auth_negotiate() nvme: raise FDP placement handle cap to U8_MAX and warn on overflow ...
2026-08-14Merge branch 'for-next/sdei' into for-next/coreWill Deacon4-0/+290
* for-next/sdei: arm64: escalate smp_send_stop() to an SDEI NMI as a last resort drivers/firmware: add SDEI cross-CPU NMI service for arm64 firmware: arm_sdei: add SDEI_EVENT_SIGNAL support firmware: arm_sdei: add sdei_is_present()
2026-08-14Merge branch 'for-next/perf' into for-next/coreWill Deacon22-301/+1067
* for-next/perf: (27 commits) perf: arm_pmuv3: Zero initialize hw_id branch stack field perf/arm-cmn: Support CMN S3 r2 perf/arm-cmn: Plumb in new filter types perf/arm-cmn: Refactor event filter data perf/arm-cmn: Refactor event filter programming perf/arm-cmn: Rename filter variables for clarity perf/arm_cspmu: Support 64-bit programmers' model drivers/perf: hisi: Remove redundant dev_err()/dev_err_probe() perf: arm_cspmu: Remove redundant dev_err() perf: Remove redundant dev_err()/dev_err_probe() perf: arm_pmu_acpi: Get rid of the edge-triggered interrupt oddity perf/arm_cspmu: Make IRQ more optional perf/arm_cspmu: Improve sub-module error reporting perf/arm_cspmu: Improve APMT-based PMU naming ACPI/APMT: Use stable device ID perf/cxlpmu: Support Channel/Rank/Bank filter perf/cxlpmu: Add missing CXL 4.0 events perf/cxlpmu: Fix 64-bit write to 32-bit HDM filter register perf/dwc_pcie: Support narrowed time-based counter for long time monitoring perf/dwc_pcie: Add support for Picoheart vendor devices ...
2026-08-14Merge branch 'for-next/nmi' into for-next/coreWill Deacon1-4/+1
* for-next/nmi: arm64: entry: Avoid unnecessary local_irq_disable() on kernel exit irqchip/gic-v3: make the unmasking of pseudo-NMIs explicit when handling IRQs arm64: entry: mask DAIF before returning from C EL1 handlers arm64: suspend: Initialize PMR on resume arm64: suspend: rely on daif helpers to handle PMR arm64: hibernate: Restore DAIF state on error arm64: hibernate: mask DAIF before restoring hibernated kernel arm64: debug: don't mask DAIF for mdscr_write() arm64: ptrace: Remove INIT_PSTATE_EL2
2026-08-14Merge branch 'for-next/mpam' into for-next/coreWill Deacon3-27/+307
* for-next/mpam: arm_mpam: Disable driver unbind to avoid UAF arm_mpam: Fix a NULL pointer dereference on unbinding after an error interrupt arm_mpam: Apply T241-MPAM-6 to 63-bit counters arm64: mpam: Add memory bandwidth usage (MBWU) documentation arm_mpam: resctrl: Add resctrl_arch_cntr_read() & resctrl_arch_reset_cntr() arm_mpam: resctrl: Add resctrl_arch_config_cntr() for ABMC use arm_mpam: resctrl: Pre-allocate assignable monitors arm_mpam: resctrl: Pick classes for use as MBM counters
2026-08-14Merge branch 'for-next/cpufeature' into for-next/coreWill Deacon1-1/+1
* for-next/cpufeature: arm64: bti: Disable in-kernel BTI with recent versions of Clang iommu/arm-smmu-v3-sva: Use system_supports_bbml3() to detect CPU feature arm64: cpufeature: Detect BBML3 based on ID_AA64MMFR2_EL1.BBM arm64: cpufeature: Rename BBML2_NOABORT as BBML3 arm64: sysreg: Add BBM_3 arm64: cpufeature: Extend bbml2_noabort support list arm64: cputype: Add C1-Nano definitions arm64: cputype: Add Cortex-A520AE definitions arm64: cpucaps: Remove stale comment about keeping capabilities sorted arm64: fix cpu-feature-registers Malformed table arm64: Remove hidden bitfields from cpu-feature-registers.rst arm64: Sort registers in cpu-feature-registers.rst arm64: Document missing bitfields in cpu-feature-registers.rst arm64: Don't number registers in cpu-feature-registers.rst
2026-08-14Merge branch 'for-next/coco' into for-next/coreWill Deacon2-62/+40
* for-next/coco: arm64: RSI: fix field-spanning write warning in attestation token init virt: arm-cca-guest: Drop unused assignment of platform_device_id driver data arm64/coco: Add pKVM as a CC platform arm64/mm: Simplify SWIOTLB setup in arch_mm_preinit() virt: arm-cca-guest: use migrate_disable() for attestation token requests
2026-08-14Merge tag 'drm-xe-next-fixes-2026-08-13' of ↵Dave Airlie5-15/+32
https://gitlab.freedesktop.org/drm/xe/kernel into drm-next Couple drm-ras fixes, a probe failure clean-up fix, a GT freq boundaries fixes for BMG/CRI and a Media engines/slice fix. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/an4NGzsYN9MOTFII@intel.com
2026-08-14Merge tag 'drm-misc-next-fixes-2026-08-13' of ↵Dave Airlie1-722/+0
https://gitlab.freedesktop.org/drm/misc/kernel into drm-next A single patch to remove a .orig file introduced by accident. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <mripard@redhat.com> Link: https://patch.msgid.link/20260813-shrewd-ocelot-of-research-aa3caa@houat
2026-08-14pinctrl: meson: sync some modify from A4Xianwei Zhao1-4/+4
Set the drive strength before enabling the output to avoid enabling the output with an unintended drive strength. Also return the actual output enable state from PIN_CONFIG_OUTPUT_ENABLE instead of always reporting it as enabled. Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com> Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-08-14pinctrl: meson: a4: Add input enable pin configurationXianwei Zhao1-2/+12
Add support for PIN_CONFIG_INPUT_ENABLE in the Amlogic A4 pinctrl driver. Use the existing output enable control to configure the input enable state, since the hardware uses the same control with inverse semantics. Also update PIN_CONFIG_OUTPUT_ENABLE handling to return the actual output enable state instead of treating any non-zero value as enabled. Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com> Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-08-14pinctrl: realtek: rtd1625: remove unused group name spdif_selYu-Chun Lin1-1/+1
Remove the undefined "spdif_sel" from rtd1625_iso_spdif_in_coaxial_groups to clean up the code. Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com> Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-08-14pinctrl: realtek: rtd1625: fix base_bit for VE4 GPIO 13Yu-Chun Lin1-1/+1
Fix a typo in the base_bit of RTD1625_VE4_GPIO_13. It was incorrectly set to 18, which overlaps with GPIO 16. Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com> Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-08-14Merge tag 'drm-xe-fixes-2026-08-13' of ↵Dave Airlie11-123/+279
https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes Driver Changes: - Fix DPT Allocation paths (Maarten) - Fixes around UM queue BO (Jia) - Order ring writes before ring tail updates (Matthew Brost) - Add termination on resume for PXP (Daniele) - Document Sentinel and make CTX_TIMESTAMP read TOCTOU-safe (Gajendra) - Fix sync entry leak on OA config emit failure (Linmao Li) - Check managed mutex initilization errors (Linmao Li) - Fix min frequency setting (Vinay) - Fix xe_device_probe error path (Raag) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Hellstrom <thomas.hellstrom@linux.intel.com> Link: https://patch.msgid.link/an4ZogmPqP2Xtfx3@fedora
2026-08-13hwmon: (k10temp) Add per-CCD temperature monitoring for Zen5 TurinGabriel Ford1-1/+13
Add support for per-CCD temperature monitoring on Zen 5 Turin (EPYC 9005) CPUs, as they fall into a separate model range with a different offset and a higher maximum CCD count than their desktop counterparts. As such, this patch also updates the driver to support CPUs with up to 16 CCDs. Tested and working on an EPYC 9555P. Signed-off-by: Gabriel Ford <gabriel@gford.dev> Link: https://lore.kernel.org/r/20260813170232.3841-1-gabriel@gford.dev Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-14Merge tag 'drm-misc-fixes-2026-08-13' of ↵Dave Airlie31-92/+296
https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes drm-misc-fixes for v7.3: - Revert fair scheduler patches and mark fair policy as experimental due to reported regressions. - Fix OOB read in connector/hdmi infoframe. - Handle invalid scaling parameters and empty messages in log target. - Skip attempting to populate unmapped pages in amdxdna. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patch.msgid.link/a9b38792-bdd0-42da-a46a-7a048c26c0c2@linux.intel.com
2026-08-13clk: samsung: Don't include <linux/mod_devicetable.h>Uwe Kleine-König (The Capable Hub)1-1/+1
All users of drivers/clk/samsung/clk.h live in drivers/clk/samsung (see git grep samsung/clk.h ). All these are only using of_device_id from the set of structures defined by this include (see { git grep -l clk\\.h drivers/clk/samsung/; echo drivers/clk/samsung/clk.h; } | xargs grep -oh -E "\<(acpi_device_id|amba_id|ap_device_id|apr_device_id|auxiliary_device_id|bcma_device_id|ccw_device_id|cdx_device_id|coreboot_device_id|css_device_id|dfl_device_id|dmi_(device|system)_id|eisa_device_id|fsl_mc_device_id|hda_device_id|hid_device_id|hv_vmbus_device_id|i2c_device_id|i3c_device_id|ieee1394_device_id|input_device_id|ipack_device_id|isapnp_device_id|ishtp_device_id|mcb_device_id|mdio_device_id|mei_cl_device_id|mhi_device_id|mips_cdmm_device_id|of_device_id|parisc_device_id|pci_device_id|pci_epf_device_id|pcmcia_device_id|platform_device_id|pnp_(card_)?device_id|rio_device_id|rpmsg_device_id|sdio_device_id|sdw_device_id|serio_device_id|slim_device_id|spi_device_id|spmi_device_id|ssam_device_id|ssb_device_id|tb_service_id|tee_client_device_id|typec_device_id|ulpi_device_id|usb_device_id|vchiq_device_id|vio_device_id|virtio_device_id|wmi_device_id|x86_(cpu|device)_id|zorro_device_id|cpu_feature)\>" | sort | uniq -c ). So <linux/mod_devicetable.h> can be replaced by <linux/device-id/of.h> to get rid of another user of the former header. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Reviewed-by: Brian Masney <bmasney@redhat.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2026-08-13Merge patch series "scsi: lpfc: Remove all strlcat() uses"Martin K. Petersen (Oracle)6-507/+348
Ian Bridges <icb@fastmail.org> says: In preparation for removing the strlcat() API[1], this series replaces its 81 remaining call sites in the lpfc driver. The sites live in nine string building functions across five files, and each patch converts one source file. Functions that accumulate a variable number of fragments move to seq_buf. The three sysfs show functions move to sysfs_emit_at(), the designated helper for sysfs output. lpfc_vport_symbolic_node_name() builds five fixed fragments and becomes a single scnprintf() call. The intermediate tmp buffers and the per fragment overflow checks become unnecessary in every scheme. Each loop that appends keeps one overflow exit, so a full buffer stops the iteration. One cross-cutting behavior change applies to several patches. The old code formatted each fragment into a fixed size tmp buffer before appending it, so a fragment longer than that buffer was silently truncated even when the destination had room for it. The replacements format each fragment directly into the destination. Truncation is still bounded by the destination size. The per patch changelogs call out the affected functions. The patch series was tested as follows. No hardware testing was done. Testing on real adapters is welcome. - W=1 builds of the whole driver directory, zero warnings. - A userspace differential harness. The old and new function bodies are extracted verbatim from the two trees and compiled side by side against the real lib/seq_buf.c. 472000 randomized cases across all nine functions, including oversized inputs, undersized buffers and prefilled destinations, compared byte for byte under ASan and UBSan. All outputs are identical except two behavior changes. Those are the format string interpretation removed in patch 1 and the fragment cap removal in patch 2. The harness classifies every observed difference as exactly one of those two. - A KUnit corpus. The nine functions run as compiled kernel code in a QEMU guest with KASAN, UBSAN and FORTIFY_SOURCE enabled, against fabricated adapter state covering both branches of every converted conditional that is compiled in. The LPFC_MXP_STAT debug block is disabled at compile time and was build tested with the macro defined. The same 40 test cases run on the unpatched base and on this series. The base run matches the old expected outputs, and the patched run is byte identical everywhere except the two documented changes. [1] https://github.com/KSPP/linux/issues/370 Link: https://patch.msgid.link/20260729144617.1388646-1-icb@fastmail.org Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-08-13scsi: lpfc: Replace strlcat() with sysfs_emit_at() in the sysfs show functionsIan Bridges2-317/+219
In preparation for removing the strlcat() API[1], replace its uses in lpfc_cmf_info_show(), lpfc_nvme_info_show() and lpfc_scsi_stat_show(). The three functions build sysfs attribute output, and sysfs_emit_at() is the designated helper for that. The single write paths become sysfs_emit(), the offset zero form of the same helper. Each intermediate tmp buffer and its per fragment overflow check become unnecessary. Once the page is full, sysfs_emit_at() writes nothing more, so dropping the early exits does not change the produced bytes. Each loop that appends keeps one exit, so a full page stops the iteration. In lpfc_nvme_info_show() the exit also releases the fc_nodes_list_lock as it did before. The unlock_buf_done label loses its last user and is removed. The old code capped every fragment at LPFC_MAX_INFO_TMP_LEN or LPFC_MAX_SCSI_INFO_TMP_LEN bytes before appending it. The replacement formats each fragment directly into the page, so a fragment longer than its old tmp buffer is no longer truncated when the page has room for it. Both macros lose their last user and are removed. The running length that sysfs_emit_at() maintains equals the length that the removed strnlen() calls computed, so the "Could be more info" overflow markers keep their trigger condition. Link: https://github.com/KSPP/linux/issues/370 [1] Signed-off-by: Ian Bridges <icb@fastmail.org> Link: https://patch.msgid.link/20260729144617.1388646-6-icb@fastmail.org Reviewed-by: Nigel Kirkland <nigel.kirkland@broadcom.com> Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-08-13scsi: lpfc: Replace strlcat() with seq_buf in the debugfs dump helpersIan Bridges1-113/+85
In preparation for removing the strlcat() API[1], replace its uses in lpfc_debugfs_multixripools_data(), lpfc_debugfs_scsistat_data() and lpfc_debugfs_hdwqstat_data(). Each helper accumulates a variable number of lines into the debugfs buffer, which is what seq_buf is for. The intermediate tmp buffers and the per fragment overflow checks become unnecessary. Once a seq_buf overflows, later writes to it do nothing, so dropping the early exits does not change the produced bytes. Each loop that appends keeps one seq_buf_has_overflowed() exit, so a full buffer stops the iteration. lpfc_debugfs_multixripools_data() and lpfc_debugfs_hdwqstat_data() append to whatever the buffer already holds, so their seq_buf is anchored at the current end of the string. All three helpers keep returning strnlen() because seq_buf_used() reports the full buffer size after an overflow. Link: https://github.com/KSPP/linux/issues/370 [1] Signed-off-by: Ian Bridges <icb@fastmail.org> Link: https://patch.msgid.link/20260729144617.1388646-5-icb@fastmail.org Reviewed-by: Nigel Kirkland <nigel.kirkland@broadcom.com> Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-08-13scsi: lpfc: Replace strlcat() with seq_buf in lpfc_rx_monitor_report()Ian Bridges1-19/+24
In preparation for removing the strlcat() API[1], replace its use in lpfc_rx_monitor_report(). The function accumulates one line per ring entry, which is what seq_buf is for. seq_buf tracks the write position, so the per entry strlen() rescans of the destination are gone. Each record is still formatted into the tmp buffer. seq_buf_puts() appends it only when it fits whole, so the output keeps ending at the last complete record. The loop still stops on overflow without consuming the current entry, and the returned count and the ring head keep their old meaning. The produced bytes are unchanged. Link: https://github.com/KSPP/linux/issues/370 [1] Signed-off-by: Ian Bridges <icb@fastmail.org> Link: https://patch.msgid.link/20260729144617.1388646-4-icb@fastmail.org Reviewed-by: Nigel Kirkland <nigel.kirkland@broadcom.com> Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-08-13scsi: lpfc: Replace strlcat() with scnprintf() in ↵Ian Bridges1-24/+5
lpfc_vport_symbolic_node_name() In preparation for removing the strlcat() API[1], replace its uses in lpfc_vport_symbolic_node_name(). The function builds five unconditional fragments, so one scnprintf() call composes the whole string. The intermediate tmp buffer and the per fragment overflow checks become unnecessary. scnprintf() truncates at the buffer size and returns the number of bytes it wrote, which equals the length that the removed strnlen() call computed. The old code capped every fragment at MAXHOSTNAMELEN bytes before appending it, independently of the room left in the destination. The replacement formats each fragment directly into the destination, so a fragment longer than MAXHOSTNAMELEN is no longer truncated when the destination has room for it. Link: https://github.com/KSPP/linux/issues/370 [1] Signed-off-by: Ian Bridges <icb@fastmail.org> Link: https://patch.msgid.link/20260729144617.1388646-3-icb@fastmail.org Reviewed-by: Nigel Kirkland <nigel.kirkland@broadcom.com> Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-08-13scsi: lpfc: Replace strlcat() with seq_buf in lpfc_info()Ian Bridges1-34/+15
In preparation for removing the strlcat() API[1], replace its uses in lpfc_info(). The function accumulates a variable number of optional fragments, which is what seq_buf is for. The intermediate tmp buffer and the per fragment overflow checks become unnecessary. seq_buf is memory safe by construction and silently truncates in the same way as the replaced pattern. The old code passed phba->ModelDesc as the format string of the first scnprintf() call. The model description comes from adapter VPD data. seq_buf_printf() takes a format string, so the replacement prints it through "%s". A model description containing conversion specifiers is no longer interpreted. Link: https://github.com/KSPP/linux/issues/370 [1] Signed-off-by: Ian Bridges <icb@fastmail.org> Link: https://patch.msgid.link/20260729144617.1388646-2-icb@fastmail.org Reviewed-by: Nigel Kirkland <nigel.kirkland@broadcom.com> Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-08-13Merge tag 'clk-microchip-7.3' of ↵Stephen Boyd1-2/+3
https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into clk-microchip Pull Microchip clk driver updates from Claudiu Beznea: - use of_property_read_reg() instead of of_property_read_u8() to properly parse the reg DT property in the microchip driver * tag 'clk-microchip-7.3' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: clk: at91: Read "reg" with helper
2026-08-13Merge patch series "Enable context analysis in the SCSI core and UFS driver"Martin K. Petersen (Oracle)16-45/+104
Bart Van Assche <bvanassche@acm.org> says: Hi Martin, This patch series enables context analysis for the SCSI core and the UFS driver. The advantages are as follows: - The compiler (only Clang) verifies whether the lock and unlock calls match what has been declared via __must_hold(), __acquires() or __releases(). This is useful for catching locking bugs in error paths. - Support for __guarded_by() is enabled. If a member variable is annotated with __guarded_by(lock), the compiler will issue a warning if that member variable is accessed without holding 'lock'. Additionally, a patch is included that suppresses KCSAN complaints about SCSI host state changes. More information about lock context analysis is available in the cover letter of [PATCH v5 00/36] Compiler-Based Context- and Locking-Analysis (https://lore.kernel.org/lkml/20251219154418.3592607-1-elver@google.com/). Please consider this patch series for the next merge window. Thanks, Bart. Link: https://patch.msgid.link/cover.1786142946.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-08-13scsi: core: Enable context analysisBart Van Assche2-0/+25
Enable context analysis for those SCSI core files that build without triggering any context analysis warnings. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: John Garry <john.g.garry@oracle.com> Link: https://patch.msgid.link/2576d2f7e3530b721b5050ac6d25c413037d7e7e.1786142946.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-08-13scsi: core: Protect host state changes with the host lockBart Van Assche9-22/+23
Some but not all SCSI host state changes are protected with the SCSI host lock. Annotate the SCSI host state with __guarded_by(host_lock) and protect all SCSI host state changes with the SCSI host lock. This patch prevents that KCSAN complains about data races when accessing the SCSI host state. Reported-by: Jianzhou Zhao <luckd0g@163.com> Closes: https://lore.kernel.org/all/36d59d0e.6db0.19cdbeee01b.Coremail.luckd0g@163.com/ Signed-off-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: John Garry <john.g.garry@oracle.com> Link: https://patch.msgid.link/681e4a5260c182feb5fc1d96f0d43c62c21dc6c9.1786142946.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-08-13scsi: core: Add lock context annotationsBart Van Assche1-0/+5
Document which functions expect that shost->scan_mutex is held. Reviewed-by: John Garry <john.g.garry@oracle.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/ad5ca37acf8c933a12830c0811c293af54c87573.1786142946.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>