summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-07-07staging: rtl8723bs: rename CamelCase variable RxMgmtFrameSeqNumGianmaria Biselli
Rename RxMgmtFrameSeqNum to rx_mgmt_frame_seq_num to comply with kernel coding style. Found by checkpatch.pl strict. Signed-off-by: Gianmaria Biselli <gianmariabiselli@gmail.com> Link: https://patch.msgid.link/20260524031212.26208-1-gianmariabiselli@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: add missing spaces around '*' operatorMohammed Momin
Adhere to the Linux kernel coding style by adding missing spaces around the '*' binary operator in the init_channel_set function. This resolves a checkpatch warning and improves code readability. Signed-off-by: Mohammed Momin <linuxmomin0@gmail.com> Link: https://patch.msgid.link/20260523171903.30484-1-linuxmomin0@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: Fix line over 100 chars in xmit_linux.cPramod Maurya
Wrap the long function signature of rtw_os_xmit_resource_free to comply with the 100 column line length limit reported by checkpatch.pl. Signed-off-by: Pramod Maurya <pramod.nexgen@gmail.com> Link: https://patch.msgid.link/20260523162831.163704-1-pramod.nexgen@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: remove unnecessary braces in rtl8723b_hal_init.cAtharv Margur
Remove unnecessary braces around single statement blocks to improve readability and conform to kernel coding style. No functional changes intended. Signed-off-by: Atharv Margur <atharvmargur@gmail.com> Link: https://patch.msgid.link/20260523141341.21607-1-atharvmargur@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: clean up wlanevents table in rtw_mlme_ext.cAndrei Khomenkov
Clean up the wlanevents table by removing redundant ampersands, adding all index comments and aligning them. Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org> Link: https://patch.msgid.link/20260522190256.49830-3-khomenkov@mailbox.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: remove dead rtw_atimdone_event_callback()Andrei Khomenkov
Remove the dead rtw_atimdone_event_callback() function since it is unused anywhere in the driver. In the wlanevents table, replace it with rtw_dummy_event_callback() to avoid an index shift. Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org> Reviewed-by: Dan Carpenter <error27@gmail.com> Link: https://patch.msgid.link/20260522190256.49830-2-khomenkov@mailbox.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: reformat rtw_efuse_one_byte_read() signatureMoksh Panicker
Reformat multi-line function signature to a single line to fix line length and coding style warnings from checkpatch.pl. Signed-off-by: Moksh Panicker <mokshpanicker.7@gmail.com> Link: https://patch.msgid.link/20260522125022.29700-3-mokshpanicker.7@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: remove unused rtl8192c function declarationsPang-Chun Liu
rtl8192c_translate_rx_signal_stuff() and rtl8192c_query_rx_desc_status() are declared in rtl8192c_recv.h but neither has a definition anywhere in the driver, and there are no callers. Remove the dead declarations. Signed-off-by: Pang-Chun Liu <kevin95120@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Link: https://patch.msgid.link/20260521144113.28869-1-kevin95120@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: convert LPS_RF_ON_check to errnoHungyu Lin
Convert LPS_RF_ON_check() to return standard kernel error codes. Replace -1 and -2 with -ETIMEDOUT and -ENODEV respectively. No functional change intended as callers currently ignore the return value. Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Link: https://patch.msgid.link/20260521104316.27739-3-dennylin0707@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: simplify LPS_RF_ON_check control flowHungyu Lin
Replace err + break pattern with direct returns to simplify the control flow and improve readability. No functional change intended. Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Link: https://patch.msgid.link/20260521104316.27739-2-dennylin0707@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07net: ethernet: qualcomm: Constify "queue_map" in ppe_ring_queue_map_set()Krzysztof Kozlowski
"queue_map" is a pointer to "u32" and is not modified by the ppe_ring_queue_map_set() function, thus can be made a pointer to const to indicate that function is treating the pointed value read-only. This in general makes the code easier to follow and a bit safer. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Luo Jie <jie.luo@oss.qualcomm.com> Link: https://patch.msgid.link/20260702094908.79859-4-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07net: ethernet: qualcomm: Unconstify function arguments passed by valueKrzysztof Kozlowski
There is no benefit in marking "const" a pass-by-value (not a pointer) function argument, because it is passed as a copy on the stack. No code readability improvements, no additional compiler-time safety for misuse. Drop such redundant "const". Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Luo Jie <jie.luo@oss.qualcomm.com> Link: https://patch.msgid.link/20260702094908.79859-3-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07clk: rockchip: rk3588: Allow VP2 the same sourcing options as other VPsHeiko Stuebner
Right now dclk_vop2_src is not allowed to change its parent, while the other two dclks are allowed to do this. All three VPs can drive non-static outputs (HDMI, DP, eDP) and even the eDP can also support full DP connections (though no DP+). Therefore remove the CLK_SET_RATE_NO_REPARENT flag, to allow VP2 the same flexibility in acquiring its clock rate. Tested-by: Quentin Schulz <quentin.schulz@cherry.de> # RK3588 Tiger w/ DP Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de> Reviewed-by: Quentin Schulz <quentin.schuz@cherry.de> Tested-by: Chris Morgan <macromorgan@hotmail.com> Link: https://patch.msgid.link/20260304121426.1184680-3-heiko@sntech.de Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2026-07-07clk: rockchip: rk3588: Don't change PLL rates when setting dclk_vop2_srcHeiko Stuebner
dclk_vop2_src currently has the CLK_SET_RATE_PARENT flag set, which is very different from dclk_vop0_src or dclk_vop1_src, which don't have it. With this flag in dclk_vop2_src, actually setting the clock then results in a lot of other peripherals breaking, because setting the rate results in the PLL source getting changed: [ 14.898718] clk_core_set_rate_nolock: setting rate for dclk_vop2 to 152840000 [ 15.155017] clk_change_rate: setting rate for pll_gpll to 1680000000 [ clk adjusting every gpll user ] This includes possibly the other vops, i2s, spdif and even the uarts. Among other possible things, this breaks the uart console on a board I use. Sometimes it recovers later on, but there will be a big block of garbled output for a while at least. Shared PLLs should not be changed by individual users, so drop this flag from dclk_vop2_src. Fixes: f1c506d152ff ("clk: rockchip: add clock controller for the RK3588") Cc: stable@vger.kernel.org Tested-by: Quentin Schulz <quentin.schulz@cherry.de> # RK3588 Tiger w/ DP Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Tested-by: Chris Morgan <macromorgan@hotmail.com> Link: https://patch.msgid.link/20260304121426.1184680-2-heiko@sntech.de Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2026-07-07Merge branch 'devlink-and-mlx5-support-cross-function-rate-scheduling'Paolo Abeni
Tariq Toukan says: ==================== devlink and mlx5: Support cross-function rate scheduling This series by Cosmin adds support for cross-function rate scheduling in devlink and mlx5. See detailed explanation by Cosmin below [0]. [0] devlink objects support rate management for TX scheduling, which involves maintaining a tree of rate nodes that corresponds to TX schedulers in hardware. 'man devlink-rate' has the full details. The tree of rate nodes is maintained per devlink object, protected by the devlink lock. There exists hardware capable of instantiating TX scheduling trees spanning multiple functions of the same physical device (and thus devlink objects) and therefore the current API and locking scheme is insufficient. This patch series changes the devlink rate implementation and API to allow supporting such hardware and managing TX scheduling trees across multiple functions of a physical device. Modeling this requires having devlink rate nodes with parents in other devlink objects. A naive approach that relies on the current one-lock-per-devlink model is impossible, as it would require in some cases acquiring multiple devlink locks in the correct order. The solution proposed in this patch series makes use of the recently introduced shared devlink instance [1] to manage rate hierarchy changes across multiple functions. V1 of this patch series was sent a long time ago [2], using a different approach of storing rates in a shared rate domain with special locking rules. This new approach uses standard devlink instances and nesting. The first part of the series adds support to devlink rates for maintaining the rate tree across multiple functions. The second part changes the mlx5 implementation to make use of this (and cleans up remnants of the previous approach, involving rate domains). The neat part about using the shared devlink object is that it works for SFs as well, which are already nested in their parent PF instances. So with this series, complex scheduling trees spanning multiple SFs across multiple PFs of the same NIC can now be supported. ==================== Link: https://patch.msgid.link/20260701073254.754518-1-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07net/mlx5: Document devlink ratesCosmin Ratiu
It seems rates were not documented in the mlx5-specific file, so add examples on how to limit VFs and groups and also provide an example of the intended way to achieve cross-esw scheduling. Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260701073254.754518-15-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07selftests: drv-net: Add test for cross-esw rate schedulingCosmin Ratiu
Adds a Python selftest using the YNL devlink API to verify the devlink rate ops. The test requires a bond device given in the config as NETIF containing two PFs. Test setup will then create 1 VF on each PF and verify the various rate commands. ./devlink_rate_cross_esw.py TAP version 13 1..3 ok 1 devlink_rate_cross_esw.test_same_esw_parent ok 2 devlink_rate_cross_esw.test_cross_esw_parent ok 3 devlink_rate_cross_esw.test_tx_rates_on_cross_esw Tests will be skipped when the preconditions aren't met, when the devlink API is too old or when the devices don't appear to support cross-esw scheduling (detected via EOPNOTSUPP). Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260701073254.754518-14-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07net/mlx5: qos: Support cross-device tx schedulingCosmin Ratiu
Up to now, rate groups could only contain vports from the same E-Switch. This patch relaxes that restriction if the device supports it (HCA_CAP.esw_cross_esw_sched == true) and the right conditions are met: - Link Aggregation (LAG) is enabled. - The E-Switches are from the same shared devlink device. Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260701073254.754518-13-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07net/mlx5: qos: Remove qos domains and use shdCosmin Ratiu
E-Switch QoS domains were added with the intention of eventually implementing shared qos domains to support cross-esw scheduling in the previous approach ([1]), but they are no longer necessary in the new approach. Remove QoS domains and switch to using the shd lock for protecting against concurrent QoS modifications. Enable the supported_cross_device_rate_nodes devlink ops attribute so that all calls originating from devlink rate acquire the shd lock. Only the additional entry points into QoS need to acquire the shd lock. The wrinkle is that since shd can be NULL (e.g. on older HW without serial number available), there needs to be a fallback locking mechanism. The devlink instance lock cannot be used, as some code paths into QoS (get, set & modify vport rate) happen with RTNL held, and the existing devlink -> RTNL order prevents devlink lock usage there. The other two options are either esw->state_lock or a new lock as fallback when shd is NULL. This patch adds esw->state_lock, which implies: - 3 new lock/unlock helper pairs to acquire/release the missing lock: - esw_qos_{,un}lock: acquire/release esw->state_lock when shd is NULL. - esw_qos_shd_{,un}lock: when esw->state_lock is already held. - esw_qos_devlink_{,un}lock: when shd is already held. - esw_assert_qos_lock_held now asserts esw->state_lock is held when shd is NULL. Use the corresponding lock/unlock function in all places where either shd or state_lock would need to be acquired. Document all of this trickery next to esw_assert_qos_lock_held. Enabling supported_cross_device_rate_nodes now is safe, because mlx5_esw_qos_vport_update_parent rejects cross-esw parent updates. This will change in the next patch. [1] https://lore.kernel.org/netdev/20250213180134.323929-1-tariqt@nvidia.com/ Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260701073254.754518-12-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07net/mlx5: qos: Model the root node in the scheduling hierarchyCosmin Ratiu
In commit [1] the concept of the root node in the qos hierarchy was removed due to a bug with how tx_share worked. The side effect is that in many places, there are now corner cases related to parent handling. However, since that change, support for tc_bw was added and now, with upcoming cross-esw support, the code is about to become even more complicated, increasing the number of such corner cases. Bring back the concept of the root node, to which all esw vports and nodes are connected to. This benefits multiple operations which can assume there's always a valid parent and don't have to do ternary gymnastics to determine the correct esw to talk to. As side effect, there's no longer a need to store the groups in the qos domain, since normalization can simply iterate over all children of the root node. Normalization gets simplified as a result. There should be no functionality changes as a result of this change. [1] commit 330f0f6713a3 ("net/mlx5: Remove default QoS group and attach vports directly to root TSAR") Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260701073254.754518-11-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07net/mlx5: qos: Refactor vport QoS cleanupCosmin Ratiu
Qos cleanup is a complex affair, because of the two modes of operation (legacy and switchdev). Leaf QoS is removed: 1. In legacy mode by esw_vport_cleanup() -> mlx5_esw_qos_vport_disable() 2. In switchdev mode by mlx5_esw_offloads_devlink_port_unregister() -> mlx5_esw_qos_vport_update_parent(). A little later in the same flow, the calls in 1 happen but they are noops. Zooming out a bit, from both mlx5_eswitch_disable_locked() and mlx5_eswitch_disable_sriov() the leaves are destroyed before the nodes, which is the reverse of what should be. For SFs there's no devl_rate_nodes_destroy() call to unparent the affected leaf. Sanitize all of this by: 1. Destroying nodes before leaves in both legacy and switchdev mode. 2. Only removing vport qos from esw_vport_cleanup(), reachable from both legacy and switchdev and also reachable by SF removal. 3. Unexpose mlx5_esw_qos_vport_update_parent(), which becomes internal to qos. 4. Remove the WARN in mlx5_esw_qos_vport_disable(). This also takes care of a theoretical corner case, when mlx5_esw_qos_vport_update_parent() tried to reattach the vport to the original parent on failure, which can fail as well, leaving the vport in a broken state. Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260701073254.754518-10-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07net/mlx5: qos: Use mlx5_lag_query_bond_speed to query LAG speedCosmin Ratiu
Previously, the master device of the uplink netdev was queried for its maximum link speed from the QoS layer, requiring the uplink_netdev mutex and possibly the RTNL (if the call originated from the TC matchall layer). Acquiring these locks here is risky, as lock cycles could form. The locking for the QoS layer is about to change, so to avoid issues, replace the code querying the LAG's max link speed with the existing infrastructure added in commit [1]. This simplifies this part and avoids potential lock cycles. One caveat is that there's a new edge case, when the bond device is not fully formed to represent the LAG device, the speed isn't calculated and is left at 0. This now handled explicitly. [1] commit f0b2fde98065 ("net/mlx5: Add support for querying bond speed") Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260701073254.754518-9-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07devlink: Allow rate node parents from other devlinksCosmin Ratiu
This commit makes use of the building blocks previously added to implement cross-device rate nodes. A new 'supported_cross_device_rate_nodes' bool is added to devlink_ops which lets drivers advertise support for cross-device rate objects. If enabled and if there is a common shared devlink instance, then: - all rate objects will be stored in the top-most common nested instance and - rate objects can have parents from other devices sharing the same common instance. Storing rates in the common shared ancestor is safe, because it is reference counted by its nested devlink instances, so it's guaranteed to outlive them. Furthermore, the shared devlink infra guarantees a given nested devlink hierarchy is managed by the same driver. The parent devlink from info->ctx is not locked, so none of its mutable fields can be used. But parent setting only requires comparing devlink pointer comparisons. Additionally, since the shared devlink is locked, other rate operations cannot concurrently happen. Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260701073254.754518-8-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07devlink: Allow parent dev for rate-set and rate-newCosmin Ratiu
Currently, a devlink rate's parent device is assumed to be the same as the one where the devlink rate is created. This patch changes that to allow rate commands to accept an additional argument that specifies the parent dev. This will allow devlink rate groups with leafs from other devices. Example of the new usage with ynl: Creating a group on pci/0000:08:00.1 with a parent to an already existing pci/0000:08:00.1/group1: ./tools/net/ynl/pyynl/cli.py --spec \ Documentation/netlink/specs/devlink.yaml --do rate-new --json '{ "bus-name": "pci", "dev-name": "0000:08:00.1", "rate-node-name": "group2", "rate-parent-node-name": "group1", "parent-dev": { "bus-name": "pci", "dev-name": "0000:08:00.1" } }' Setting the parent of leaf node pci/0000:08:00.1/65537 to pci/0000:08:00.0/group1: ./tools/net/ynl/pyynl/cli.py --spec \ Documentation/netlink/specs/devlink.yaml --do rate-set --json '{ "bus-name": "pci", "dev-name": "0000:08:00.1", "port-index": 65537, "parent-dev": { "bus-name": "pci", "dev-name": "0000:08:00.0" }, "rate-parent-node-name": "group1" }' Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260701073254.754518-7-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07devlink: Add parent dev to devlink APICosmin Ratiu
Upcoming changes to the rate commands need the parent devlink specified. This change adds a nested 'parent-dev' attribute to the API and helpers to obtain and put a reference to the parent devlink instance in info->ctx. To avoid deadlocks, the parent devlink is unlocked before obtaining the main devlink instance that is the target of the request. A reference to the parent is kept until the end of the request to avoid it suddenly disappearing. This means that this reference is of limited use without additional protection. Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260701073254.754518-6-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07devlink: Decouple rate storage from associated devlink objectCosmin Ratiu
Devlink rate leafs and nodes were stored in their respective devlink objects pointed to by devlink_rate->devlink. This patch removes that association by introducing the concept of 'rate node devlink', which is where all rates that could link to each other are stored. For now this is the same as devlink_rate->devlink. After this patch, the devlink rates stored in this devlink instance could potentially be from multiple other devlink instances. So all rate node manipulation code was updated to: - correctly compare the actual devlink object during iteration. - maybe acquire additional locks (noop for now). Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260701073254.754518-5-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07devlink: Migrate from info->user_ptr to info->ctxCosmin Ratiu
Replace deprecated info->user_ptr[0]/[1] with a typed devlink_nl_ctx struct stored in info->ctx. The struct aliases the same union memory, so the migration is safe. There are no functionality changes here. Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260701073254.754518-4-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07devlink: Add a helper for getting a nested-in instanceCosmin Ratiu
Upcoming code will need to obtain references to locked nested-in devlink instances. Add a helper to lock, reference and return the nested-in instance. Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260701073254.754518-3-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07devlink: Update nested instance locking commentCosmin Ratiu
In commit [1] a comment about nested instance locking was updated. But there's another place where this is mentioned, so update that as well. [1] commit 0061b5199d7c ("devlink: Reverse locking order for nested instances") Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260701073254.754518-2-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07staging: octeon: handle rx/tx initialization failures in probePrashant Rahul
Check return value of rx/tx initialization functions and abort probing if either one fails. Add error handling labels to deallocate resources before returning the error. Signed-off-by: Prashant Rahul <prashantrahul23@gmail.com> Tested-by: Klara Modin <klarasomdin@gmail.com> Link: https://patch.msgid.link/20260702-staging-driver-octeon-panic-v2-4-2c2b6ae086dd@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: octeon: Propagate tx initialization failuresPrashant Rahul
Instead of calling panic(), log and propagate the error upwards for better error handling. Pass platform_device to tx initializer to match the rx initializer interface and to log device specific failures. Signed-off-by: Prashant Rahul <prashantrahul23@gmail.com> Tested-by: Klara Modin <klarasmodin@gmail.com> Tested-by: Klara Modin <klarasomdin@gmail.com> Link: https://patch.msgid.link/20260702-staging-driver-octeon-panic-v2-3-2c2b6ae086dd@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: octeon: Propagate rx initialization failuresPrashant Rahul
Instead of calling panic(), log and propagate the error upwards for better error handling. Signed-off-by: Prashant Rahul <prashantrahul23@gmail.com> Tested-by: Klara Modin <klarasmodin@gmail.com> Tested-by: Klara Modin <klarasomdin@gmail.com> Link: https://patch.msgid.link/20260702-staging-driver-octeon-panic-v2-2-2c2b6ae086dd@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: octeon: factor out device removal into a helperPrashant Rahul
Factor out the common device removal sequence into a helper in preparation for adding cleanup to the probe error path. Signed-off-by: Prashant Rahul <prashantrahul23@gmail.com> Tested-by: Klara Modin <klarasomdin@gmail.com> Link: https://patch.msgid.link/20260702-staging-driver-octeon-panic-v2-1-2c2b6ae086dd@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: octeon: add missing napi_disable in cvm_oct_rx_shutdownAyush Mukkanwar
cvm_oct_rx_shutdown calls free_irq and netif_napi_del without disabling the napi instance first. As the free_irq only waits for completion of hard interrupt handlers, the napi poll function could still be active. If cvm_oct_remove proceeds to free the plat structure (which holds the NAPI instances), the active poll function will access freed memory, resulting in a use-after-free crash. Fixes: 3368c784bcf7 ("Staging: Octeon Ethernet: Convert to NAPI.") Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://sashiko.dev/#/patchset/20260511150931.93382-1-ayushmukkanwar%40gmail.com Signed-off-by: Ayush Mukkanwar <ayushmukkanwar@gmail.com> Link: https://patch.msgid.link/20260615172734.42038-2-ayushmukkanwar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: octeon: add missing tasklet_kill in cvm_oct_tx_shutdownAyush Mukkanwar
The TX cleanup tasklet can be scheduled by the watchdog IRQ handler to execute cvm_oct_tx_do_cleanup. There can be a pending tasklet in the queue which might run after the cvm_oct_remove() frees net_device structures, causing a use-after-free in cvm_oct_tx_do_cleanup() as it iterates cvm_oct_device[] which is an array of netdevice pointers. Add tasklet_kill() after free_irq() to ensure the tasklet is no longer scheduled or running before teardown proceeds. Fixes: 4898c560103f ("Staging: Octeon: Free transmit SKBs in a timely manner") Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://sashiko.dev/#/patchset/20260511150931.93382-1-ayushmukkanwar%40gmail.com Signed-off-by: Ayush Mukkanwar <ayushmukkanwar@gmail.com> Link: https://patch.msgid.link/20260615172734.42038-1-ayushmukkanwar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: nvec: remove extra space in enum declarationDorian Catric
Remove extra space in 'enum nvec_msg_category {' declaration. Signed-off-by: Dorian Catric <dorian.catric@gmail.com> Link: https://patch.msgid.link/20260603172719.398-2-dorian.catric@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: nvec: fix typo in copyright header URLDorian Catric
Fix typo 'lauchpad.net' -> 'launchpad.net' in the copyright header. The correct spelling is already used in nvec.h. Signed-off-by: Dorian Catric <dorian.catric@gmail.com> Link: https://patch.msgid.link/20260603172719.398-1-dorian.catric@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: fbtft: fix typo in comment in fb_upd161704.cTomasz Unger
Fix spelling mistake found by codespell: "cencter" -> "center". Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Link: https://patch.msgid.link/20260611-upd161704-typo-v1-1-2e51387c3b28@yahoo.pl Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: fbtft: Use sysfs_emit_at() to print to sysfs fileDan Carpenter
This scnprintf() uses the wrong limit. It should be "PAGE_SIZE - len" instead of just PAGE_SIZE. We're not going to hit the limit in real life since we are printing at most FBTFT_GAMMA_MAX_VALUES_TOTAL (128) u32 values, however, it's still worth fixing. Use sysfs_emit_at() to fix this since this is a sysfs file. Fixes: c296d5f9957c ("staging: fbtft: core support") Signed-off-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Link: https://patch.msgid.link/ah_Y_Y2RtqeGxchF@stanley.mountain Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: greybus: hid: fix SET_REPORT return valueHao-Qun Huang
__gb_hid_output_raw_report() stores the result of gb_hid_set_report() in ret and even adjusts it to account for the report ID byte, but then always returns 0. This hides Greybus transport errors from HID_REQ_SET_REPORT callers, and makes hidraw report zero bytes written to user space on success, although hid_hw_raw_request() is expected to return the number of bytes transferred or a negative errno. The sibling GET_REPORT path, __gb_hid_get_raw_report(), already follows this convention. Return ret like the other HID transport drivers do. Fixes: 96eab779e198 ("greybus: hid: add HID class driver") Cc: stable@vger.kernel.org Assisted-by: Claude:claude-fable-5 Signed-off-by: Hao-Qun Huang <alvinhuang0603@gmail.com> Link: https://patch.msgid.link/20260704081613.434445-1-alvinhuang0603@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: sm750fb: rename pvReg to mmioJad Keskes
Rename the Hungarian-notation pvReg field to mmio, which describes what it is (memory-mapped I/O) rather than what type it is (pointer to void). This is a purely mechanical change with no functional difference. Signed-off-by: Jad Keskes <inasj268@gmail.com> Link: https://patch.msgid.link/20260619091332.622116-1-inasj268@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: greybus: vibrator: return device_create() errorsAlfie Varghese
gb_vibrator_probe() maps any device_create() failure to -EINVAL. This loses the real errno returned by the driver core, such as -ENOMEM, and makes probe failures harder to diagnose correctly. Return PTR_ERR(dev) instead so callers receive the actual failure reason while preserving the existing cleanup path. Signed-off-by: Alfie Varghese <alfievarghese22@gmail.com> Link: https://patch.msgid.link/20260618113439.569-1-alfievarghese22@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: greybus: power_supply: remove unnecessary parentheses in returnTomasz Unger
return is not a function, so the parentheses around the returned expressions are not needed. Remove them to follow kernel coding style and silence checkpatch.pl RETURN_PARENTHESES warnings. Verified with checkpatch.pl - no errors or warnings. Compiled the power_supply object successfully. Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl> Acked-by: Rui Miguel Silva <rui.silva@linaro.org> Link: https://patch.msgid.link/20260615-greybus-power-supply-return-parens-v1-1-dcad9dabfe79@yahoo.pl Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07greybus: audio: bound the topology section sizes against the fetched sizeBryam Vargas
gb_audio_gb_get_topology() fetches a topology blob of a module-supplied size, and gbaudio_tplg_parse_data() then walks it by adding the module-supplied size_dais, size_controls and size_widgets fields to form the control, widget and route section offsets. Those le32 sizes are never checked against the fetched blob, so a module reporting a small topology size but large section sizes makes the offsets point past the allocation, and parsing reads out of bounds. Reject a topology whose section sizes do not fit within the fetched size before it is parsed. Fixes: 184992e305f1 ("greybus: audio: Add Greybus Audio Device Class Protocol helper routines") Signed-off-by: Bryam Vargas <hexlabsecurity@proton.me> Link: https://patch.msgid.link/20260616-b4-disp-4352e8b0-v1-1-3e09f62e0ad5@proton.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: greybus: Remove unused macroMichail Tatas
Remove unused macro as indicated by the compiler when building with make W=2 Signed-off-by: Michail Tatas <michail.tatas@gmail.com> Link: https://patch.msgid.link/ahdNZlYqnTO22tQq@michalis-linux Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: greybus: audio_codec: remove redundant else-if checkAbdelnasser Hussein
In gbaudio_module_update(), the widget id is validated earlier in the function to ensure it is either snd_soc_dapm_aif_in or snd_soc_dapm_aif_out. Remove the redundant else-if check for snd_soc_dapm_aif_out. The remaining branch can only handle snd_soc_dapm_aif_out, which avoids a compiler warning about a potentially uninitialized variable. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202606140347.gGVWDnbi-lkp@intel.com/ Signed-off-by: Abdelnasser Hussein <abdelnasserhussein11@gmail.com> Link: https://patch.msgid.link/20260614154329.5176-3-abdelnasserhussein11@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: greybus: audio_codec: fix sscanf return value checkAbdelnasser Hussein
Smatch static checker warns: drivers/staging/greybus/audio_codec.c:335 gbaudio_module_update() warn: sscanf doesn't return error codes The sscanf() function returns the number of successfully matched input items, not a negative error code. Compare the return value directly with the expected number of conversions (3) instead of storing it in 'ret' and returning it as an error code, which leads to returning a positive value on failure. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Closes: https://lore.kernel.org/all/YoOLnDkHgVltyXK7@kili/ Signed-off-by: Abdelnasser Hussein <abdelnasserhussein11@gmail.com> Link: https://patch.msgid.link/20260614154329.5176-2-abdelnasserhussein11@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: greybus: remove unused macro CAP_TIMEOUT_MSRhys Tumelty
The macro CAP_TIMEOUT_MS is defined but never used anywhere in the kernel tree. Remove it to clean up code. Signed-off-by: Rhys Tumelty <rhys@tumelty.co.uk> Reviewed-by: Alex Elder <elder@riscstar.com> Link: https://patch.msgid.link/20260610173026.1105803-1-rhys@tumelty.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: sm750fb: Add missing Kconfig dependencyRong Zhang
The sm750 frame buffer driver depends on FB_IOMEM_FOPS, but its Kconfig somehow misses it. Fix it by making FB_SM750 select FB_IOMEM_FOPS, as other frame buffer drivers do. Fixes: dc0ad215e5d8 ("staging/sm750fb: Initialize fb_ops with fbdev macros") Signed-off-by: Rong Zhang <i@rong.moe> Link: https://patch.msgid.link/20260603-sm750-fb-iomem-kconfig-v1-1-7f6a3046cce2@rong.moe Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: sm750fb: remove duplicate init_status structureHungyu Lin
struct init_status duplicates struct initchip_param and is only used within the sm750fb driver. Replace the remaining users of struct init_status with struct initchip_param, remove the duplicate structure and eliminate the unnecessary cast in hw_sm750_inithw(). No functional change intended. Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Link: https://patch.msgid.link/20260530222432.4303-1-dennylin0707@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>