summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2026-04-07cpuidle: Extract and export no-lock variants of cpuidle_unregister_device()Huisong Li
The cpuidle_unregister_device() function always acquires the internal cpuidle_lock (or pause/resume idle) during their execution. However, in some power notification scenarios (e.g., when old idle states may become unavailable), it is necessary to efficiently disable cpuidle first, then remove and re-create all cpuidle devices for all CPUs. To avoid frequent lock overhead and ensure atomicity across the entire batch operation, the caller needs to hold the cpuidle_lock once outside the loop. To address this, extract the core logic into the new function cpuidle_unregister_device_no_lock() and export it. Signed-off-by: Huisong Li <lihuisong@huawei.com> [ rjw: Added missing "inline", subject and changelog tweaks ] Link: https://patch.msgid.link/20260407081141.2493581-2-lihuisong@huawei.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-04-07gpio: gpio-by-pinctrl: s/used to do/is used to do/Geert Uytterhoeven
Add missing "is" to the driver's help text ("used to do" has a completely different meaning). Fixes: 7671f4949a6c9111 ("gpio: gpio-by-pinctrl: add pinctrl based generic GPIO driver") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Linus Walleij <linusw@kernel.org> Link: https://patch.msgid.link/b1ecb31a37f8e35447122554a38985cb6240eb11.1775556619.git.geert+renesas@glider.be [Bartosz: tweak the help text even more] Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-04-07ipmi: ssif_bmc: Fix KUnit test link failure when KUNIT=mJian Zhang
Building with CONFIG_KUNIT=m and CONFIG_SSIF_IPMI_BMC_KUNIT_TEST=y results in link errors such as: undefined reference to `kunit_binary_assert_format' undefined reference to `__kunit_do_failed_assertion' This happens because the test code is built-in while the KUnit core is built as a module, so the required KUnit symbols are not available at link time. Fix this by requiring KUNIT to be built-in when enabling SSIF_IPMI_BMC_KUNIT_TEST. Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202604071448.zUBjPYPu-lkp@intel.com/ Message-ID: <20260407094647.356661-1-zhangjian.3032@bytedance.com> Signed-off-by: Corey Minyard <corey@minyard.net>
2026-04-07drbd: use get_random_u64() where appropriateDavid Carlier
Use the typed random integer helpers instead of get_random_bytes() when filling a single integer variable. The helpers return the value directly, require no pointer or size argument, and better express intent. Signed-off-by: David Carlier <devnexen@gmail.com> Reviewed-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com> Link: https://patch.msgid.link/20260405154704.4610-1-devnexen@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-07spi: uniphier: Simplify clock handling with devm_clk_get_enabled()Pei Xiao
Replace devm_clk_get() followed by clk_prepare_enable() with devm_clk_get_enabled() for the clock. This removes the need for explicit clock enable and disable calls, as the managed API automatically handles clock disabling on device removal or probe failure. Remove the now-unnecessary clk_disable_unprepare() calls from the probe error path and the remove callback. Adjust error labels accordingly. Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Link: https://patch.msgid.link/b2deeefd4ef1a4bce71116aabfcb7e81400f6d37.1775546948.git.xiaopei01@kylinos.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-07spi: zynq-qspi: Simplify clock handling with devm_clk_get_enabled()Pei Xiao
Replace devm_clk_get() followed by clk_prepare_enable() with devm_clk_get_enabled() for both "pclk" and "ref_clk". This removes the need for explicit clock enable and disable calls, as the managed API automatically disables the clocks on device removal or probe failure. Remove the now-unnecessary clk_disable_unprepare() calls from the probe error paths and the remove callback. Simplify error handling by jumping directly to the remove_ctlr label. Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Acked-by: Michal Simek <michal.simek@amd.com> Link: https://patch.msgid.link/24043625f89376da36feca2408f990a85be7ab36.1775555500.git.xiaopei01@kylinos.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-07usb: gadget: f_ncm: validate minimum block_len in ncm_unwrap_ntb()Greg Kroah-Hartman
The block_len read from the host-supplied NTB header is checked against ntb_max but has no lower bound. When block_len is smaller than opts->ndp_size, the bounds check of: ndp_index > (block_len - opts->ndp_size) will underflow producing a huge unsigned value that ndp_index can never exceed, defeating the check entirely. The same underflow occurs in the datagram index checks against block_len - opts->dpe_size. With those checks neutered, a malicious USB host can choose ndp_index and datagram offsets that point past the actual transfer, and the skb_put_data() copies adjacent kernel memory into the network skb. Fix this by rejecting block lengths that cannot hold at least the NTB header plus one NDP. This will make block_len - opts->ndp_size and block_len - opts->dpe_size both well-defined. Commit 8d2b1a1ec9f5 ("CDC-NCM: avoid overflow in sanity checking") fixed a related class of issues on the host side of NCM. Fixes: 2b74b0a04d3e ("USB: gadget: f_ncm: add bounds checks to ncm_unwrap_ntb()") Cc: stable <stable@kernel.org> Assisted-by: gregkh_clanker_t1000 Link: https://patch.msgid.link/2026040753-baffle-handheld-624d@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-07usb: gadget: f_phonet: fix skb frags[] overflow in pn_rx_complete()Greg Kroah-Hartman
A broken/bored/mean USB host can overflow the skb_shared_info->frags[] array on a Linux gadget exposing a Phonet function by sending an unbounded sequence of full-page OUT transfers. pn_rx_complete() finalizes the skb only when req->actual < req->length, where req->length is set to PAGE_SIZE by the gadget. If the host always sends exactly PAGE_SIZE bytes per transfer, fp->rx.skb will never be reset and each completion will add another fragment via skb_add_rx_frag(). Once nr_frags exceeds MAX_SKB_FRAGS (default 17), subsequent frag stores overwrite memory adjacent to the shinfo on the heap. Drop the skb and account a length error when the frag limit is reached, matching the fix applied in t7xx by commit f0813bcd2d9d ("net: wwan: t7xx: fix potential skb->frags overflow in RX path"). Cc: stable <stable@kernel.org> Assisted-by: gregkh_clanker_t1000 Link: https://patch.msgid.link/2026040705-fruit-unloved-0701@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-07usb: gadget: f_hid: Add missing error codeEthan Tidmore
Currently in cdev_alloc() error path no error code is assigned. Assign error code '-ENOMEM'. Detected by Smatch: drivers/usb/gadget/function/f_hid.c:1291 hidg_bind() warn: missing error code 'status' Fixes: 81ebd43cc0d6d ("usb: gadget: f_hid: don't call cdev_init while cdev in use") Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com> Acked-by: Peter Korsgaard <peter@korsgaard.com> Reviewed-by: Michael Zimmermann <sigmaepsilon92@gmail.com> Link: https://patch.msgid.link/20260402180008.64233-1-ethantidmore06@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-07usb: typec: cros_ec_ucsi: Load driver from OF and ACPI definitionsJameson Thies
Add support for cros_ec_ucsi to load based on "google,cros-ec-ucsi" compatible devices and "GOOG0021" ACPI nodes. Signed-off-by: Jameson Thies <jthies@google.com> Reviewed-by: Benson Leung <bleung@chromium.org> Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Link: https://patch.msgid.link/20260403223357.1896403-3-jthies@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-07USB: of: Simplify with scoped for each OF child loopHans Zhang
Use scoped for-each loop when iterating over device nodes to make code a bit simpler. Signed-off-by: Hans Zhang <18255117159@163.com> Link: https://patch.msgid.link/20260407013122.1296818-1-18255117159@163.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-07usbip: validate number_of_packets in usbip_pack_ret_submit()Nathan Rebello
When a USB/IP client receives a RET_SUBMIT response, usbip_pack_ret_submit() unconditionally overwrites urb->number_of_packets from the network PDU. This value is subsequently used as the loop bound in usbip_recv_iso() and usbip_pad_iso() to iterate over urb->iso_frame_desc[], a flexible array whose size was fixed at URB allocation time based on the *original* number_of_packets from the CMD_SUBMIT. A malicious USB/IP server can set number_of_packets in the response to a value larger than what was originally submitted, causing a heap out-of-bounds write when usbip_recv_iso() writes to urb->iso_frame_desc[i] beyond the allocated region. KASAN confirmed this with kernel 7.0.0-rc5: BUG: KASAN: slab-out-of-bounds in usbip_recv_iso+0x46a/0x640 Write of size 4 at addr ffff888106351d40 by task vhci_rx/69 The buggy address is located 0 bytes to the right of allocated 320-byte region [ffff888106351c00, ffff888106351d40) The server side (stub_rx.c) and gadget side (vudc_rx.c) already validate number_of_packets in the CMD_SUBMIT path since commits c6688ef9f297 ("usbip: fix stub_rx: harden CMD_SUBMIT path to handle malicious input") and b78d830f0049 ("usbip: fix vudc_rx: harden CMD_SUBMIT path to handle malicious input"). The server side validates against USBIP_MAX_ISO_PACKETS because no URB exists yet at that point. On the client side we have the original URB, so we can use the tighter bound: the response must not exceed the original number_of_packets. This mirrors the existing validation of actual_length against transfer_buffer_length in usbip_recv_xbuff(), which checks the response value against the original allocation size. Kelvin Mbogo's series ("usb: usbip: fix integer overflow in usbip_recv_iso()", v2) hardens the receive-side functions themselves; this patch complements that work by catching the bad value at its source -- in usbip_pack_ret_submit() before the overwrite -- and using the tighter per-URB allocation bound rather than the global USBIP_MAX_ISO_PACKETS limit. Fix this by checking rpdu->number_of_packets against urb->number_of_packets in usbip_pack_ret_submit() before the overwrite. On violation, clamp to zero so that usbip_recv_iso() and usbip_pad_iso() safely return early. Fixes: 1325f85fa49f ("staging: usbip: bugfix add number of packets for isochronous frames") Cc: stable <stable@kernel.org> Acked-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Nathan Rebello <nathan.c.rebello@gmail.com> Link: https://patch.msgid.link/20260402085259.234-1-nathan.c.rebello@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-07usb: gadget: renesas_usb3: validate endpoint index in standard request handlersGreg Kroah-Hartman
The GET_STATUS and SET/CLEAR_FEATURE handlers extract the endpoint number from the host-supplied wIndex without any sort of validation. Fix this up by validating the number of endpoints actually match up with the number the device has before attempting to dereference a pointer based on this math. This is just like what was done in commit ee0d382feb44 ("usb: gadget: aspeed_udc: validate endpoint index for ast udc") for the aspeed driver. Fixes: 746bfe63bba3 ("usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral controller") Cc: stable <stable@kernel.org> Assisted-by: gregkh_clanker_t1000 Link: https://patch.msgid.link/2026040647-sincerity-untidy-b104@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-07usb: core: config: reverse the size check of the SSP isoc endpoint descriptorGreg Kroah-Hartman
Reverse the check of the size of the usb_ssp_isoc_ep_comp_descriptor structure to be done before accessing the structure itself. Functionally, this doesn't really do anything as the buffer is all internal to the kernel, and reading off the end is just fine, but static checking tools get picky when noticing that a potential read could be made "outside" of an allocated buffer. Not a bugfix, but a cleanup to keep tools from tripping over this constantly and annoying me with their pointless reports. Link: https://patch.msgid.link/2026040630-graded-postwar-760f@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-07usb: typec: ucsi: Set usb mode on partner changeJameson Thies
Currently the partner usb_mode is only set in ucsi_register_partner(). If the partner enters USB4 operation after it is registered, this is not reported to the typec class. The UCSI spec states that the Connector Partner Changed bit can represent a Connector Partner Flags change. When handling a UCSI partner change, check the partner flags for USB4 operation. Signed-off-by: Jameson Thies <jthies@google.com> Reviewed-by: Benson Leung <bleung@chromium.org> Link: https://patch.msgid.link/20260402182438.867396-1-jthies@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-07USB: cdc-acm: Add quirks for Yoga Book 9 14IAH10 INGENIC touchscreenDave Carey
The Lenovo Yoga Book 9 14IAH10 (83KJ) has a composite USB device (17EF:6161) that controls both touchscreens via a CDC ACM interface. Interface 0 is a standard CDC ACM control interface, but interface 1 (the data interface) incorrectly declares vendor-specific class (0xFF) instead of USB_CLASS_CDC_DATA. cdc-acm rejects the device at probe with -EINVAL, leaving interface 0 unbound and EP 0x82 never polled. With no consumer polling EP 0x82, the firmware's watchdog fires every ~20 seconds and resets the USB bus, producing a continuous disconnect/ reconnect loop that prevents the touchscreens from ever initialising. Add two new quirk flags: VENDOR_CLASS_DATA_IFACE: Bypasses the bInterfaceClass check in acm_probe() that would otherwise reject the vendor-class data interface with -EINVAL. ALWAYS_POLL_CTRL: Submits the notification URB at probe() rather than waiting for a TTY open. This keeps EP 0x82 polled at all times, permanently suppressing the firmware watchdog. The URB is resubmitted after port_shutdown() and on system resume. SET_CONTROL_LINE_STATE (DTR|RTS) is sent at probe and after port_shutdown() to complete firmware handshake. Note: the firmware performs exactly 4 USB connect/disconnect cycles (~19 s each) on every cold boot before stabilising. This is a fixed firmware property; touch is available ~75-80 s after power-on. Signed-off-by: Dave Carey <carvsdriver@gmail.com> Cc: stable <stable@kernel.org> Tested-by: Dave Carey <carvsdriver@gmail.com> Acked-by: Oliver Neukum <oneukum@suse.com> Link: https://patch.msgid.link/20260402182950.389016-1-carvsdriver@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-07usb: storage: Expand range of matched versions for VL817 quirks entryDaniel Brát
Expands range of matched bcdDevice values for the VL817 quirk entry. This is based on experience with Axagon EE35-GTR rev1 3.5" HDD enclosure, which reports its bcdDevice as 0x0843, but presumably other vendors using this IC in their products may set it to any other value. Signed-off-by: Daniel Brát <danek.brat@gmail.com> Cc: stable <stable@kernel.org> Link: https://patch.msgid.link/20260402172433.5227-1-danek.brat@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-07usb: chipidea: otg: not wait vbus drop if use role_switchXu Yang
The usb role switch will update ID and VBUS states at the same time, and vbus will not drop when execute data role swap in Type-C usecase. So lets not wait vbus drop in usb role switch case too. Fixes: e1b5d2bed67c ("usb: chipidea: core: handle usb role switch in a common way") Cc: stable@vger.kernel.org Acked-by: Peter Chen <peter.chen@kernel.org> Reviewed-by: Jun Li <jun.li@nxp.com> Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Link: https://patch.msgid.link/20260402071457.2516021-3-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-07usb: chipidea: core: allow ci_irq_handler() handle both ID and VBUS changeXu Yang
For USB role switch-triggered IRQ, ID and VBUS change come together, for example when switching from host to device mode. ID indicate a role switch and VBUS is required to determine whether the device controller can start operating. Currently, ci_irq_handler() handles only a single event per invocation. This can cause an issue where switching to device mode results in the device controller not working at all. Allowing ci_irq_handler() to handle both ID and VBUS change in one call resolves this issue. Meanwhile, this change also affects the VBUS event handling logic. Previously, if an ID event indicated host mode the VBUS IRQ will be ignored as the device disable BSE when stop() is called. With the new behavior, if ID and VBUS IRQ occur together and the target mode is host, the VBUS event is queued and ci_handle_vbus_change() will call usb_gadget_vbus_connect(), after which USBMODE is switched to device mode, causing host mode to stop working. To prevent this, an additional check is added to skip handling VBUS event when current role is not device mode. Suggested-by: Peter Chen <peter.chen@kernel.org> Fixes: e1b5d2bed67c ("usb: chipidea: core: handle usb role switch in a common way") Cc: stable@vger.kernel.org Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Link: https://patch.msgid.link/20260402071457.2516021-2-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-07usb: chipidea: core: refactor ci_usb_role_switch_set()Xu Yang
Current code is redundant, refactor the code, no function change. Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Link: https://patch.msgid.link/20260402071457.2516021-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-07usb: typec: ucsi: skip connector validation before initNathan Rebello
Notifications can arrive before ucsi_init() has populated ucsi->cap.num_connectors via GET_CAPABILITY. At that point num_connectors is still 0, causing all valid connector numbers to be incorrectly rejected as bogus. Skip the bounds check when num_connectors is 0 (not yet initialized). Pre-init notifications are already handled safely by the early-event guard in ucsi_connector_change(). Reported-by: Takashi Iwai <tiwai@suse.de> Fixes: d2d8c17ac01a ("usb: typec: ucsi: validate connector number in ucsi_notify_common()") Cc: stable@vger.kernel.org Signed-off-by: Nathan Rebello <nathan.c.rebello@gmail.com> Tested-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260407063958.863-1-nathan.c.rebello@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-07net/mlx5e: XDP, Use page fragments for linear data in multibuf-modeDragos Tatulea
Currently in XDP multi-buffer mode for striding rq a whole page is allocated for the linear part of the XDP buffer. This is wasteful, especially on systems with larger page sizes. This change splits the page into fixed sized fragments. The page is replenished when the maximum number of allowed fragments is reached. When a fragment is not used, it will be simply recycled on next packet. This is great for XDP_DROP as the fragment can be recycled for the next packet. In the most extreme case (XDP_DROP everything), there will be 0 fragments used => only one linear page allocation for the lifetime of the XDP program. The previous page_pool size increase was too conservative (doubling the size) and now there are much fewer allocations (1/8 for a 4K page). So drop the page_pool size extension altogether when the linear side page is used. This small improvement is at most visible for XDP_DROP tests with small 64B packets and a large enough MTU for Striding RQ to be in non-linear mode: +----------------------------------------------------------------------+ | System | MTU | baseline | this change | improvement | |----------------------+------+------------+-------------+-------------| | 4K page x86_64 [1] | 9000 | 26.30 Mpps | 30.45 Mpps | 15.80 % | | 64K page aarch64 [2] | 9000 | 15.27 Mpps | 20.10 Mpps | 31.62 % | +----------------------------------------------------------------------+ [1] Intel Xeon Platinum 8580 [2] ARM Neoverse-N1 Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260403090927.139042-6-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-04-07net/mlx5e: XDP, Use a single linear page per rqDragos Tatulea
Currently in striding rq there is one mlx5e_frag_page member per WQE for the linear page. This linear page is used only in XDP multi-buffer mode. This is wasteful because only one linear page is needed per rq: the page gets refreshed on every packet, regardless of WQE. Furthermore, it is not needed in other modes (non-XDP, XDP single-buffer). This change moves the linear page into its own structure (struct mlx5_mpw_linear_info) and allocates it only when necessary. A special structure is created because an upcoming patch will extend this structure to support fragmentation of the linear page. This patch has no functional changes. Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260403090927.139042-5-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-04-07net/mlx5e: XDP, Remove stride size limitationDragos Tatulea
Currently XDP mode always uses PAGE_SIZE strides. This limitation existed because page fragment counting was not implemented when XDP was added. Furthermore, due to this limitation there were other issues as well on system with larger pages (e.g. 64K): - XDP for Striding RQ was effectively disabled on such systems. - Legacy RQ allows the configuration but uses a fixed scheme of one XDP buffer per page which is inefficient. As fragment counting was added during the driver conversion to page_pool and the support for XDP multi-buffer, it is now possible to remove this stride size limitation. This patch does just that. Now it is possible to use XDP on systems with higher page sizes (e.g. 64K): - For Striding RQ, loading the program is no longer blocked. Although a 64K page can fit any packet, MTUs that result in stride > 8K will still make the RQ in non-linear mode. That's because the HW doesn't support a higher than 8K stride. - For Legacy RQ, the stride size was PAGE_SIZE which was very inefficient. Now the stride size will be calculated relative to MTU. Legacy RQ will always be in linear mode for larger system pages. This can be observed with an XDP_DROP test [1] when running in Legacy RQ mode on a ARM Neoverse-N1 system with a 64K page size: +-----------------------------------------------+ | MTU | baseline | this change | improvement | |------+------------+-------------+-------------| | 1500 | 15.55 Mpps | 18.99 Mpps | 22.0 % | | 9000 | 15.53 Mpps | 18.24 Mpps | 17.5 % | +-----------------------------------------------+ There are performance benefits for Striding RQ mode as well: - Striding RQ non-linear mode now uses 256B strides, just like non-XDP mode. - Striding RQ linear mode can now fit a number of XDP buffers per page that is relative to the MTU size. That means that on 4K page systems and a small enough MTU, 2 XDP buffers can fit in one page. The above benefits for Striding RQ can be observed with an XDP_DROP test [1] when running on a 4K page x86_64 system (Intel Xeon Platinum 8580): +-----------------------------------------------+ | MTU | baseline | this change | improvement | |------+------------+-------------+-------------| | 1000 | 28.36 Mpps | 33.98 Mpps | 19.82 % | | 9000 | 20.76 Mpps | 26.30 Mpps | 26.70 % | +-----------------------------------------------+ [1] Test description: - xdp-bench with XDP_DROP - RX: single queue - TX: sends 64B packets to saturate CPU on RX side Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260403090927.139042-4-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-04-07net/mlx5e: XDP, Improve dma address calculation of linear part for XDP_TXDragos Tatulea
When calculating the dma address of the linear part of an XDP frame, the formula assumes that there is a single XDP buffer per page. Extend the formula to allow multiple XDP buffers per page by calculating the data offset in the page. This is a preparation for the upcoming removal of a single XDP buffer per page limitation when the formula will no longer be correct. Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260403090927.139042-3-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-04-07net/mlx5e: XSK, Increase size for chunk_size paramDragos Tatulea
When 64K pages are used, chunk_size can take the 64K value which doesn't fit in u16. This results in overflows that are detected in mlx5e_mpwrq_log_wqe_sz(). Increase the type to u32 to fix this. Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260403090927.139042-2-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-04-07coresight: tpdm: fix invalid MMIO access issueJie Gan
Create the csdev_access struct only when a valid MMIO resource is available. In tpdm_probe(), base is uninitialized for static TPDM instances that lack an MMIO resource, causing csdev_access to be created with a garbage address. So far there has no register access for static instance, but this change helps mitigate potential risks in the future. Fixes: 14ae052f7947 ("coresight: tpdm: add static tpdm support") Reviewed-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Jie Gan <jie.gan@oss.qualcomm.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20260407-fix-potential-issue-in-tpdm-v2-1-1d0e0d3cb793@oss.qualcomm.com
2026-04-07spi: spi-fsl-lpspi: make struct lpspi_config::mode u32Marc Kleine-Budde
The struct lpspi_config::mode holds a copy of the mode of struct spi_device::mode. In commit 937e6d756422 ("spi: expand mode support") the struct spi_device::mode was increased from u16 to u32. Increase the struct lpspi_config::mode to u32 avoid truncating the mode variable. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://patch.msgid.link/20260319-spi-fsl-lpspi-cleanups-v2-11-02b56c5d44a8@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-07spi: spi-fsl-lpspi: fsl_lpspi_write_tx_fifo(): simplify while() loop checkMarc Kleine-Budde
To simplify the loop check. Combine both conditions of the while() and the directly following if() into the while(). Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://patch.msgid.link/20260319-spi-fsl-lpspi-cleanups-v2-10-02b56c5d44a8@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-07spi: spi-fsl-lpspi: fsl_lpspi_reset(): convert to void functionMarc Kleine-Budde
The function fsl_lpspi_reset() cannot fail and it's return value is never checked. Simplify the code and convert it into a void function. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://patch.msgid.link/20260319-spi-fsl-lpspi-cleanups-v2-9-02b56c5d44a8@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-07spi: spi-fsl-lpspi: fsl_lpspi_can_dma(): directly assign return value to ↵Marc Kleine-Budde
fsl_lpspi->usedma The function fsl_lpspi_can_dma() returns a bool. Simplify the code, remove the if/else and assign the return value of fsl_lpspi_can_dma() directly to fsl_lpspi->usedma. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://patch.msgid.link/20260319-spi-fsl-lpspi-cleanups-v2-8-02b56c5d44a8@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-07spi: spi-fsl-lpspi: fsl_lpspi_setup_transfer(): remove useless spi_transfer ↵Marc Kleine-Budde
NULL pointer check fsl_lpspi_setup_transfer() is either called via: | fsl_lpspi_prepare_message() | -> fsl_lpspi_setup_transfer() or | -> spi_transfer_one_message() | -> controller->transfer_one == fsl_lpspi_transfer_one() | -> fsl_lpspi_setup_transfer() The first call path already has a spi_transfer NULL pointer check, the second one explicitly iterates over all spi_transfer of the spi_message. Simplify the code by removing the useless NULL pointer check. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://patch.msgid.link/20260319-spi-fsl-lpspi-cleanups-v2-7-02b56c5d44a8@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-07spi: spi-fsl-lpspi: fsl_lpspi_set_cmd(): use FIELD_PREP to encode Transmit ↵Marc Kleine-Budde
Command register Instead of open coding mask and shift operations and to increase readability use FIELD_PREP() to encode the Transmit Command register. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://patch.msgid.link/20260319-spi-fsl-lpspi-cleanups-v2-6-02b56c5d44a8@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-07spi: spi-fsl-lpspi: fsl_lpspi_set_cmd(): remove obfuscated and obsolete ↵Marc Kleine-Budde
assignment of TCR_CPOL and SPI_CPHA Commit 7ae4d097b752 ("spi: spi-fsl-lpspi: Handle clock polarity and phase") enhances the driver with clock polarity and phase handling. Among other things that commit in fsl_lpspi_set_cmd() explicitly set the bits TCR_CPOL and TCR_CPHA bits in the TCR register depending on their corresponding bits in the SPI mode (SPI_CPOL and SPI_CPHA), to configure clock polarity and phase. That change made the assignment of the lowest 2 bits of lpspi_config::mode shifted by << 30 to the TCR register obsolete. The lowest 2 bits of struct lpspi_config::mode (= SPI_CPOL and SPI_CPHA) match the corresponding bits in the TCR register (TCR_CPOL and TCR_CPHA) if shifted. Keep the better readable and maintainable version provided in commit 7ae4d097b752 ("spi: spi-fsl-lpspi: Handle clock polarity and phase") and remove the obfuscated version. Cc: Marek Vasut <marex@nabladev.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://patch.msgid.link/20260319-spi-fsl-lpspi-cleanups-v2-5-02b56c5d44a8@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-07spi: spi-fsl-lpspi: fsl_lpspi_set_cmd(): use mode from struct ↵Marc Kleine-Budde
fsl_lpspi_data::config::mode Commit 7ae4d097b752 ("spi: spi-fsl-lpspi: Handle clock polarity and phase") enhances the driver with clock polarity and phase handling. That commit adds a 2nd argument ("struct spi_device *spi") to the fsl_lpspi_set_cmd() function. The "spi" pointer is used to access the "mode" of the current transfer. However the mode is already available via "fsl_lpspi->config.mode". To simplify the driver remove the 2nd argument and use "fsl_lpspi->config.mode" to access the mode. Cc: Marek Vasut <marex@nabladev.com> Reviewed-by: Marek Vasut <marex@nabladev.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://patch.msgid.link/20260319-spi-fsl-lpspi-cleanups-v2-4-02b56c5d44a8@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-07spi: spi-fsl-lpspi: fsl_lpspi_set_watermark(): use FIELD_PREP() to encode ↵Marc Kleine-Budde
FIFO Control register Instead of open coding mask and shift operations and to increase readability use FIELD_PREP() to encode the FIFO Control register. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://patch.msgid.link/20260319-spi-fsl-lpspi-cleanups-v2-2-02b56c5d44a8@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-07spi: spi-fsl-lpspi: adapt to kernel coding styleMarc Kleine-Budde
Adapt the driver to current kernel coding style standards. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://patch.msgid.link/20260319-spi-fsl-lpspi-cleanups-v2-1-02b56c5d44a8@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-07Merge v7.0-rc7 into drm-nextSimona Vetter
Thomas Zimmermann needs 2f42c1a61616 ("drm/ast: dp501: Fix initialization of SCU2C") for drm-misc-next. Conflicts: - drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c Just between e927b36ae18b ("drm/amd/display: Fix NULL pointer dereference in dcn401_init_hw()") and it's cherry-pick that confused git. - drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c Deleted in 6b0a6116286e ("drm/amd/pm: Unify version check in SMUv11") but some cherry-picks confused git. Same for v12/v14. Signed-off-by: Simona Vetter <simona.vetter@ffwll.ch>
2026-04-07wifi: rt2x00usb: fix devres lifetimeJohan Hovold
USB drivers bind to USB interfaces and any device managed resources should have their lifetime tied to the interface rather than parent USB device. This avoids issues like memory leaks when drivers are unbound without their devices being physically disconnected (e.g. on probe deferral or configuration changes). Fix the USB anchor lifetime so that it is released on driver unbind. Fixes: 8b4c0009313f ("rt2x00usb: Use usb anchor to manage URB") Cc: stable@vger.kernel.org # 4.7 Cc: Vishal Thanki <vishalthanki@gmail.com> Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/20260327113219.1313748-1-johan@kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-04-07wifi: brcmfmac: validate bsscfg indices in IF eventsPengpeng Hou
brcmf_fweh_handle_if_event() validates the firmware-provided interface index before it touches drvr->iflist[], but it still uses the raw bsscfgidx field as an array index without a matching range check. Reject IF events whose bsscfg index does not fit in drvr->iflist[] before indexing the interface array. Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Link: https://patch.msgid.link/20260323074551.93530-1-pengpeng@iscas.ac.cn [add missing wifi prefix] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-04-07wifi: brcmsmac: Fix dma_free_coherent() sizeThomas Fourier
dma_alloc_consistent() may change the size to align it. The new size is saved in alloced. Change the free size to match the allocation size. Fixes: 5b435de0d786 ("net: wireless: add brcm80211 drivers") Cc: <stable@vger.kernel.org> Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Link: https://patch.msgid.link/20260218130741.46566-3-fourier.thomas@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-04-07gpio: aspeed: fix unsigned long int declarationChen Jung Ku
Replace "unsigned long int" with "unsigned long" to follow Linux kernel coding style. No functional change intended. Signed-off-by: Chen Jung Ku <ku.loong@gapp.nthu.edu.tw> Link: https://patch.msgid.link/20260405144803.31358-1-ku.loong@gapp.nthu.edu.tw Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-04-07gpio: rockchip: convert to dynamic GPIO base allocationShawn Lin
This driver is used on device tree based platform. Use dynamic GPIO numberspace base to suppress the warning: gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation. gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation. gpio gpiochip2: Static allocation of GPIO base is deprecated, use dynamic allocation. gpio gpiochip3: Static allocation of GPIO base is deprecated, use dynamic allocation. gpio gpiochip4: Static allocation of GPIO base is deprecated, use dynamic allocation. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Link: https://patch.msgid.link/1774864401-177149-1-git-send-email-shawn.lin@rock-chips.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-04-07gpio: remove dev-sync-probeBartosz Golaszewski
There are no more users. Remove the dev-sync-probe module. Reviewed-by: Linus Walleij <linusw@kernel.org> Link: https://patch.msgid.link/20260327-gpio-kill-dev-sync-probe-v1-4-efac254f1a1d@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-04-07gpio: virtuser: stop using dev-sync-probeBartosz Golaszewski
dev-err-probe is an overengineered solution to a simple problem. Use a combination of wait_for_probe() and device_is_bound() to synchronously wait for the platform device to probe. Reviewed-by: Linus Walleij <linusw@kernel.org> Link: https://patch.msgid.link/20260327-gpio-kill-dev-sync-probe-v1-3-efac254f1a1d@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-04-07gpio: aggregator: stop using dev-sync-probeBartosz Golaszewski
dev-err-probe is an overengineered solution to a simple problem. Use a combination of wait_for_probe() and device_is_bound() to synchronously wait for the platform device to probe. Reviewed-by: Linus Walleij <linusw@kernel.org> Link: https://patch.msgid.link/20260327-gpio-kill-dev-sync-probe-v1-2-efac254f1a1d@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-04-07gpio: sim: stop using dev-sync-probeBartosz Golaszewski
dev-err-probe is an overengineered solution to a simple problem. Use a combination of wait_for_probe() and device_is_bound() to synchronously wait for the platform device to probe. Reviewed-by: Linus Walleij <linusw@kernel.org> Link: https://patch.msgid.link/20260327-gpio-kill-dev-sync-probe-v1-1-efac254f1a1d@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-04-07gpio: Add Intel Nova Lake ACPI GPIO events driverAlan Borzeszkowski
This driver provides support for new way of handling platform events, through the use of GPIO-signaled ACPI events. This mechanism is used on Intel client platforms released in 2026 and later, starting with Intel Nova Lake. Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Link: https://patch.msgid.link/20260401174526.60881-1-alan.borzeszkowski@linux.intel.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-04-07platform/x86: thinkpad_acpi: Drop ACPI driver registrationRafael J. Wysocki
There is no point in registering an ACPI driver that only has an empty .add() callback, which is done by the thinkpad_acpi driver, since after binding to an ACPI device it only sits there and does nothing. That binding only effectively causes the ACPI device's reference count to increase, but that can be achieved by using acpi_get_acpi_dev() instead of acpi_fetch_acpi_dev() in setup_acpi_notify(), and doing the corresponding cleanup in ibm_exit(). Update the code accordingly and get rid of the non-functional ACPI driver. No intentional functional impact beyond altering sysfs content. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Link: https://patch.msgid.link/3949487.kQq0lBPeGt@rafael.j.wysocki Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2026-04-07firmware: arm_ffa: Use the correct buffer size during RXTX_MAPSebastian Ene
Don't use the discovered buffer size from an FFA_FEATURES call directly since we can run on a system that has the PAGE_SIZE larger than the returned size which makes the alloc_pages_exact for the buffer to be rounded up. Fixes: 61824feae5c0 ("firmware: arm_ffa: Fetch the Rx/Tx buffer size using ffa_features()") Signed-off-by: Sebastian Ene <sebastianene@google.com> Link: https://patch.msgid.link/20260402113939.930221-1-sebastianene@google.com Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>