summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2026-07-30drm/tyr: add a generic slot managerBoris Brezillon
Introduce a generic slot manager to dynamically allocate limited hardware slots to software "seats". It can be used for both address space (AS) and command stream group (CSG) slots. The slot manager initially assigns seats to its free slots. It will continue to reuse the same slot for a seat, as long as another seat does not start to use the slot in the interim. When contention arises because all of the slots are allocated, the slot manager will lazily evict and reuse slots that have become idle (if any). The seat state is protected using the LockedBy pattern with the same lock that guards the SlotManager. This ensures the seat state stays consistent across slot operations. Hardware specific behaviour is controlled through the SlotManager's specific manager type that implements the `SlotOperations` trait. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Co-developed-by: Deborah Brouwer <deborah.brouwer@collabora.com> Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com> Link: https://patch.msgid.link/20260728-fw-boot-b4-v10-2-9187aefa3f2f@collabora.com Signed-off-by: Alice Ryhl <aliceryhl@google.com>
2026-07-30drm/tyr: add resources to RegistrationDataDeborah Brouwer
Currently Tyr is not storing any resources in its drm::Driver RegistrationData. Move Tyr's device-private resources and gpu information from drm::Driver::Data to drm::Driver::RegistrationData. This allows Tyr to access this data safely within the lifetime of its binding to its parent platform device and while registered with userspace. Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com> Link: https://patch.msgid.link/20260728-fw-boot-b4-v10-1-9187aefa3f2f@collabora.com Signed-off-by: Alice Ryhl <aliceryhl@google.com>
2026-07-30mfd: si476x-i2c: Get rid of duplicate NULL checksAndy Shevchenko
GPIO descriptor APIs are NULL-aware and since the requested line is optional we don't need to have an additional check each time we want to toggle GPIO. Get rid of duplicate NULL checks. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260715191603.1325479-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: cgbc: Fix teardown ordering in cgbc_remove()Thomas Richard
Release Board Controller session once children are removed by the core. Cc: stable@vger.kernel.org Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://sashiko.dev/#/patchset/cover.1783507945.git.u.kleine-koenig%40baylibre.com?part=19 Fixes: 6f1067cfbee7 ("mfd: Add Congatec Board Controller driver") Signed-off-by: Thomas Richard <thomas.richard@bootlin.com> Link: https://patch.msgid.link/20260713-cgbc-core-fix-cgbc-remove-v1-1-79274ad62b3a@bootlin.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: mt6397-core: Add mt6323 AUXADC supportRoman Vivchar
The mt6323 PMIC includes an AUXADC. Register the AUXADC in the mt6323 devices array to allow the corresponding driver to probe using compatible string. Signed-off-by: Roman Vivchar <rva333@protonmail.com> Tested-by: Ben Grisdale <bengris32@protonmail.ch> # Amazon Echo Dot (2nd Generation) Reviewed-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20260709-mt6323-adc-v5-3-d11b8332a735@protonmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: rohm: Factor out power button registrationDmitry Torokhov
Factor out the power button registration logic using software nodes from rohm-bd718x7 and rohm-bd71828 drivers into a shared module rohm-pwrbutton. This reduces duplication and makes it easier to support other ROHM PMICs with similar power button configurations. Suggested-by: Lee Jones <lee@kernel.org> Assisted-by: Antigravity:gemini-3.5-flash Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://patch.msgid.link/akw4naN2Khjv8itB@google.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: ucb1x00: Convert Assabet gpio-keys to use software nodesDmitry Torokhov
Convert the legacy gpio-keys platform device on the StrongARM SA-1100 Assabet evaluation board to use software nodes and device properties. This allows describing the buttons and their GPIO bindings via software nodes so that platform data support can eventually be removed from the gpio-keys driver. Define static software nodes for the gpio-keys device and the six button child nodes at file scope using relative pin indexing on the UCB1x00 GPIO controller node. In ucb1x00_assabet_add(), register the software node group and use platform_device_register_full() to register the device. Assisted-by: Antigravity:gemini-3.5-flash Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20260706-ucb1x00-assabet-swnode-v2-2-e6271ea3d3dc@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: ucb1x00: Register software node for GPIO controllerDmitry Torokhov
Define a static software node for the UCB1x00 GPIO controller and attach it to the core MFD device in ucb1x00_probe(). This node will also be used by the created GPIO chip. This allows machine subdrivers (such as Assabet evaluation board support) to reference the UCB1x00 GPIO controller in property entries when converting legacy platform data to software nodes, resolving pin bindings directly via the attached firmware node without relying on name matching. Assisted-by: Antigravity:gemini-3.5-flash Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20260706-ucb1x00-assabet-swnode-v2-1-e6271ea3d3dc@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: cs42l43: Tidy up formatting on sdw_device_id tableCharles Keepax
Remove spaces after cast as they generate check patch warnings, and update the terminator to better match kernel coding guidelines. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260708140039.1993489-3-ckeepax@opensource.cirrus.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: cs42l43: Remove redundant NULL checks on SoundWireCharles Keepax
The SoundWire core helpers now check for NULL on the SoundWire peripheral so there is no need to do so locally, remove the duplicate checks. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260708100914.1298080-1-ckeepax@opensource.cirrus.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: Unify style of spi_device_id arraysUwe Kleine-König (The Capable Hub)
The two previous commits adapted the style of some spi_device_id arrays. Fix the remaining arrays to the same style, that is: - no comma after the list terminator and after an initializer iff the closing } is on the same line - a single space in the list terminator Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/323dc79eb1bcc55caf0163e26501e1de3e710554.1783003256.git.u.kleine-koenig@baylibre.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: Initialize spi_device_id arrays using member namesUwe Kleine-König (The Capable Hub)
While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value without having to lookup the declaration of the struct. And it's also more robust against changes to the struct definition. The mentioned robustness is relevant for a planned change to struct spi_device_id that replaces .driver_data by an anonymous union. Also adapt spacing and usage of commas to the most common style. This patch doesn't modify the compiled array, only its representation in source form benefits. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/f83c8292e7e3ba9425792591fb136d4ae1468215.1783003256.git.u.kleine-koenig@baylibre.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: Drop unused assignment of spi_device_id driver dataUwe Kleine-König (The Capable Hub)
The drivers explicitly set the .driver_data member of struct spi_device_id to zero without relying on that value. Drop these unused assignments. While touching these arrays use named initializers for .name. This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/15dc05c1a49f79b6cb43684d8bcf60adcd1be7de.1783003256.git.u.kleine-koenig@baylibre.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: sprd-sc27xx: Add SC2730 regulator cellOtto Pflüger
Add an MFD cell to register the SC2730 PMIC's regulators. Signed-off-by: Otto Pflüger <otto.pflueger@abscue.de> Link: https://patch.msgid.link/20260701-sc2730-regulators-v7-1-6e145ce83657@abscue.de Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: viperboard: Remove redundant NULL check before kfree()Mohammad Shahid
kfree() safely handles NULL pointers, so the explicit NULL check before calling kfree() is unnecessary. This issue was reported by ifnullfree.cocci. Signed-off-by: Mohammad Shahid <mdshahid03@gmail.com> Link: https://patch.msgid.link/20260703105937.62541-1-mdshahid03@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: db8500-prcmu: Fold dbx500 header into db8500Linus Walleij
Move the DBx500 PRCMU definitions into the DB8500 PRCMU header and delete the wrapper header. Convert users of simple PRCMU wrappers to call the DB8500 helpers directly. The dbx500-prcmu.h header was the result of an earlier attempt to abstract several DBx5x SoC PRCMU units to use the same abstract header. They are deleted from the kernel and this is not just causing maintenance burden and build errors. The stub code is using -ENOSYS in a way checkpatch complains about so replace these with -EINVAL while we're at it. Assisted-by: Codex:gpt-5-5 Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202606180825.vUSQntkJ-lkp@intel.com/ Signed-off-by: Linus Walleij <linusw@kernel.org> Acked-by: Brian Masney <bmasney@redhat.com> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/oe-kbuild-all/202606180825.vUSQntkJ-lkp@intel.com/ Link: https://patch.msgid.link/20260619-mfd-prcmu-merge-headers-v1-1-8ea0ee23b4d6@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: 88pm886: Initialize the battery pageDuje Mihanović
Initialize the PMIC's battery page. The battery page registers are shared between Vbus regulator, charger, fuelgauge and camera flash blocks, hence the commonization of the page. Signed-off-by: Duje Mihanović <duje@dujemihanovic.xyz> Reviewed-by: Karel Balej <balejk@matfyz.cz> Link: https://patch.msgid.link/20260613-88pm886-vbus-v2-2-021dfb02c6bb@dujemihanovic.xyz Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: cs42l43: Use new SoundWire enumeration helperCharles Keepax
Now the new wait for SoundWire enumeration helper no longer depends on unattach_request it is safe to use from probe time. Update the driver to use the new core helper. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260608102714.2503120-4-ckeepax@opensource.cirrus.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: axp20x: Preserve other control bits when powering offOleg Proshkin
axp20x_power_off() triggers shutdown by writing AXP20X_OFF (BIT(7)) to the power-off control register with regmap_write(), which rewrites the whole register and clears other control bits in it. On the AXP221/AXP223 (and the register-compatible AXP228) - that register also holds the CHGLED auto-control bit. Clearing it during an orderly shutdown disables the hardware charge indicator, so the charge LED stays dark while the board is powered off and charging. Other variants keep unrelated configuration in the same register too. Set only the power-off bit with regmap_set_bits() and leave the rest of the register untouched. The shutdown register is readable on every variant, so the read-modify-write should be safe. Tested on a ClockworkPi uConsole (Raspberry Pi Compute Module 4, AXP228, which enumerates as AXP221): register AXP20X_OFF_CTRL reads 0x08 at runtime, so the old code left it 0x80 whereas setting only BIT(7) leaves 0x88. Writing 0x88 at power-off enables the charge LED while still powering off the PMIC. Signed-off-by: Oleg Proshkin <oleg.pro171@gmail.com> Reviewed-by: Chen-Yu Tsai <wens@kernel.org> Link: https://patch.msgid.link/20260611154629.76607-1-oleg.pro171@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: ipaq-micro: Fix out-of-bounds stack read in ipaq_micro_strDmitry Torokhov
ipaq_micro_str() decodes a UTF-16LE string into an ASCII string. It copies characters to a stack buffer retstr, but fails to null-terminate it. When kstrdup() is called on retstr, it can read past the buffer into uninitialized stack memory, potentially leaking stack contents. Fix this by initializing retstr to zero. Reported-by: sashiko-bot@kernel.org Assisted-by: Antigravity:gemini-3.5-flash Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://patch.msgid.link/aintJF4X5tWDW-Ej@google.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: si476x: Modernize GPIO handlingLinus Walleij
The SI476X driver depends on the legacy GPIO API. As it only really use a single GPIO for reset, and this can be easily converted to use a GPIO descriptor, modernize the driver. The "reset" GPIO is obtained from a device property, such as a device tree ("reset-gpios", which is standard, but this hardware has no DT bindings as of now) or a software node for static platforms. Out-of-tree users can easily adopt to providing a GPIO descriptor this way. Signed-off-by: Linus Walleij <linusw@kernel.org> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20260608-mfd-si476x-v2-1-da5f779c1888@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30mfd: mt6397-core: Add mt6323 EFUSE supportRoman Vivchar
The mt6323 PMIC includes an EFUSE. Register the EFUSE in the mt6323 devices array to allow the corresponding driver to probe using compatible string. Signed-off-by: Roman Vivchar <rva333@protonmail.com> Tested-by: Ben Grisdale <bengris32@protonmail.ch> # Amazon Echo Dot (2nd Generation) Link: https://patch.msgid.link/20260617-mt6323-nvmem-v2-3-4f30e36aa0f4@protonmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30Merge branches 'ib-mfd-legacy-gpio-7.3' and 'ib-mfd-platform-chrome-7.3' ↵Lee Jones
into ibs-for-mfd-merged
2026-07-30qede: sync udp_tunnel ports outside qede_lock in the recovery pathDenis V. Lunev
A TX timeout on a qede NIC that has VXLAN/GENEVE tunnel ports configured wedges the rtnetlink control plane of the whole machine: NETDEV WATCHDOG: ens6f1 (qede): transmit queue 2 timed out 10226 ms [qede_tx_timeout:586(ens6f1)]TX timeout on queue 2! [qede_recovery_handler:2665(ens6f0)]Starting a recovery process The recovery path deadlocks on the driver's own mutex: qede_sp_task rtnl_lock() mutex_lock(&edev->qede_lock) <- taken qede_recovery_handler qede_load udp_tunnel_nic_reset_ntf __udp_tunnel_nic_device_sync info->sync_table == qede_udp_tunnel_sync mutex_lock(&edev->qede_lock) <- same task: deadlock The mutex is not recursive, so the kworker blocks on itself with rtnl_lock held, and neither lock is ever released. Every task that calls rtnl_lock() afterwards (ip, ovs-vswitchd, lldpad, IPv6 addrconf, sshd) blocks forever while the node still answers ping. In a vmcore from an affected production node rtnl_mutex.owner decodes to the very kworker blocked at the innermost mutex_lock() above. Re-sync the tunnel ports from qede_sp_task() after the internal lock is dropped, still under rtnl_lock as the udp_tunnel API requires. This mirrors qede_open(), which calls udp_tunnel_nic_reset_ntf() under rtnl without the internal lock. qede_recovery_handler() now returns whether it has successfully reloaded an open device, and the caller re-syncs the ports only in that case. This keeps the old gating exactly: a device that was down or a failed recovery returns false, as those paths never reached the udp_tunnel_nic_reset_ntf() call before either. This was the only user of the qede_lock()/qede_unlock() helpers, so remove them. Fixes: 8cd160a29415 ("qede: convert to new udp_tunnel_nic infra") Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Andrew Lunn <andrew+netdev@lunn.ch> CC: "David S. Miller" <davem@davemloft.net> CC: Eric Dumazet <edumazet@google.com> CC: Jakub Kicinski <kuba@kernel.org> CC: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://patch.msgid.link/20260726104311.1782900-1-den@openvz.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30Merge tag 'linux-can-fixes-for-7.2-20260729' of ↵Paolo Abeni
git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2026-07-29 this is a pull request of 20 patches for net/main. The first 2 patches fix problems in the CAN J1939 protocol and are by Tetsuo Handa and Oleksij Rempel. The next 2 patches fix problems in the CAN ISOTP protocol and are by Oliver Hartkopp and Minhong He. Avi Weiss contributes contributed 4 fixes for the ctucanfd, Pengpeng Hou's patch adds a missing MODULE_DEVICE_TABLE. The patches for the peak_usb driver are contributed by James Gao, Maoyi Xie, Maoyi Xie and add sanity checks for the USB bulk data parsing and fix a double free. 2 fixes for the kvaser_usb driver are provided by Abdun Nihaal and Pengpeng Hou, a mem leak is fixed and sanity checks for the USB bulk data parsing. Tu Nguyen's patch for the rcar_canfd driver fixes the initializing flow. Pengpeng Hou contributes a patch for the softing driver to validate the firmware record spans. Lucas Martins Alves's patch for the c_can driver keeps the controller in init mode until configuration is complete. A patch by my add missing URB resubmission on skb allocation failure to the gs_usb driver. Guangshuo Li's patch for the etas_es58x driver fixes a RX buffer leak. The last patch is by Pengpeng Hou and adds sanity checks to the USB bulk data parsing of the ems_usb driver. linux-can-fixes-for-7.2-20260729 * tag 'linux-can-fixes-for-7.2-20260729' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: ems_usb: validate CPC message lengths can: etas_es58x: es58x_read_bulk_callback(): fix RX buffer leak on URB resubmit failure can: gs_usb: gs_usb_receive_bulk_callback(): resubmit URB on skb allocation failure can: c_can: c_can_chip_config(): keep controller in init mode until bittiming is configured can: softing: fw_parse(): validate firmware record spans can: rcar_canfd: change the initializing flow for clocks and resets can: kvaser_usb_leaf: kvaser_usb_leaf_wait_cmd(): validate received command extents can: kvaser_usb: kvaser_usb_hydra_get_busparams(): fix memory leak in kvaser_usb_hydra_get_busparams() can: peak_usb: validate uCAN receive record lengths can: peak_usb: peak_usb_start(): fix double free of transfer buffer on URB submit error can: peak_usb: add bounds check for USB channel index can: ctucanfd: add missing MODULE_DEVICE_TABLE() can: ctucanfd: use self-test mode for PRESUME_ACK can: ctucanfd: handle bus error interrupts can: ctucanfd: mark error-active controller status valid can: ctucanfd: unmap BAR0 using base address can: isotp: check register_netdevice_notifier() error in module init can: isotp: fix timer drain order, wakeup handling and tx_gen ordering can: j1939: transport: j1939_session_fresh_new(): initialize receive buffer can: j1939: use netdevice_tracker for j1939_{priv,session,ecu} tracking ==================== Link: https://patch.msgid.link/20260729102802.505168-1-mkl@pengutronix.de Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30iommu/iova: Move CPU magazine init to first insertLogan Odell
A large amount of memory may be allocated for these magazines on machines with a lot of IOMMU groups and CPU cores. Not all may be used as some devices may be unused or be bound to drivers that do not use the DMA-API. Furthermore, some drivers may not use all levels or CPUs. Move the initialization of the loaded and prev magazines for each CPU on the first attempt to try to insert a freed IOVA to them. Signed-off-by: Logan Odell <loganodell@google.com> Signed-off-by: Michal Clapinski <mclapinski@google.com> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2026-07-30iommu/amd: Put PCI device after handling PPR faultsShuai Xue
iommu_call_iopf_notifier() looks up the requester with pci_get_domain_bus_and_slot(), which returns a PCI device with its reference count incremented. Neither the successful iommu_report_device_fault() path nor the abort path drops that reference, so every handled PPR request leaks a PCI device reference. This is the same ownership rule that was fixed for the old iommu_v2 ppr_notifier() path by commit 6cf0981c2233 ("iommu/amd: Fix pci device refcount leak in ppr_notifier()"), but iommu_call_iopf_notifier() was added later as a separate PPR/IOPF notifier path. Drop the PCI device reference after handling the PPR entry. Fixes: 978d626b8f1a ("iommu/amd: Add IO page fault notifier handler") Cc: stable@vger.kernel.org Assisted-by: Qoder:Qwen-3.8-MAX-Preview Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com> Reviewed-by: Vasant Hegde <vasant.hegde@amd.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2026-07-30spi: Few fix/improvement for spi-nxp-fspiMark Brown
haibo.chen@oss.nxp.com <haibo.chen@oss.nxp.com> says: Patch 1 introduce per-SoC clock rate limits for both SDR and DTR modes by adding max_sdr_rate and max_dtr_rate to nxp_fspi_devtype_data. Patch 2 enter stop mode before reconfiguring MCR0 and DLL to follow FlexSPI reference manual initialization sequence Patch 3 propagate clock reconfig failures in nxp_fspi_select_mem() Link: https://patch.msgid.link/20260728-fspi-clock-v2-0-dbe786a4a6eb@nxp.com
2026-07-30spi: spi-nxp-fspi: propagate clock reconfig failures in nxp_fspi_select_mem()Haibo Chen
nxp_fspi_select_mem() disables the FlexSPI clocks before calling clk_set_rate() and re-enabling them. If clk_set_rate() or the clock re-enable fails, the function returned early (as void) leaving both the serial root clock and the register interface clock disabled. As the function returned void, nxp_fspi_exec_op() had no way to know about the failure and continued to access FlexSPI registers (LUT setup, data transfer, AHB buffer invalidation). Accessing the controller registers while its clock is gated off results in a synchronous external abort. Make nxp_fspi_select_mem() return an error code and have nxp_fspi_exec_op() bail out on failure before any further register access, including nxp_fspi_invalid(). Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Link: https://patch.msgid.link/20260728-fspi-clock-v2-3-dbe786a4a6eb@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30spi: spi-nxp-fspi: enter stop mode before reconfiguring MCR0 and DLLHaibo Chen
In nxp_fspi_select_mem() the RX sample clock source (MCR0[RXCLKSRC]) and the DLL control registers (DLLxCR) are reconfigured while the FlexSPI module is still enabled. According to the FlexSPI reference manual initialization sequence, MCR0 and the DLL control registers should be programmed while the module is in stop mode, i.e. with MCR0[MDIS] set to 1, and the module re-enabled (MCR0[MDIS] = 0) afterwards. Wrap the RX sample clock source selection and the DLL calibration/ override reconfiguration in a stop-mode window to align with the RM and avoid reconfiguring timing-critical registers while the module is active. Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260728-fspi-clock-v2-2-dbe786a4a6eb@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30spi: spi-nxp-fspi: add per-SoC SDR/DTR clock rate limits for all supported SoCsHaibo Chen
The commit f43579ef3500 ("spi: spi-nxp-fspi: limit the clock rate for different sample clock source selection") introduced a global 166MHz cap for DTR mode (RXCLKSRC=3), based on the i.MX8MN datasheet timing specification (Section 3.9.9, page 65). After reviewing the FlexSPI timing parameters in the datasheets for all supported SoCs, the following corrections and additions are needed: 1. SDR mode (RXCLKSRC=0) limits vary per SoC: - i.MX8MN/MM/MP/95: 66MHz (IMX8MNCEC §3.9.9, IMX8MMCEC §3.9.10, IMX8MPCEC, IMX95CEC Rev.8 §4.11.7) - i.MX8QXP/QM/DXL/ULP: 60MHz (IMX8QXPCEC, IMX8QMCEC, IMX8DXLCEC, IMX8ULPCEC §7.3.1 ND mode) - LX2160A: 100MHz (LX2160ACEC FlexSPI timing parameters) 2. DTR mode (RXCLKSRC=3) limits vary per SoC: - i.MX8MN/MM/MP/ULP: 166MHz - i.MX8QXP/QM/DXL: 200MHz (same FlexSPI IP across this family) - i.MX95: 200MHz (IMX95CEC §4.11.7.3.2.3 Table 106) - LX2160A: DTR disabled (FSPI_QUIRK_DISABLE_DTR) Update related platform data with correct speed limation according to datasheet. Fixes: f43579ef3500 ("spi: spi-nxp-fspi: limit the clock rate for different sample clock source selection") Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Link: https://patch.msgid.link/20260728-fspi-clock-v2-1-dbe786a4a6eb@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30spi: spi-mpc52xx: use platform_get_irq_optional for IRQ lookupRosen Penev
Replace irq_of_parse_and_map() calls with platform_get_irq_optional() to fetch both IRQs in the probe function. This is a more portable approach that works with both DT and non-DT platforms and follows modern platform API conventions. The -EPROBE_DEFER case is handled properly so deferred probe works as expected, and invalid IRQ numbers are normalized to 0. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260727194714.11354-1-rosenp@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30net: phy: micrel: Add loopback support for ksz9131Maxime Chevallier
ksz9131 is configured for local loopback in a similar fashion as the ksz9031, with a need for full-duplex operation, but with some extra steps to take as specified in section 4.13.1 : 1. Configure the following registers: - MMD 1C, Register 15 = EEEE - MMD 1C, Register 16 = EEEE - MMD 1C, Register 18 = EEEE - MMD 1C, Register 1B = EEEE These 4 registers are marked as "Reserved" in the register map. When setting loopback up without configuring these 4 registers, the PHY appears to shut its RXC down, which can trigger failures on MACs that require it, such as stmmac. The datasheet does not specify to which state the registers must be reset when disabling loopback, so let's restore them to their measured initial values. This was discovered when trying to use stmmac selftests on imx8mp with a ksz9131 connected in RGMII. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20260728075222.956780-1-maxime.chevallier@bootlin.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30net: intel: remove conditional return with no effectSang-Heon Jeon
Both branches of the check return the same value, so the check has no effect. Remove it and return the value directly. This is the result of running the Coccinelle script from scripts/coccinelle/misc/cond_return_no_effect.cocci. Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com> Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com> Link: https://patch.msgid.link/20260725150852.859188-5-ekffu200098@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30net: remove conditional return with no effectSang-Heon Jeon
Both branches of the check return the same value, so the check has no effect. Remove it and return the value directly. This is the result of running the Coccinelle script from scripts/coccinelle/misc/cond_return_no_effect.cocci. Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20260725150852.859188-4-ekffu200098@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30net: ethernet: remove conditional return with no effectSang-Heon Jeon
Both branches of the check return the same value, so the check has no effect. Remove it and return the value directly. This is the result of running the Coccinelle script from scripts/coccinelle/misc/cond_return_no_effect.cocci. Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Arthur Kiyanovski <akiyano@amazon.com> Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com> # for dpaa2-switch Link: https://patch.msgid.link/20260725150852.859188-3-ekffu200098@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30dpll: zl3073x: remove conditional return with no effectSang-Heon Jeon
Both branches of the check return the same value, so the check has no effect. Remove it and return the value directly. This is the result of running the Coccinelle script from scripts/coccinelle/misc/cond_return_no_effect.cocci. Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com> Reviewed-by: Ivan Vecera <ivecera@redhat.com> Link: https://patch.msgid.link/20260725150852.859188-2-ekffu200098@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30md: recheck spare changes before starting syncAbd-Alrhman Masalkhi
remove_spares() and remove_and_add_spares() modify the array's rdev configuration. These operations are only safe after the array has been suspended. md_start_sync() checks whether spare configuration changes are needed before taking reconfig_mutex. However, the rdev state can change before the mutex is acquired, so the initial check can become stale. In that case, md_choose_sync_action() may remove or replace rdevs while normal I/O is still accessing them. The race can occur as follows: raid10d Worker Normal IO ____________ _______________________ ______________________ raid10_write_request() wait_blocked_dev() set Blocked set Faulty Skip Faulty rdev rrdev->nr_pending++ .repl_bio = bio removeable_rdev = false . array not suspended . lock mddev goto err_handle lock mddev (wait) . update sb . clear Blocked . . unlock mddev . lock mddev (acquires) remove_spares() removeable_rdev = true raid10_remove_disk() rdev = replacement replacement = NULL rdev_dec_pending(NULL) unlock mddev (NULL)->nr_pending-- In this case, rdev_dec_pending() is called with a NULL pointer, resulting in a NULL pointer dereference when attempting to decrement nr_pending. Fix this by suspending the array when spare configuration changes are needed, including for non-read-write arrays, and checking again after taking reconfig_mutex. If the array was not already suspended and a change is now needed, release the mutex, suspend the array, and reacquire the mutex before continuing. Fixes: bc08041b32ab ("md: suspend array in md_start_sync() if array need reconfiguration") Reported-by: sashiko-bot <sashiko-bot@kernel.org> Closes: https://sashiko.dev/#/patchset/20260628142420.1051027-1-abd.masalkhi@gmail.com?part=3 Signed-off-by: Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com> Reviewed-by: Yu Kuai <yukuai@fygo.io> Link: https://patch.msgid.link/20260708112003.474537-1-abd.masalkhi@gmail.com Signed-off-by: Yu Kuai <yukuai@fygo.io>
2026-07-30octeontx2-pf: Set correct sequence for carrier off and tx queue stopSuman Ghosh
During link down event, we were doing netif_tx_stop_all_queues() first and then netif_carrier_off(). This can cause a potential race since carrier is still on during down event. This patch reverse the calling order to fix the issue. Fixes: 50fe6c02e5ad ("octeontx2-pf: Register and handle link notifications") Signed-off-by: Suman Ghosh <sumang@marvell.com> Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260724072831.2415281-1-rkannoth@marvell.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30md: remove REQ_NOWAIT support from raid1/10/456Abd-Alrhman Masalkhi
REQ_NOWAIT support in md personalities that can block internally is fundamentally incomplete. While reads can avoid some blocking paths, write requests can still encounter cases where one mirror succeeds while another returns -EAGAIN. At that point md cannot distinguish queue pressure from a real device failure, so it can neither record a bad block nor safely retry the write without REQ_NOWAIT, leaving mirrors with divergent data. Rather than continue advertising REQ_NOWAIT support for personalities that cannot implement it correctly, remove it from raid1, raid10 and raid456. Keep REQ_NOWAIT for linear and raid0, which only remap bios to their underlying devices; stacked limits will still clear the feature if any component device lacks REQ_NOWAIT support. Fixes: bf2c411bb1cf ("md: raid456 add nowait support") Fixes: c9aa889b035f ("md: raid10 add nowait support") Fixes: 5aa705039c4f ("md: raid1 add nowait support") Fixes: f51d46d0e7cb ("md: add support for REQ_NOWAIT") Suggested-by: Yu Kuai <yukuai@fygo.io> Signed-off-by: Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com> Reviewed-by: Yu Kuai <yukuai@fygo.io> Link: https://patch.msgid.link/20260628142737.1051059-1-abd.masalkhi@gmail.com Signed-off-by: Yu Kuai <yukuai@fygo.io>
2026-07-30net: libwx: fix FDIR ATR queue mismatch for software VLAN packetsJiawen Wu
When TX VLAN hardware offload is disabled, VLAN tags are embedded in the packet payload (software VLAN). Previously, the driver failed to set the WX_TX_FLAGS_SW_VLAN flag for these packets during transmission. This missing flag caused the txgbe FDIR ATR logic to fall through to the default hash calculation path. This resulted in asymmetric hash values for Tx and Rx flows, preventing return packets from being steered to the same queue as the transmit packets. Fix this by detecting software VLANs via eth_type_vlan(skb->protocol) and setting WX_TX_FLAGS_SW_VLAN. This ensures the ATR feature selects the correct hashing algorithm to maintain Tx/Rx queue symmetry. Fixes: b501d261a5b3 ("net: txgbe: add FDIR ATR support") Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/0879DA38A8E32701+20260724074657.10773-1-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30netconsole: move netpoll_wait_carrier() as netcons_wait_carrier()Breno Leitao
netpoll_wait_carrier() waits for the egress device carrier during netconsole setup. Its only caller, netcons_netpoll_setup(), already lives in netconsole. Move the function into drivers/net/netconsole.c, drop EXPORT_SYMBOL_GPL() and remove the prototype from <linux/netpoll.h>. Rename it to netcons_wait_carrier() for the netcons_ prefix. It now reads the timeout through netpoll_get_carrier_timeout(), since carrier_timeout stays in netpoll to keep the netpoll.carrier_timeout parameter. Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Gustavo Luiz Duarte <gustavold@gmail.com> Link: https://patch.msgid.link/20260724-netconsole_move_more_final-v1-9-a5f7691db81c@debian.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30netconsole: move local_ip/remote_ip/ipv6 to netconsole_targetBreno Leitao
With netpoll_setup() and the packet-building path now living in netconsole, local_ip, remote_ip and ipv6 in struct netpoll are read and written only by netconsole. No other netpoll user touches them. Move the three fields into netconsole_target and switch the packet builders and setup helpers to take the target instead of the netpoll handle. struct netpoll is left holding only the device-binding state that the shared netpoll transport needs. Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Gustavo Luiz Duarte <gustavold@gmail.com> Link: https://patch.msgid.link/20260724-netconsole_move_more_final-v1-8-a5f7691db81c@debian.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30netconsole: move egress_dev() as netcons_egress_dev()Breno Leitao
move egress_dev() from netpoll to netconsole, and append netcons_ prefix. Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Gustavo Luiz Duarte <gustavold@gmail.com> Link: https://patch.msgid.link/20260724-netconsole_move_more_final-v1-7-a5f7691db81c@debian.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30netconsole: move netpoll_take_ipv6() as netcons_take_ipv6()Breno Leitao
Move netpoll_take_ipv6() to netconsole, and add netcons_ prefix. Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Gustavo Luiz Duarte <gustavold@gmail.com> Link: https://patch.msgid.link/20260724-netconsole_move_more_final-v1-6-a5f7691db81c@debian.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30netconsole: move netpoll_take_ipv4() as netcons_take_ipv4()Breno Leitao
Move netpoll_take_ipv4() to netconsole, which is the only user. Rename it to netcons_take_ipv4() for the netcons_ prefix. The body is unchanged. Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Gustavo Luiz Duarte <gustavold@gmail.com> Link: https://patch.msgid.link/20260724-netconsole_move_more_final-v1-5-a5f7691db81c@debian.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30netconsole: move netpoll_local_ip_unset() as netcons_local_ip_unset()Breno Leitao
Move netpoll_local_ip_unset() from netpoll to netconsole and rename it to netcons_local_ip_unset(); The body is otherwise unchanged, only the comment's setup-function reference is updated. Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Gustavo Luiz Duarte <gustavold@gmail.com> Link: https://patch.msgid.link/20260724-netconsole_move_more_final-v1-4-a5f7691db81c@debian.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30netconsole: take over netpoll_setup() from netpollBreno Leitao
netpoll_setup() is only used by netconsole. All the other users use __netpoll_setup(). Move netpoll_setup() to netconsole, and rename it to netcons_netpoll_setup(). Pure code motion: the body is unchanged. Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Gustavo Luiz Duarte <gustavold@gmail.com> Link: https://patch.msgid.link/20260724-netconsole_move_more_final-v1-3-a5f7691db81c@debian.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30drm/panthor: skip zero-sized firmware sectionsOsama Abdelkader
panthor_fw_load_section_entry() skips BO creation when the firmware section VA range is empty. If such a section is added to the firmware section list, section->mem is left as NULL. Later reload and unplug paths iterate over all firmware sections and dereference section->mem, which can lead to a NULL pointer dereference. Zero-sized firmware sections are valid, so accept them as no-op entries but skip adding them to the section list. Fixes: 2718d91816ee ("drm/panthor: Add the FW logical block") Cc: stable@vger.kernel.org Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> Reviewed-by: Steven Price <steven.price@arm.com> Link: https://patch.msgid.link/20260724172621.63046-1-osama.abdelkader@gmail.com Signed-off-by: Steven Price <steven.price@arm.com>
2026-07-30md/raid5: protect lockless recovery_offset accesses during reshapeChen Cheng
During reshape: - reshape_request() advances rdev->recovery_offset for non-In_sync devices locklessly. - analyse_stripe() reads rdev->recovery_offset locklessly to decide: a. use a replacement device to read ? b. a device can already be treated as in-sync for the current stripe ? one possible scenario is: CPU1 CPU2 reshape_request() -> mddev->curr_resync_completed = sector_nr -> if (!mddev->reshape_backwards) -> rdev->recovery_offset = sector_nr analyse_stripe(sh) -> rdev = conf->disks[i].replacement -> if (rdev->recovery_offset >= sh->sector + stripe_sectors) set_bit(R5_ReadRepl) -> or -> if (sh->sector + stripe_sectors <= rdev->recovery_offset) set_bit(R5_Insync) And it could be: - reading from a replacement before it is recovered far enough; or - treating a not-yet-recovered device as in-sync for the current stripe. Fixes: db0505d32066 ("md: be cautious about using ->curr_resync_completed for ->recovery_offset") The race report: ================================================================== BUG: KCSAN: data-race in ops_run_io / reshape_request write to 0xffff8bdee168b270 of 8 bytes by task 1704 on cpu 10: reshape_request+0x1292/0x17b0 raid5_sync_request+0x815/0xa00 md_do_sync.cold+0xf8d/0x1516 [......] read to 0xffff8bdee168b270 of 8 bytes by task 1696 on cpu 9: ops_run_io+0xc25/0x1960 handle_stripe+0x2273/0x4570 handle_active_stripes.isra.0+0x6e0/0xa50 raid5d+0x7d5/0xb90 [......] value changed: 0x0000000000091a00 -> 0x0000000000091b00 ================================================================== Signed-off-by: Chen Cheng <chencheng@fnnas.com> Reviewed-by: Yu Kuai <yukuai@fygo.io> Link: https://patch.msgid.link/20260627102519.136940-1-chencheng@fnnas.com Signed-off-by: Yu Kuai <yukuai@fygo.io>