summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2026-07-07staging: rtl8723bs: core: avoid NULL pointer dereference in c2h_wk_callbackNikoloz Bakuradze
kmalloc(16, GFP_ATOMIC) in c2h_wk_callback() could in theory return2 NULL, which would then be dereferenced in rtw_hal_c2h_valid(). A 16-byte allocation effectively cannot fail in practice, but add an else continue; to the guard so the failure path exits the iteration cleanly to make the code more robust. Signed-off-by: Nikoloz Bakuradze <nbakuradze28@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Link: https://patch.msgid.link/20260610164755.49626-1-nbakuradze28@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: Drop unused parameter from rtw_sdio_if1_init()Uwe Kleine-König
The function doesn't use the pdid parameter, so drop that and adapt the only caller accordingly. Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org> Link: https://patch.msgid.link/23949de4c5f10e78a4bd85e333d7acd47b2f66b7.1781109707.git.ukleinek@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723: remove multiple blank lines in rtw_security.cAndrea Frasson
Remove unnecessary multiple blank lines. Fix 5 checkpatch.pl checks in rtw_security.c of the type: - CHECK: Please don't use multiple blank lines Signed-off-by: Andrea Frasson <andreafrasson1995@gmail.com> Reviewed-by: Ethan Tidmore <ethantidmore06@gmail.com> Link: https://patch.msgid.link/aiRL4dekV140SPGw@frassi Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: add braces to resolve checkpatchDalvin-Ehinoma Noah Aiguobas
Resolved checkpatch finding by adding braces as shown in styleguide. Signed-off-by: Dalvin-Ehinoma Noah Aiguobas <fliegbert2@gmail.com> Link: https://patch.msgid.link/aiG4aDh2czwJ2-bf@koolguy Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: remove unnecessary parenthesesEugene Mavick
Remove unnecessary parantheses around &(foo->bar) type statements to improve code readability Signed-off-by: Eugene Mavick <m@mavick.dev> Link: https://patch.msgid.link/20260604095617.852425-1-m@mavick.dev Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: remove unused network_type_in_use fieldCong Nguyen
The network_type_in_use member of struct wlan_bssid_ex is write-only: nothing in the driver ever reads it. It is assigned in three places, none of which feed anything: - collect_bss_info() hard-codes it to Ndis802_11OFDM24 for every parsed beacon/probe response, regardless of the network's actual band or rates (it is even wrong for 5 GHz APs, which the same function explicitly handles). - rtw_check_beacon_data() and rtw_update_registrypriv_dev_network() derive it from the wireless mode via a switch, but the result is likewise never consumed. The live PHY classification the driver actually acts on is kept in wlan_network.network_type (the WIRELESS_11x value), so this NDIS-era field is redundant. struct wlan_bssid_ex is an internal structure passed by pointer through the driver command queue; it is never serialized to firmware or onto the air (the wire data lives in ies[]), so dropping a member is layout-safe as long as the module is rebuilt as a whole. enum ndis_802_11_network_type existed only to type this field, so remove it as well. No functional change. Signed-off-by: Cong Nguyen <congnt264@gmail.com> Link: https://patch.msgid.link/20260603122806.1330145-1-congnt264@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07net: usb: lan78xx: disable VLAN filter in promiscuous modeEnrico Pozzobon
The hardware VLAN filter (RFE_CTL_VLAN_FILTER_) drops VLAN-tagged frames whose VID has not been registered via lan78xx_vlan_rx_add_vid(). It is left enabled in promiscuous mode, so packet capture (e.g. tcpdump or Wireshark) does not see tagged frames for unregistered VIDs. Clear the filter while the interface is promiscuous and restore it from NETIF_F_HW_VLAN_CTAG_FILTER otherwise. Enforce the same condition in lan78xx_set_features() so netdev_update_features() cannot re-enable the filter while promiscuous. Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Signed-off-by: Enrico Pozzobon <enrico.pozzobon@dissecto.com> Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de> Link: https://patch.msgid.link/20260701-lan78xx-vlan-promisc-v3-1-232266d32743@dissecto.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07staging: rtl8723bs: remove unused 'oui' parameter from update_beacon()Nikolay Kulikov
After deleting one of the switch-case branches, this parameter became unused, so remove it. Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Link: https://patch.msgid.link/20260601150253.69930-3-nikolayof23@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: remove unused case from update_beacon()Nikolay Kulikov
The update_beacon() function is never called with 'ie_id' equal to 'WLAN_EID_VENDOR_SPECIFIC', meaning this case branch will never be called, so remove it and several related functions. Removing this case branch also fixes a possible null pointer dereference in update_bcn_vendor_spec() if 'oui' is NULL, since its value is not checked in any way. Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Link: https://patch.msgid.link/20260601150253.69930-2-nikolayof23@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: fix alignmentEugene Mavick
Fix alignment to improve code readability and clear checkpatch warning: CHECK: Alignment should match open parenthesis Signed-off-by: Eugene Mavick <mavick4022@gmail.com> Link: https://patch.msgid.link/20260601093757.612130-3-mavick4022@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: use nl80211_iftype instead of custom NDIS enumCong Nguyen
The driver defined its own enum ndis_802_11_network_infrastructure to represent the operating mode (STA/AP/IBSS) and translated nl80211 iftypes into it in cfg80211_rtw_change_iface(). The kernel already provides enum nl80211_iftype for this purpose, so use it directly and drop the redundant translation layer. Map the removed values as follows: Ndis802_11IBSS -> NL80211_IFTYPE_ADHOC Ndis802_11Infrastructure -> NL80211_IFTYPE_STATION Ndis802_11APMode -> NL80211_IFTYPE_AP Ndis802_11AutoUnknown -> NL80211_IFTYPE_UNSPECIFIED Compile-tested only. Signed-off-by: Cong Nguyen <congnt264@gmail.com> Link: https://patch.msgid.link/20260707104836.3176765-1-congnt264@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07Merge tag 'sfc-net-pullrequest-20260630' of ↵Paolo Abeni
git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Lucero Palau, Alejandro says: ==================== pull request: sfc 2026-07-01 here are the last CXL core changes for enabling CXL Type2 drivers to initialize a CXL-capable device plus the netdev sfc driver changes using this new CXL core Type2 support. Please pull or let me know of any problem! SFC changes for CXL type2 enabling * tag 'sfc-net-pullrequest-20260630' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: sfc: support pio mapping based on cxl sfc: obtain and map cxl range using devm_cxl_probe_mem sfc: Initialize cxl dpa sfc: Map cxl regs sfc: add cxl support cxl: Support dpa without a mailbox cxl: Support Type2 cxl regs mapping ==================== Link: https://patch.msgid.link/20260701113805.14072-1-alejandro.lucero-palau@amd.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07staging: rtl8723bs: Rename camelcase variable dot11AuthAlgrthmDalvin-Ehinoma Noah Aiguobas
Rename variable dot11AuthAlgrthm to dot11_auth_algrthm in struct security_priv to resolve checkpatch.pl CamelCase finding. Signed-off-by: Dalvin-Ehinoma Noah Aiguobas <fliegbert2@gmail.com> Link: https://patch.msgid.link/ahwHbMecWpijQBv9@koolguy Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: remove unused field 'bAPKThermalMeterIgnore'Nikolay Kulikov
This field is set to 'true' once and is never used again. Remove it to eliminate dead code. Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com> Link: https://patch.msgid.link/20260531080015.74870-1-nikolayof23@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: hal: Fix space before tab in rtl8723b_dm.cPraveen Jayaprakash Pattar
Remove tab characters that appeared after '/*' in two comment lines, which caused 'please, no space before tabs' warnings. Replace the space+tab combination with a single space after the comment opener. Detected by checkpatch.pl with --strict flag. Signed-off-by: Praveen Jayaprakash Pattar <praveen.pattar2022@gmail.com> Link: https://patch.msgid.link/20260531045511.5774-1-praveen.pattar2022@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: hal: Fix indentation in odm_EdcaTurboCheck.cPraveen Jayaprakash Pattar
Fix incorrect indentation of an if statement inside an else block. The statement had a space before it instead of proper tab alignment, causing checkpatch.pl to report 'suspect code indent' and 'statements should start on a tabstop' warnings. Detected by checkpatch.pl with --strict flag. Signed-off-by: Praveen Jayaprakash Pattar <praveen.pattar2022@gmail.com> Link: https://patch.msgid.link/20260531040420.5426-1-praveen.pattar2022@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: fix spelling mistake found by codespellTomasz Unger
Corrected typo in comment: - varable -> variable Found by codespell. Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl> Link: https://patch.msgid.link/20260528-fix-typo-rtw-mlme-v1-1-2172d3227b00@yahoo.pl Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: fix spelling mistake in rtw_recv.cTomasz Unger
Fix typo 'temporily' -> 'temporarily' in comments. Found by codespell. Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl> Link: https://patch.msgid.link/20260527-staging-fix-1-v1-1-66ad880bcf76@yahoo.pl Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: fix spelling mistakes found by codespellTomasz Unger
Corrected typos in comments: - contrl -> control - Redifine -> Redefine - pauload -> payload Found by codespell. Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl> Link: https://patch.msgid.link/20260526-fix-typos-hal-com-reg-v1-1-9deb54e6e2e8@yahoo.pl Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: fix spelling mistake found by codespellTomasz Unger
Corrected typo: FASLE -> FALSE in comment Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl> Link: https://patch.msgid.link/20260526-fix-typo-odm-dig-v1-1-4392b0c03e13@yahoo.pl Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: remove empty loop and stale comment in HalPhyRf.cIgor Putko
The 'for' loop in ODM_TXPowerTrackingCallback_ThermalMeter performs no operations and just iterates over the path count. This is unnecessary code. Also, remove the associated "Print Swing base & current" comment, as it no longer refers to any active code. Signed-off-by: Igor Putko <igorpetindev@gmail.com> Link: https://patch.msgid.link/20260525121004.4989-1-igorpetindev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: rename camelcase variable nSubframe_LengthAnirban Bose
Rename the variable 'nSubframe_Length' to 'subframe_len' in amsdu_to_msdu() and rtw_alloc_msdu_pkt() to resolve a checkpatch.pl CamelCase warning. Signed-off-by: Anirban Bose <boses156@gmail.com> Link: https://patch.msgid.link/20260525074419.144884-1-boses156@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: hal: Fix block comment style in HalPwrSeqCmd.cPraveen Jayaprakash Pattar
Fix non-standard block comment format. The comment was using '/*++' and '--*/' delimiters instead of the standard '/*' and '*/' used in kernel coding style. Also fix missing '*' prefix on subsequent lines and remove space before tab characters. Detected by checkpatch.pl with --strict flag. Signed-off-by: Praveen Jayaprakash Pattar <praveen.pattar2022@gmail.com> Link: https://patch.msgid.link/20260524152506.5670-1-praveen.pattar2022@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: remove unnecessary braces in odm_HWConfig.cAtharv Margur
Remove unnecessary braces around a single statement block 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/20260524111736.14477-1-atharvmargur@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: fix unnamed parameters warning detected at checkpatchRodrigo Gobbi
Detected the following WARNING: function definition argument 'struct adapter *' should also have an identifier name. Add explicit names on those definitions. Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com> Link: https://patch.msgid.link/20260609221200.123422-1-rodrigo.gobbi.7@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: fix inconsistent braces in hal/sdio_halinit.cArtur Ugnivenko
Fix checkpatch warnings on inconsistent braces around if/else statements in hal/sdio_halinit.c Signed-off-by: Artur Ugnivenko <artur.ugnivenko@gmx.de> Reviewed-by: Dan Carpenter <error27@gmail.com> Link: https://patch.msgid.link/20260528170645.30861-3-artur.ugnivenko@gmx.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: shorten long lines in hal/sdio_halinit.cArtur Ugnivenko
Fix checkpatch warnings on lines above 100 chars in length by splitting long function calls and long comments into multiple lines. Signed-off-by: Artur Ugnivenko <artur.ugnivenko@gmx.de> Reviewed-by: Dan Carpenter <error27@gmail.com> Link: https://patch.msgid.link/20260528170645.30861-2-artur.ugnivenko@gmx.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: fix mismatched free of HalData in rtw_sdio_if1_init()Dawei Feng
padapter->HalData is allocated via vzalloc(), but incorrectly freed using kfree() in the rtw_sdio_if1_init() error path. Using kfree() to release this vmalloc-backed buffer can lead to memory corruption. Use rtw_hal_data_deinit() to pair the free correctly and free HalData with vfree(). The bug was first flagged by an experimental static analysis tool we are developing for kernel memory-management bugs. Manual inspection confirms that the issue is still present in current mainline. An x86_64 allyesconfig build showed no new warnings. As we do not have suitable RTL8723BS SDIO hardware to test with, no runtime testing was able to be performed. Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Signed-off-by: Zilin Guan <zilin@seu.edu.cn> Signed-off-by: Dawei Feng <dawei.feng@seu.edu.cn> Reviewed-by: Dan Carpenter <error27@gmail.com> Link: https://patch.msgid.link/20260525091836.812565-1-dawei.feng@seu.edu.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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-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-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>