]> git.ipfire.org Git - thirdparty/kernel/linux.git/log
thirdparty/kernel/linux.git
3 weeks agowifi: iwlwifi: mld: stop supporting rate_n_flags version 2
Miri Korenblit [Tue, 12 May 2026 05:23:07 +0000 (08:23 +0300)] 
wifi: iwlwifi: mld: stop supporting rate_n_flags version 2

Now as the oldest fw we support is core 101, and it supports only
version 3, remove version 2.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260512082114.39e460bc8235.I4cd02612a68a3f183d51f428569448670bd19d9b@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: stop supporting TLC_MNG_UPDATE_NTFY_API_S_VER_3
Miri Korenblit [Tue, 12 May 2026 05:23:06 +0000 (08:23 +0300)] 
wifi: iwlwifi: mld: stop supporting TLC_MNG_UPDATE_NTFY_API_S_VER_3

The oldest core iwlmld support is 101, which has version 4. Remove
version 3

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260512082114.36dac3f3589c.I8aee18f323c5f3bbcc02dfc2e0c08be6b8943986@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: stop supporting MAC_PM_POWER_TABLE version 1
Miri Korenblit [Tue, 12 May 2026 05:23:05 +0000 (08:23 +0300)] 
wifi: iwlwifi: mld: stop supporting MAC_PM_POWER_TABLE version 1

The oldest core that iwmld loads is now 101, which supports version 2,
so remove version 1.
This allows to remove the smps workaround.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260512082114.e42cff396ea8.I9175bf4aaba0c846fbea54c9bede4d18ad1c252b@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: stop supporting iwl_compressed_ba_notif version 5 and 6
Miri Korenblit [Tue, 12 May 2026 05:23:04 +0000 (08:23 +0300)] 
wifi: iwlwifi: mld: stop supporting iwl_compressed_ba_notif version 5 and 6

The oldest core that devices that load iwlmld op mode are supporting is core 101.
Core 101 has version 7 of iwl_compressed_ba_notif, so earlier versions
are no longer needed.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260512082114.59e41f7e1e43.I13572fed4393935c31fbe5c565be9f385bc0da30@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: stop supporting cores 97 to 100
Miri Korenblit [Tue, 12 May 2026 05:23:03 +0000 (08:23 +0300)] 
wifi: iwlwifi: stop supporting cores 97 to 100

Remove support from cores 97 to 100, including.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260512082114.3dc9251c69ef.Icc027dc533f06ac007abfa0356774948ffdfaf3d@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mark that we support iwl_rx_mpdu_desc version 7 and 8
Miri Korenblit [Tue, 12 May 2026 05:23:02 +0000 (08:23 +0300)] 
wifi: iwlwifi: mark that we support iwl_rx_mpdu_desc version 7 and 8

Mark the driver struct as matching RX_MPDU_RES_START_API_S_VER_7 and
RX_MPDU_RES_START_API_S_VER_8

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260512082114.3604e2111b27.I1f44475b56e084ee4aaeaed11b8a4fe2d27bed0c@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: support a TLV indicating num of mgmt mcast keys
Miri Korenblit [Tue, 12 May 2026 05:23:01 +0000 (08:23 +0300)] 
wifi: iwlwifi: support a TLV indicating num of mgmt mcast keys

FW has a limitation of how many multicast management keys it supports.
Until today we just assumed this limitation. But now as it is changing,
due to NAN, we need a clear indication from the FW so we know how many
we can install.

Read and store this indication from the FW's TLV.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260512082114.f171962abd2e.Ic678616c7d574de257e5923d56258043a5261674@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: print FSEQ sha1 in addition to version
Johannes Berg [Tue, 12 May 2026 05:23:00 +0000 (08:23 +0300)] 
wifi: iwlwifi: print FSEQ sha1 in addition to version

The version isn't all that useful, however the sha1 will
identify the exact source. Print that as well.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260512082114.7239e0b90611.I2a833b0354c5512189e74d3a296c55546444a360@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: remove nvm_ver for devices that don't need it
Emmanuel Grumbach [Tue, 12 May 2026 05:22:59 +0000 (08:22 +0300)] 
wifi: iwlwifi: remove nvm_ver for devices that don't need it

This was needed only to check the NVM for devices that had a specific
firmware image to run the initial calibrations.
Remove this field from newer devices that no longer have a specific
image for those.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260512082114.261b04a1b8f2.I5834a3efd0ae7e601a02cc0582287ced405a0aef@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: advertise UHR capabilities for such devices
Johannes Berg [Tue, 12 May 2026 05:22:58 +0000 (08:22 +0300)] 
wifi: iwlwifi: advertise UHR capabilities for such devices

Advertise UHR capabilities for devices supporting UHR
(i.e. devices with some, but not all, PE RFs.)

For correct support it's also needed to plumb through
the regulatory flags the firmware might have/enforce.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260512082114.ef9ebeb41889.I85b67f4973752bcf62416dabb943b9ddf1e63f16@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: support the new statistics APIs
Emmanuel Grumbach [Tue, 12 May 2026 05:22:56 +0000 (08:22 +0300)] 
wifi: iwlwifi: mld: support the new statistics APIs

This new API adds information about Coexistence.
It changes the layout of the notification, adapt the code accordingly.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20260512082114.04ccf0f3f2c6.Iaff5ac57a53fe62ea7c1313bc57a81b23b1e2fdf@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: introduce iwl_system_statistics_notif_oper version 4
Emmanuel Grumbach [Tue, 12 May 2026 05:22:55 +0000 (08:22 +0300)] 
wifi: iwlwifi: introduce iwl_system_statistics_notif_oper version 4

This new version includes Coex related statistics

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20260512082114.705fbeeb28d1.I4804d029fa76cfb8267f8c6bcac1ed237a8b3497@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: rename iwl_system_statistics_notif_oper
Emmanuel Grumbach [Tue, 12 May 2026 05:22:54 +0000 (08:22 +0300)] 
wifi: iwlwifi: rename iwl_system_statistics_notif_oper

rename iwl_system_statistics_notif_oper to
iwl_system_statistics_notif_oper_v3 since v4 is on the way.
Same for iwl_stats_ntfy_per_phy, since v2 is on the way.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20260512082114.2c3b55b1cae7.Ic982845bfe08c7c9ea16c267570e3e3856de84b8@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: pcie: fix ACPI DSM check
Johannes Berg [Tue, 12 May 2026 05:22:53 +0000 (08:22 +0300)] 
wifi: iwlwifi: pcie: fix ACPI DSM check

The acpi_check_dsm() function expects a bitmap of function
IDs to check for, not a single value. Evidently, on many
platforms function 1 exists so checking for 2 succeeded,
but it's wrong, we need to check correctly for function 2.
Fix that.

Reported-by: Jeremy Compostella <jeremy.compostella@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260512082114.81c4022ae602.Id3f575944ee6b87634cfb976d7334eac227d18a6@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: fix buffer overflow when firmware reports no channels
Avinash Bhatt [Mon, 11 May 2026 17:36:31 +0000 (20:36 +0300)] 
wifi: iwlwifi: fix buffer overflow when firmware reports no channels

On parsing NVM in setting country code, if firmware reports 0 channels,
buffer is allocated for 0 rules but a dummy rule is added for cfg80211
compatibility, causing kmemdup() to read 128 bytes from a 32-byte buffer.

Allocate regd buffer for one rule addition when reported
channels are 0.

Signed-off-by: Avinash Bhatt <avinash.bhatt@intel.com>
Link: https://patch.msgid.link/20260511203428.e03cd831bc96.I8260d881eebe3e83d3208959b525c51af26414e6@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: fw: api: add/fix some UHR sniffer definitions
Johannes Berg [Mon, 11 May 2026 17:36:30 +0000 (20:36 +0300)] 
wifi: iwlwifi: fw: api: add/fix some UHR sniffer definitions

Add some remaining definitions for the UHR sniffer API, and fix
the ELR where instead of usig_a2_uhr we'll get usig_a2_uhr_elr.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260511203428.458cd2ff6623.Ia76e0371adac431b6a5fb93004640278d8572f09@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: fw: api: fix UHR U-SIG whitespace
Johannes Berg [Mon, 11 May 2026 17:36:29 +0000 (20:36 +0300)] 
wifi: iwlwifi: fw: api: fix UHR U-SIG whitespace

Somehow I put tabs there where it should be spaces, fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260511203428.f960f56f6734.I1f925625e606fbc96e8401ac3c5667671065bbe1@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: api: RX: define UHR RX PHY flags
Johannes Berg [Mon, 11 May 2026 17:36:28 +0000 (20:36 +0300)] 
wifi: iwlwifi: api: RX: define UHR RX PHY flags

Define a couple of UHR PHY flags in the metadata that carry
information about 2x LDPC, UEQM and NPCA.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260511203428.cfca1a7d40cf.I32b51dc6eae98787533c64ccf2a73789409dfcb9@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: don't report bad STA ID in EHT TB sniffer
Johannes Berg [Mon, 11 May 2026 17:36:27 +0000 (20:36 +0300)] 
wifi: iwlwifi: mld: don't report bad STA ID in EHT TB sniffer

The field being reported here is part of the EHT union, and not
valid in EHT TB. Don't report it there. We could probably report
the station ID we're following, but for now just don't, since it
appears nobody really cared.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260511203428.b23984f12a46.Ia25014392129d5815facaacec78ea8ba7f35d9a0@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: track TX/RX IGTKs separately
Johannes Berg [Mon, 11 May 2026 17:36:26 +0000 (20:36 +0300)] 
wifi: iwlwifi: mld: track TX/RX IGTKs separately

Due to FW/HW limitations and the MME being at the end of the
frame, the devices only support a single IGTK for RX. For TX
multiple aren't needed, only the latest will be used, but in
the device there are space restrictions, so we can also only
install one.

For NAN, however, we will have one for RX for each peer, and
one for ourselves to transmit with.

Separate out the tracking of IGTK: instead of being per link
make the TX ones per link and the RX ones per (link) station.

Note that we currently hardcode that the FW can only have two
(IWL_MAX_NUM_IGTKS) IGTKs, which won't be sufficient for NAN
with security, concurrently with BSS.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260511203428.8fa6859b185d.I584e8b9d238f0b9ef6b65f95114c255209d1c2a3@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: allow NAN data
Miri Korenblit [Mon, 11 May 2026 17:36:25 +0000 (20:36 +0300)] 
wifi: iwlwifi: mld: allow NAN data

Allow NAN_DATA interfaces when FW supports it.

Link: https://patch.msgid.link/20260511203428.c47453e9329a.I4a250a0df0ca0d184eb6ac84a4a9fcc3491e9e66@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: add TLC support for NAN stations
Johannes Berg [Mon, 11 May 2026 17:36:24 +0000 (20:36 +0300)] 
wifi: iwlwifi: mld: add TLC support for NAN stations

In order to support NAN, TLC now has a station bitmap. Use this
and update TLC for the NAN stations accordingly whenever links
(and thus PHYs) change, and whenever else mac80211 might update
the rate scale information.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Co-developed-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260511203428.ea4112d28331.Ie11049c12a4765a97f3e6dfd1ea4afb265c93817@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: clean up station handling in key APIs
Johannes Berg [Mon, 11 May 2026 17:36:23 +0000 (20:36 +0300)] 
wifi: iwlwifi: mld: clean up station handling in key APIs

The internal key APIs, when called with group keys where mac80211
doesn't pass the (AP) station pointer, are still sometimes called
with the AP station pointer on internal calls. This is confusing.
Clean it up and always call them with the AP STA when it exists,
even when coming in from mac80211, by looking it up immediately.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260511203428.0efcbac3e96e.I5b78af51df283d452fc4f1366b04b4769f60f24e@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: add XIAOMI to PPAG approved list
Pagadala Yesu Anjaneyulu [Mon, 11 May 2026 17:36:22 +0000 (20:36 +0300)] 
wifi: iwlwifi: add XIAOMI to PPAG approved list

Add XIAOMI to the list of the OEMs that are allowed to use
the PPAG feature

Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Link: https://patch.msgid.link/20260511203428.a6f01de83902.I9d5b5122d71ba872974f9e506e033dcb457d80a2@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: move iwl_mld_link_info_changed_ap_ibss to ap.c
Emmanuel Grumbach [Mon, 11 May 2026 17:36:21 +0000 (20:36 +0300)] 
wifi: iwlwifi: mld: move iwl_mld_link_info_changed_ap_ibss to ap.c

This function is ap mode related, move it to ap.c.
Also, don't call iwl_mld_ftm_responder_clear from stop_ap() since
mac80211 does it now before stopping the AP.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20260511203428.83ea430fbd74.I5ac85373c250b684cb46978d9e6bd42ba0e88171@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: honor BSS_CHANGED_BEACON_ENABLED
Emmanuel Grumbach [Mon, 11 May 2026 17:36:20 +0000 (20:36 +0300)] 
wifi: iwlwifi: mld: honor BSS_CHANGED_BEACON_ENABLED

We should stick to mac80211's flow to start / stop beaconing. This
allows to stop beaconing before we remove the BIGTK.

Note that the start and stop beaconing flows are not exactly symmetric.
When we start beaconing, we just update the beacon template. We assume
that mac80211 won't update the beacons, if we're not supposed to be
sending it.

Also note that we now send the beacon template after the broadcast
station was added to the firmware: the broadcast station is added in
the start_ap() flow, while the beacon template is now added in the
link_changed() flow which happens later. This is not what we did
before this patch, but this sequence is supported by the firmware as
well.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20260511203428.cf10e5754171.I8022517c6c5aedb4b56fba30a5545de8f62dddbe@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: fix the access to CNVR TOP registers
Emmanuel Grumbach [Mon, 11 May 2026 17:36:19 +0000 (20:36 +0300)] 
wifi: iwlwifi: fix the access to CNVR TOP registers

For Dr and Sc, we need to wait until the TOP is ready to gets its
registers read by the host.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Daniel Gabay <daniel.gabay@intel.com>
Link: https://patch.msgid.link/20260511203428.09778340db51.I28d678ad404bbf8068f139666d38e29be5aa063b@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: bump core version for BZ/SC/DR to 103
Miri Korenblit [Mon, 11 May 2026 17:36:18 +0000 (20:36 +0300)] 
wifi: iwlwifi: bump core version for BZ/SC/DR to 103

Start supporting Core 103 FW on these devices.

Link: https://patch.msgid.link/20260511203428.663b92bb5637.Iae934894dcdfc2e75e305584c57bcb8642804614@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: add RF name handling for PE chip type for debugfs
Pagadala Yesu Anjaneyulu [Mon, 11 May 2026 17:36:17 +0000 (20:36 +0300)] 
wifi: iwlwifi: add RF name handling for PE chip type for debugfs

Implement RF name handling for PE chip type in debugfs,
including special case handling to show PETC when the
silicon is in Z step.

Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Link: https://patch.msgid.link/20260511203428.f49fbbe61925.I7e001558e66eb2c6c5081be7c21defe6a81aa265@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: don't allow softAP with NAN
Miri Korenblit [Sun, 10 May 2026 20:48:40 +0000 (23:48 +0300)] 
wifi: iwlwifi: mld: don't allow softAP with NAN

SoftAP in concurrency with NAN is not supported. Update the interface
combinations accordingly.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260510234534.fafa2298ffc5.I3cd256f3075d6e93b1fd9afc905af0a6a633ed4b@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: fix NAN max channel switch time unit
Israel Kozitz [Sun, 10 May 2026 20:48:39 +0000 (23:48 +0300)] 
wifi: iwlwifi: mld: fix NAN max channel switch time unit

The max_channel_switch_time in wiphy_nan_capa is in microseconds, but
the value was set to 4, which is only 4 microseconds instead of the
intended 4 milliseconds.

Fix by using 4 * USEC_PER_MSEC.

Signed-off-by: Israel Kozitz <israel.kozitz@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Link: https://patch.msgid.link/20260510234534.cb3c05e5d334.I89d9f336aaf388c6e48769de5fe1e5db19295057@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: Do not declare NAN support for Extended Key ID
Ilan Peer [Sun, 10 May 2026 20:48:38 +0000 (23:48 +0300)] 
wifi: iwlwifi: mld: Do not declare NAN support for Extended Key ID

Do not declare support for Extended Key ID for NAN, as defined in section
7.4 in the WiFi Aware specification v4.0 (in order to support security
association upgrade).

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Link: https://patch.msgid.link/20260510234534.42f0e92d0ee1.Ic3e47a926539a1d8f20103c40ebe5cfeaf671a96@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: Do not declare support for NDPE
Ilan Peer [Sun, 10 May 2026 20:48:37 +0000 (23:48 +0300)] 
wifi: iwlwifi: mld: Do not declare support for NDPE

Do not declare support for NAN Data Path Extension attribute
as this is handled by user space and should be set by it.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Link: https://patch.msgid.link/20260510234534.a76eb7235116.I160f1232e51711d5e2c063f0e1539ef71db50e1e@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: Fix number of antennas in NAN capabilities
Ilan Peer [Sun, 10 May 2026 20:48:36 +0000 (23:48 +0300)] 
wifi: iwlwifi: mld: Fix number of antennas in NAN capabilities

Instead of hardcoding the number of supported antennas for Tx/Rx, set
them according to hardware capabilities.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Link: https://patch.msgid.link/20260510234534.26f8653d44a3.Ib8b9769e7a598b01f6285bd0782aa3bf13f144a2@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: extract NAN capabilities setting to a function
Miri Korenblit [Sun, 10 May 2026 20:48:35 +0000 (23:48 +0300)] 
wifi: iwlwifi: mld: extract NAN capabilities setting to a function

There are now quite a lot of capabilities to set, so move it to a
dedicated function, for better clarity.

Link: https://patch.msgid.link/20260510234534.da1f380ced3b.I02013e9d5946a1b3372d2fcd570057fdb4416b65@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: use host rate for NAN management frames
Miri Korenblit [Sun, 10 May 2026 20:48:34 +0000 (23:48 +0300)] 
wifi: iwlwifi: mld: use host rate for NAN management frames

Frames that are sent to an NMI station are always NAN management frames.
Therefore there is no need to configure TLC for such a station.
Always use host rate for the frames going to that station.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260510234534.fb7272ddbb45.I843dba36f52363bc7e9c81f937547ead12147539@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: add peer schedule support
Johannes Berg [Sun, 10 May 2026 20:48:33 +0000 (23:48 +0300)] 
wifi: iwlwifi: mld: add peer schedule support

Add support for NAN peer schedule configuration and update.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Co-developed-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260510234534.ede42401c3ee.I8e483edd1e917dfa59901b520db595cea28906e3@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: implement NAN peer station management
Johannes Berg [Sun, 10 May 2026 20:48:32 +0000 (23:48 +0300)] 
wifi: iwlwifi: mld: implement NAN peer station management

Implement peer station management for NAN, i.e. support for adding,
removing, and updating NMI and NDI stations.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Co-developed-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260510234534.cbf6bac4744f.I3bd01266e47f24fb7f1240db62ac3bd47c479127@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: add NAN schedule command support
Johannes Berg [Sun, 10 May 2026 20:48:31 +0000 (23:48 +0300)] 
wifi: iwlwifi: add NAN schedule command support

Add the NAN schedule command API definition and implementation
of the schedule updates.

Co-developed-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260510234534.95fabd44a598.I7cbe877f3b13a44554d95e56b10d930dde4704c9@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: add NAN link management
Johannes Berg [Sun, 10 May 2026 20:48:30 +0000 (23:48 +0300)] 
wifi: iwlwifi: mld: add NAN link management

The firmware requires links for NAN which mac80211 doesn't use,
so introduce a new NAN link data structure that the driver has
for itself only, and handle the link command sending code for
NAN using this data structure, most of the bss_conf data isn't
used for NAN anyway, so those structures aren't useful.

With that, add, activate, deactivate or remove links depending
on the local NAN schedule updates.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Co-developed-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260510234534.39ee3533ef30.I81ff6dc02e912396040f922e21888fd94b3c26e6@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: support NAN and NAN_DATA interfaces
Johannes Berg [Sun, 10 May 2026 20:48:29 +0000 (23:48 +0300)] 
wifi: iwlwifi: mld: support NAN and NAN_DATA interfaces

Until now we maintained the NAN vif in the driver only. The fw used the
AUX MAC for sync and discovery operations.
But when we want to configure a local schedule, we need to add the MAC
first.

NAN_DATA interfaces are not added to the FW. Instead, the local
address of these interfaces are configured to the FW via the NAN MAC.

Add the add/remove/update operations for the NAN interface, and fill the
NAN special parameters in it.

Note that this doesn't fully implement the schedule change, but only the
addition/removal of the NAN MAC. The full schedule management
implementation will come in a later patch.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Co-developed-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260510234534.dd12944c140b.I3578198660a533faf9f6a94432ef2114f4a9dfae@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: disable queue hang detection for NAN data
Johannes Berg [Sun, 10 May 2026 20:48:28 +0000 (23:48 +0300)] 
wifi: iwlwifi: mld: disable queue hang detection for NAN data

Since peers on NAN data might just use ULW and/or break the
schedule, disable queue hang detection for them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260510234534.9886987db700.Ifd879478bc30af25de0eada6143dbc3e6a548068@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: tlc: separate from link STA
Johannes Berg [Sun, 10 May 2026 20:48:27 +0000 (23:48 +0300)] 
wifi: iwlwifi: mld: tlc: separate from link STA

While NAN stations have the deflink link STA and that even
carries their information, having link STAs mostly implies
having real links, and NAN muddies that by having stations
with deflink carrying their capabilities and links at the
NAN level, but no link stations corresponding to NAN links.

Separate out the data needed to build TLC commands into a
new struct iwl_mld_tlc_sta_capa data structure so that the
whole data usage in the TLC code is clarified and we won't
make assumptions, say about being able to look up the link
of an interface from the (NAN) link sta correctly, which
would result in a link but not with a chanctx.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260510234534.2c6589aab9db.I01729ec8be4687884831fc8761bf3fd8bba83056@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: set NAN phy capabilities
Miri Korenblit [Sun, 10 May 2026 20:48:26 +0000 (23:48 +0300)] 
wifi: iwlwifi: mld: set NAN phy capabilities

Copy the HT, VHT and HE capabilities from the sbands:
- The HT capabilities from the 2.4 GHz sband (there is no difference
  between the bands anyway).
- The VHT capabilities from the 5 GHz sband, obviously.
- The HE capabilities from the 2.4 GHz and for NL80211_IFTYPE_STATION.
  Fix it up to include also the needed 5 GHz bits.

For HE, there are bits that are band-dependent and iftype-dependent. For
those set to what makes most sense, and leave a comment to re-visit.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260510234534.3a5e5251dbaf.I566e1749cd17baa672bdd43712114e434f810a69@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: validate sta_mask before ffs() in BA session handlers
Junrui Luo [Thu, 2 Apr 2026 06:48:07 +0000 (14:48 +0800)] 
wifi: iwlwifi: mld: validate sta_mask before ffs() in BA session handlers

Three BA session handlers use ffs(ba_data->sta_mask) - 1 to derive a
station ID without checking that sta_mask is non-zero. When sta_mask is
zero, ffs() returns 0 and the subtraction wraps to 0xFFFFFFFF, causing
an out-of-bounds access on fw_id_to_link_sta[].

Add WARN_ON_ONCE(!ba_data->sta_mask) guards before each ffs() call,
consistent with the existing check in iwl_mld_ampdu_rx_start().

Reported-by: Yuhao Jiang <danisjiang@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Junrui Luo <moonafterrain@outlook.com>
Link: https://patch.msgid.link/SYBPR01MB788115C6CE873271A9A15A25AF51A@SYBPR01MB7881.ausprd01.prod.outlook.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: remove unused header inclusions
Jay Ng [Wed, 8 Apr 2026 03:42:36 +0000 (20:42 -0700)] 
wifi: iwlwifi: remove unused header inclusions

Remove header files that are included but provide no symbols,
types, or macros used by the including translation unit.

In iwl-trans.c, fw/api/tx.h defines TX command structures
(iwl_tx_cmd, iwl_tx_resp, TX_CMD_* flags) used by the PCIe TX
path, not by the transport core itself. Similarly, iwl-fh.h
defines Flow Handler register addresses and DMA-related constants
(FH_*, RFH_*, TFD_*) that are consumed by PCIe-specific code,
none of which are referenced in iwl-trans.c.

In iwl-nvm-parse.c, fw/acpi.h defines ACPI/SAR/GEO/PPAG
interfaces (iwl_acpi_*, iwl_sar_*, iwl_geo_*). No references to
any of these interfaces exist in this file.

Signed-off-by: Jay Ng <jayng9663@gmail.com>
Link: https://patch.msgid.link/20260408034413.1875915-1-jayng9663@gmail.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mvm: fix race condition in PTP removal
Junjie Cao [Thu, 12 Feb 2026 12:50:34 +0000 (20:50 +0800)] 
wifi: iwlwifi: mvm: fix race condition in PTP removal

iwl_mvm_ptp_remove() calls cancel_delayed_work_sync() only after
ptp_clock_unregister() and clearing ptp_data state (ptp_clock,
ptp_clock_info, last_gp2).

This creates a race where the delayed work iwl_mvm_ptp_work() can
execute between ptp_clock_unregister() and cancel_delayed_work_sync(),
observing partially cleared PTP state.

Move cancel_delayed_work_sync() before ptp_clock_unregister() to
ensure the delayed work is fully stopped before any PTP cleanup
begins.

Cc: stable@vger.kernel.org
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Signed-off-by: Junjie Cao <junjie.cao@intel.com>
Link: https://patch.msgid.link/20260212125035.1345718-1-junjie.cao@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: fix race condition in PTP removal
Junjie Cao [Thu, 12 Feb 2026 12:50:35 +0000 (20:50 +0800)] 
wifi: iwlwifi: mld: fix race condition in PTP removal

iwl_mld_ptp_remove() calls cancel_delayed_work_sync() only after
ptp_clock_unregister() and clearing ptp_data state (ptp_clock,
last_gp2, wrap_counter).

This creates a race where the delayed work iwl_mld_ptp_work() can
execute between ptp_clock_unregister() and cancel_delayed_work_sync(),
observing partially cleared PTP state.

Move cancel_delayed_work_sync() before ptp_clock_unregister() to
ensure the delayed work is fully stopped before any PTP cleanup
begins.

Cc: stable@vger.kernel.org
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Signed-off-by: Junjie Cao <junjie.cao@intel.com>
Link: https://patch.msgid.link/20260212125035.1345718-2-junjie.cao@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agosched: Remove sched_class::pick_next_task()
Peter Zijlstra [Mon, 11 May 2026 11:31:13 +0000 (13:31 +0200)] 
sched: Remove sched_class::pick_next_task()

The reason for pick_next_task_fair() is the put/set optimization that
avoids touching the common ancestors. However, it is possible to
implement this in the put_prev_task() and set_next_task() calls as
used in put_prev_set_next_task().

Notably, put_prev_set_next_task() is the only site that:

 - calls put_prev_task() with a .next argument;
 - calls set_next_task() with .first = true.

This means that put_prev_task() can determine the common hierarchy and
stop there, and then set_next_task() can terminate where put_prev_task
stopped.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://patch.msgid.link/20260511120628.057634261@infradead.org
3 weeks agosched/fair: Add newidle balance to pick_task_fair()
Peter Zijlstra [Mon, 11 May 2026 11:31:12 +0000 (13:31 +0200)] 
sched/fair: Add newidle balance to pick_task_fair()

With commit 50653216e4ff ("sched: Add support to pick functions to
take rf") removing the balance callback, the pick_task() callback is
in charge of newidle balancing.

This means pick_task_fair() should do so too. This hasn't been a
problem in practise because pick_next_task_fair() is used. However,
since we'll be removing that one shortly, make sure pick_next_task()
is up to scratch.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://patch.msgid.link/20260511120627.944705718@infradead.org
3 weeks agosched/debug: Collapse subsequent CONFIG_SCHED_CLASS_EXT sections
Peter Zijlstra [Mon, 11 May 2026 11:31:07 +0000 (13:31 +0200)] 
sched/debug: Collapse subsequent CONFIG_SCHED_CLASS_EXT sections

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260511120627.281160085@infradead.org
3 weeks agosched: Use {READ,WRITE}_ONCE() for preempt_dynamic_mode
Peter Zijlstra [Mon, 11 May 2026 11:31:06 +0000 (13:31 +0200)] 
sched: Use {READ,WRITE}_ONCE() for preempt_dynamic_mode

Robots figured out you can read and write this concurrently and got
'upset'. Gemini even noted sched_dynamic_show() can generate
'confusing' output if it observed different values during the
printing.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260511120627.176946327@infradead.org
3 weeks agosched/debug: Use char * instead of char (*)[]
Peter Zijlstra [Mon, 11 May 2026 11:31:05 +0000 (13:31 +0200)] 
sched/debug: Use char * instead of char (*)[]

Some of the fancy AI robots are getting 'upset'.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260511120627.065013766@infradead.org
3 weeks agosched/fair: Fix RCU usage in NOHZ exit path on CPU offline
Andrea Righi [Fri, 22 May 2026 09:25:23 +0000 (11:25 +0200)] 
sched/fair: Fix RCU usage in NOHZ exit path on CPU offline

Commit c9d93a73ce87 ("sched/fair: Drop redundant RCU read lock in NOHZ
kick path") removed the rcu_read_lock()/unlock() pair from
set_cpu_sd_state_busy() and set_cpu_sd_state_idle() on the assumption
that all callers run in a safe context for rcu_dereference_all(): IRQs
disabled or cpus_write_lock() held.

That assumption is wrong for the CPU hotplug teardown path. When CPUs
are taken offline, set_cpu_sd_state_busy() is invoked via:

 cpuhp/N kthread
   cpuhp_thread_fun()
     cpuhp_invoke_callback()
       sched_cpu_deactivate()
         nohz_balance_exit_idle()
           set_cpu_sd_state_busy()
             rcu_dereference_all(per_cpu(sd_llc, cpu))

The cpuhp kthread holds cpu_hotplug_lock (percpu-rwsem) but runs with
preemption and IRQs enabled. As a result, lockdep correctly reports a
suspicious RCU usage on CPU offline, e.g.:

  # echo 0 > /sys/devices/system/cpu/cpu1/online

  =============================
  WARNING: suspicious RCU usage
  -----------------------------
  kernel/sched/fair.c:12793 suspicious rcu_dereference_check() usage!
  ...
  2 locks held by cpuhp/1/20:
   #0: (cpu_hotplug_lock){++++}-{0:0}, at: cpuhp_thread_fun+0x42/0x1ae
   #1: (cpuhp_state-down){+.+.}-{0:0}, at: cpuhp_thread_fun+0x72/0x1ae

  Call Trace:
    lockdep_rcu_suspicious
    nohz_balance_exit_idle
    sched_cpu_deactivate
    cpuhp_invoke_callback
    cpuhp_thread_fun
    smpboot_thread_fn

Fix this by adding RCU read lock coverage to the one caller that lacks
it: nohz_balance_exit_idle() in the CPU hotplug teardown.

The other callers (nohz_balancer_kick() and nohz_balance_enter_idle())
genuinely run with IRQs disabled, so they remain unchanged.

Fixes: c9d93a73ce87 ("sched/fair: Drop redundant RCU read lock in NOHZ kick path")
Closes: https://lore.kernel.org/all/38fe0a1d-1a48-435a-910a-c278024d9ac9@samsung.com/
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260522092523.2046095-1-arighi@nvidia.com
3 weeks agoarm64: dts: ti: k3-j722s-main: use J722S compatibles for WIZ, gmii-sel and CPSW3G
Nora Schiffer [Tue, 7 Apr 2026 11:42:37 +0000 (13:42 +0200)] 
arm64: dts: ti: k3-j722s-main: use J722S compatibles for WIZ, gmii-sel and CPSW3G

Update WIZ, gmii-sel and CPSW3G to use the J722S-specific compatible
strings, enabling SGMII support. The fallback compatibles preserve
compatibility of the updated Device Trees with older kernels.

Signed-off-by: Nora Schiffer <nora.schiffer@ew.tq-group.com>
Link: https://patch.msgid.link/391f17ba7b0e9dcaa1fc8210114dfda7eb3c0467.1775559102.git.nora.schiffer@ew.tq-group.com
Signed-off-by: Nishanth Menon <nm@ti.com>
3 weeks agofirmware: ti_sci: Add support for restoring clock context during resume
Thomas Richard (TI) [Tue, 19 May 2026 15:06:59 +0000 (17:06 +0200)] 
firmware: ti_sci: Add support for restoring clock context during resume

Some DM-Firmware are not able to restore the clock rates and the
clock parents after a suspend-resume. The CLK_CONTEXT_LOST firmware
capability has been introduced to identify this characteristic.
In this case the responsibility is therefore delegated to the
ti_sci driver, which uses clk_restore_context() to trigger the
context_restore() operation for all registered clocks, including
those managed by the sci-clk. The sci-clk driver implements the
context_restore() operation to ensure rates and clock parents are
correctly restored.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Kendall Willis <k-willis@ti.com>
Signed-off-by: Thomas Richard (TI) <thomas.richard@bootlin.com>
Link: https://patch.msgid.link/20260519-ti-sci-jacinto-s2r-restore-irq-v9-4-c550a8ae0f31@bootlin.com
Signed-off-by: Nishanth Menon <nm@ti.com>
3 weeks agoclk: keystone: sci-clk: Add restore_context() operation
Thomas Richard (TI) [Tue, 19 May 2026 15:06:58 +0000 (17:06 +0200)] 
clk: keystone: sci-clk: Add restore_context() operation

Implement the restore_context() operation to restore the clock rate
and the clock parent state. The clock rate is saved in sci_clk struct
during set_rate() and recalc_rate() operations. The parent index
is saved in sci_clk struct during set_parent() operation. During
clock registration, the core retrieves each clock’s parent using
get_parent() operation to ensure the internal clock tree reflects
the actual hardware state, including any configurations made by the
bootloader. So we also save the parent index in get_parent().

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Kendall Willis <k-willis@ti.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Thomas Richard (TI) <thomas.richard@bootlin.com>
Link: https://patch.msgid.link/20260519-ti-sci-jacinto-s2r-restore-irq-v9-3-c550a8ae0f31@bootlin.com
Signed-off-by: Nishanth Menon <nm@ti.com>
3 weeks agofirmware: ti_sci: Add support for restoring IRQs during resume
Thomas Richard (TI) [Tue, 19 May 2026 15:06:57 +0000 (17:06 +0200)] 
firmware: ti_sci: Add support for restoring IRQs during resume

Some DM-Firmware are not able to restore the IRQ context after
a suspend-resume. The IRQ_CONTEXT_LOST firmware capability has
been introduced to identify this characteristic. In this case the
responsibility is delegated to the ti_sci driver, which maintains
an internal list of all requested IRQs. This list is updated on
each set()/free() operation, and all IRQs are restored during the
resume_noirq() phase.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Kendall Willis <k-willis@ti.com>
Signed-off-by: Thomas Richard (TI) <thomas.richard@bootlin.com>
Link: https://patch.msgid.link/20260519-ti-sci-jacinto-s2r-restore-irq-v9-2-c550a8ae0f31@bootlin.com
Signed-off-by: Nishanth Menon <nm@ti.com>
3 weeks agofirmware: ti_sci: Add BOARDCFG_MANAGED mode support
Thomas Richard (TI) [Tue, 19 May 2026 15:06:56 +0000 (17:06 +0200)] 
firmware: ti_sci: Add BOARDCFG_MANAGED mode support

In BOARDCFG_MANAGED mode, the low power mode configuration is done
statically for the DM via the boardcfg. Constraints are not supported,
and prepare_sleep() is not needed.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Kendall Willis <k-willis@ti.com>
Signed-off-by: Thomas Richard (TI) <thomas.richard@bootlin.com>
Link: https://patch.msgid.link/20260519-ti-sci-jacinto-s2r-restore-irq-v9-1-c550a8ae0f31@bootlin.com
Signed-off-by: Nishanth Menon <nm@ti.com>
3 weeks agoPM: hibernate: make LZ4 available for hibernation compression
l1rox3 [Wed, 20 May 2026 08:12:54 +0000 (10:12 +0200)] 
PM: hibernate: make LZ4 available for hibernation compression

Without this, CRYPTO_LZ4 had to be manually enabled in the config
to use LZ4 for hibernation compression. Add the select so it gets
pulled in automatically when hibernation is enabled, just like
CRYPTO_LZO already does.

Tested-by: l1rox3 <l1rox3.developer@gmail.com>
Signed-off-by: l1rox3 <l1rox3.developer@gmail.com>
Link: https://patch.msgid.link/20260520081254.13493-1-l1rox3.developer@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3 weeks agopinctrl: spacemit: move over to generic pinmux dt_node_to_map implementation
Conor Dooley [Tue, 19 May 2026 09:37:25 +0000 (10:37 +0100)] 
pinctrl: spacemit: move over to generic pinmux dt_node_to_map implementation

Replace the custom implementation of dt_node_to_map with
pinctrl_generic_dt_node_to_map() to demonstrate its use.
spacemit_pin_mux_config didn't provide much value in the first place,
because the group contains the information required to look up the
spacemit_pin struct corresponding to a pin, so there's no loss in
functionality as a result of the generic function carrying only the mux
data in the group's data pointer rather than having an array of
spacemit_pin_mux_config structs.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
3 weeks agopinctrl: spacemit: delete spacemit_pctrl_check_power()
Conor Dooley [Tue, 19 May 2026 09:37:24 +0000 (10:37 +0100)] 
pinctrl: spacemit: delete spacemit_pctrl_check_power()

As far as I can tell spacemit_pctrl_check_power(), called during the
custom implementation of dt_node_to_map, is redundant because
the driver's implementation generate_config performs the check too.
Removing this would allow the driver to use the newly added common
function pinctrl_generic_pinmux_dt_node_to_map().

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
3 weeks agopinctrl: add new generic groups/function creation function for pinmux
Conor Dooley [Tue, 19 May 2026 09:37:23 +0000 (10:37 +0100)] 
pinctrl: add new generic groups/function creation function for pinmux

Akin to my recently added pinctrl_generic_pins_functions_dt_node_to_map(),
create an analogue that performs the same role of dynamically creating
groups at runtime for controllers using the pinmux property.
The pinmux property is freeform, so this function mandates that the
upper 16 bits contain the pin and the lower 16 bits contains the mux
setting. The group's data pointer is populated with an array of the mux
settings for each pin it contains.

Since the node parsing and subsequent pinctrl core function calls are
practically identical to the pins + functions case, other than which
properties are examined, it makes sense to extract the common code from
pinctrl_generic_pins_function_dt_node_to_map() into a generic function
that takes the case-specific devicetree parsing function as an argument.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
3 weeks agopinctrl: generic: change signature of pinctrl_generic_to_map() to pass void data
Conor Dooley [Tue, 19 May 2026 09:37:22 +0000 (10:37 +0100)] 
pinctrl: generic: change signature of pinctrl_generic_to_map() to pass void data

In order to make pinctrl_generic_to_map() usable for controllers that
use pinmux, change the functions char array pointer that it passes to
pinctrl_generic_add_group() to a void pointer. In the pinmux case this
property will contain the mux setting as a number rather than as strings
in the pins + functions case.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
3 weeks agofirmware: meson: sm: Add thermal calibration SMC call
Ronald Claveau [Fri, 24 Apr 2026 15:45:11 +0000 (17:45 +0200)] 
firmware: meson: sm: Add thermal calibration SMC call

Add SM_THERMAL_CALIB_READ at SMC ID 0x82000047 in the command
table and implement meson_sm_get_thermal_calib(), which forwards the
tsensor_id argument to the secure monitor and returns the calibration data.

Also realign the CMD() column to improve readability.

Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
[ dlezcano: Fixed kernel-doc format warning ]
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260424-add-thermal-t7-vim4-v5-3-9040ca36afe2@aliel.fr
3 weeks agofirmware: meson: sm: Thermal calibration read via secure monitor
Ronald Claveau [Fri, 24 Apr 2026 15:45:10 +0000 (17:45 +0200)] 
firmware: meson: sm: Thermal calibration read via secure monitor

Add SM_THERMAL_CALIB_READ to the secure monitor command enum and
introduce meson_sm_get_thermal_calib() to allow drivers to retrieve
thermal sensor calibration data through the firmware interface.

Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260424-add-thermal-t7-vim4-v5-2-9040ca36afe2@aliel.fr
3 weeks agodt-bindings: thermal: amlogic: Add support for T7
Ronald Claveau [Fri, 24 Apr 2026 15:45:09 +0000 (17:45 +0200)] 
dt-bindings: thermal: amlogic: Add support for T7

Add the amlogic,t7-thermal compatible for the Amlogic T7 thermal sensor.

Unlike existing variants which use a phandle to the ao-secure syscon,
the T7 relies on a secure monitor interface described by a phandle and
a sensor index argument.

The T7 integrates multiple thermal sensors, all accessed through the
same SMC call. The sensor index argument is required to identify which
sensor's calibration data the secure monitor should return, as a single
SM_THERMAL_CALIB_READ command serves all of them.

Introduce the amlogic,secure-monitor property as a phandle-array and
make amlogic,ao-secure or amlogic,secure-monitor conditionally required
depending on the compatible.

Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20260424-add-thermal-t7-vim4-v5-1-9040ca36afe2@aliel.fr
3 weeks agothermal/core: Use devm_add_action_or_reset() when registering a cooling device
Daniel Lezcano [Wed, 29 Apr 2026 16:14:14 +0000 (18:14 +0200)] 
thermal/core: Use devm_add_action_or_reset() when registering a cooling device

Use devm_add_action_or_reset() which does the replaced code. It
results in a simpler and more concise code.

Signed-off-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Reviewed-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
Link: https://patch.msgid.link/20260429161430.3802970-2-daniel.lezcano@oss.qualcomm.com
3 weeks agothermal/drivers/tegra/soctherma: Switch to devm cooling device registration
Daniel Lezcano [Fri, 24 Apr 2026 16:00:19 +0000 (18:00 +0200)] 
thermal/drivers/tegra/soctherma: Switch to devm cooling device registration

Use devm_thermal_of_cooling_device_register() to simplify resource
management and avoid manual cleanup in error paths.

As a side effect this change has the benefit of solving an existing
issue. Before, the function tegra_soctherm_remove() only called
debugfs_remove_recursive() and never called thermal_cooling_device_unregister()
for any of the cooling devices registered here.

After the driver removal, the thermal framework's cdev list would
still hold references to thermal_cooling_device objects whose devdata
pointer (ts) pointed to memory already freed by the platform device's
devm cleanup.

With this change, the cooling device is unregistered when the driver
is removed, thus fixing the issue above.

Signed-off-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/20260424160019.41710-2-daniel.lezcano@oss.qualcomm.com
3 weeks agothermal/drivers/tegra/soctherm: Use devm_add_action_or_reset() for clock disable
Daniel Lezcano [Fri, 24 Apr 2026 16:00:18 +0000 (18:00 +0200)] 
thermal/drivers/tegra/soctherm: Use devm_add_action_or_reset() for clock disable

Replace the manual error handling paths disabling the clocks with
devm_add_action_or_reset(). This ensures the clocks are properly
disabled on probe failure and driver removal, while simplifying the
code by removing the explicit error paths.

Signed-off-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/20260424160019.41710-1-daniel.lezcano@oss.qualcomm.com
3 weeks agodt-bindings: thermal: qcom-tsens: Document Nord Temperature Sensor
Deepti Jaggi [Mon, 4 May 2026 08:12:36 +0000 (16:12 +0800)] 
dt-bindings: thermal: qcom-tsens: Document Nord Temperature Sensor

Document Temperature Sensor (TSENS) on Qualcomm Nord SoC.

Signed-off-by: Deepti Jaggi <deepti.jaggi@oss.qualcomm.com>
Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Reviewed-by: Pankaj Patil <pankaj.patil@oss.qualcomm.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260504081236.825755-1-shengchao.guo@oss.qualcomm.com
3 weeks agoMerge branch 'net-enetc-prepare-for-enetc-v4-vf-support'
Paolo Abeni [Tue, 26 May 2026 11:20:15 +0000 (13:20 +0200)] 
Merge branch 'net-enetc-prepare-for-enetc-v4-vf-support'

Wei Fang says:

====================
net: enetc: Prepare for ENETC v4 VF support

This patch series refactors and extends the ENETC driver infrastructure
to prepare for upcoming ENETC v4 Virtual Function (VF) support. The main
focus is on code commonization, improved VF-PF communication, and dynamic
resource allocation.

The ENETC IP has evolved across different revisions, and the existing
driver architecture was primarily designed around v1 hardware. To support
v4 VFs efficiently, we need to share common code between PF drivers of
different IP versions while maintaining compatibility.

Key changes in this series:

1. VF-PF Messaging Infrastructure:
   - Convert mailbox messages to new formats
   - Use read_poll_timeout() for simplifying VF mailbox polling
   - Add support for IP minor revision query via messaging

2. Code Commonization:
   - Relocate SR-IOV configuration helpers to common PF code
   - Move VF message handlers to dedicated enetc_msg.c
   - Integrate enetc_msg.c into enetc-pf-common driver

3. CBDR (Control Buffer Descriptor Ring) Improvements:
   - Align v1 CBDR API with v4 for VF driver sharing
   - Add CBDR setup/teardown hooks to enetc_si_ops

4. Dynamic Resource Management:
   - Dynamically allocate rxmsg based on actual VF count
   - Use MADDR_TYPE constant for MAC filter array sizing

5. Generic SR-IOV Initialization:
   - Add generic helper to initialize SR-IOV resources

This refactoring lays the groundwork for cleanly integrating ENETC v4 VF
support in subsequent patch series, allowing code reuse between v1 and v4
PF drivers while maintaining a clean separation of version-specific
logic.

v1: https://lore.kernel.org/imx/20260511080805.2052495-1-wei.fang@nxp.com/
====================

Link: https://patch.msgid.link/20260522092438.1264020-1-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agonet: enetc: dynamically allocate rxmsg based on VF count
Wei Fang [Fri, 22 May 2026 09:24:38 +0000 (17:24 +0800)] 
net: enetc: dynamically allocate rxmsg based on VF count

The constant ENETC_MAX_NUM_VFS is defined as 2 when enabling support for
LS1028A. This works for LS1028A because its ENETC hardware supports up
to 2 VFs. However, ENETC v4 has varying VF capabilities depending on the
SoC:

i.MX94 standalone ENETC: 0 VFs
i.MX94 internal ENETC:   3 VFs
i.MX952:                 1 VF

Using a fixed ENETC_MAX_NUM_VFS for memory allocation leads to
over-allocation on SoCs with fewer or no VF support. To better match
hardware capabilities and avoid unnecessary memory usage, change rxmsg
memory allocation from a fixed-size array to dynamic allocation based
on the actual VF count retrieved via pci_sriov_get_totalvfs().

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260522092438.1264020-13-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agonet: enetc: use MADDR_TYPE for MAC filter array size
Wei Fang [Fri, 22 May 2026 09:24:37 +0000 (17:24 +0800)] 
net: enetc: use MADDR_TYPE for MAC filter array size

The mac_filter array in struct enetc_pf is sized as
ENETC_MAX_NUM_MAC_FLT, defined as (ENETC_MAX_NUM_VFS + 1) * MADDR_TYPE.
This resulted in an array of 6 elements (for 2 VFs), but only the first
2 entries are actually used.

The PF driver maintains MAC filters for unicast (UC) and multicast (MC)
addresses, indexed by the enum enetc_mac_addr_type (UC=0, MC=1). The
code only iterates over MADDR_TYPE (2) entries and directly accesses
mac_filter[UC] and mac_filter[MC]. The extra space allocated for
(ENETC_MAX_NUM_VFS * MADDR_TYPE) entries is never used because VF MAC
filtering is not implemented yet.

Remove the ENETC_MAX_NUM_MAC_FLT macro and size the array as
MADDR_TYPE, reducing the allocation from 6 to 2 entries. This saves 48
bytes per PF and better reflects the actual usage.

This change has no functional impact. Future VF MAC filtering support
will move mac_filter into struct enetc_si, allowing each SI (PF or VF)
to maintain its own independent filter table.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260522092438.1264020-12-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agonet: enetc: add generic helper to initialize SR-IOV resources
Wei Fang [Fri, 22 May 2026 09:24:36 +0000 (17:24 +0800)] 
net: enetc: add generic helper to initialize SR-IOV resources

The upcoming ENETC v4 PF driver will support SR-IOV, and its logic for
initializing VF resources is identical to the existing ENETC v1 PF
implementation. To avoid code duplication across PF drivers, factor out
the common SR-IOV initialization logic into the enetc-pf-common driver.

Add enetc_init_sriov_resources() to handle:
- Querying the total number of VFs supported by the device via
  pci_sriov_get_totalvfs()
- Allocating memory for the VF state array (struct enetc_vf_state)

The implementation uses devm_kcalloc() instead of kzalloc() to simplify
memory management. This automatically frees VF state memory when the PF
device is removed, eliminating the need for explicit cleanup in error
and remove paths.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260522092438.1264020-11-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agonet: enetc: add CBDR setup/teardown hooks to enetc_si_ops for VF support
Wei Fang [Fri, 22 May 2026 09:24:35 +0000 (17:24 +0800)] 
net: enetc: add CBDR setup/teardown hooks to enetc_si_ops for VF support

The upcoming ENETC v4 VF will share the enetc-vf driver with the
existing v1 VF. However, ENETC v4 uses a revised CBDR (command BD ring)
setup/teardown API that differs from v1.

To support both versions in the same driver, add setup_cbdr() and
teardown_cbdr() function pointers to struct enetc_si_ops. This allows
each hardware version to register its own CBDR implementation:

- ENETC v1 VF registers enetc_setup_cbdr/enetc_teardown_cbdr (existing)
- ENETC v4 VF will register enetc4_setup_cbdr/enetc4_teardown_cbdr

Update the enetc-vf driver to call CBDR operations through si->ops
instead of directly invoking the v1 functions. This enables runtime
selection of the correct CBDR backend based on hardware version.

Changes:
- Add setup_cbdr() and teardown_cbdr() hooks to struct enetc_si_ops
- Register v1 CBDR functions in enetc_vsi_ops
- Replace direct calls with si->ops->setup_cbdr() and
  si->ops->teardown_cbdr() in enetc_vf.c

No functional changes to existing v1 VF behavior.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260522092438.1264020-10-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agonet: enetc: align v1 CBDR API with v4 for VF driver sharing
Wei Fang [Fri, 22 May 2026 09:24:34 +0000 (17:24 +0800)] 
net: enetc: align v1 CBDR API with v4 for VF driver sharing

The upcoming ENETC v4 VF will share the enetc-vf driver with the v1 VF.
However, ENETC v4 introduces different CBDR (command BD ring) setup and
teardown semantics that are incompatible with v1.

To support both versions in the same driver, the .setup_cbdr() and
.teardown_cbdr() hooks will be added to struct enetc_si_ops, allowing
the driver to register version-specific implementations. So refactor the
v1 CBDR functions to match the v4-style interface (taking struct enetc_si*
instead of individual parameters), enabling them to be registered via
si_ops in the subsequent patch.

Changes:
- Update enetc_setup_cbdr() and enetc_teardown_cbdr() prototypes to
  take 'struct enetc_si *' as the sole parameter
- Extract parameters (dev, hw) from the enetc_si structure within the
  function implementations
- ENETC_CBDR_DEFAULT_SIZE has always been used as the number of command
  BDs, and there is no need to adjust the size of the command BD ring.
  Therefore, ENETC_CBDR_DEFAULT_SIZE is moved into the enetc_setup_cbdr()
- Update all call sites in enetc_pf.c and enetc_vf.c

No functional changes. This prepares for adding v4-specific CBDR handling
in subsequent patches.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260522092438.1264020-9-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agonet: enetc: add VF-PF messaging support for IP minor revision query
Wei Fang [Fri, 22 May 2026 09:24:33 +0000 (17:24 +0800)] 
net: enetc: add VF-PF messaging support for IP minor revision query

For ENETC v4, different SoCs use different minor revisions, such as
i.MX95 v4.1, i.MX94 v4.3, and i.MX952 v4.6. Unlike the PF, the VF does
not have access to a global register that exposes the IP minor revision.
In the current driver model, the VF must select the appropriate driver
data based on this revision information.

To support this requirement, the VF now sends a minor revision query
message to the PF through the VSI-to-PSI mailbox mechanism. The PF
responds with the IP minor revision so that the VF can match the correct
driver data.

This patch adds PF-side support for replying to the minor revision
message and VF-side support for sending the query.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260522092438.1264020-8-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agonet: enetc: convert mailbox messages to new formats
Wei Fang [Fri, 22 May 2026 09:24:32 +0000 (17:24 +0800)] 
net: enetc: convert mailbox messages to new formats

On the LS1028A platform, the PF-VF mailbox was only used to update the
VF's MAC address. The original message format is minimal, lacks a clear
structure, and provides no means for the receiver to validate message
integrity, making it difficult to extend for new features.

With the introduction of i.MX ENETC v4, the interaction between PF and
VF has become significantly more complex. Typical deployments now include
scenarios where the PF is controlled by an M core while the VF is driven
by either the Linux kernel or DPDK, or where the PF is controlled by the
Linux kernel while the VF is controlled by DPDK. These heterogeneous
driver combinations require a unified and extensible message format to
ensure compatibility across different operating environments.

This patch introduces a newly defined PF-VF message structure and
converts the existing MAC-update mechanism to use the new format. The
redesigned message layout provides:

  - extensibility to support future PF-VF features on ENETC v4,
  - consistent framing for all message types,
  - improved data integrity checking,
  - a common protocol usable across Linux, M core firmware, and DPDK.

Additional PF-VF message types will be added in subsequent patches.

Note that switch to the new message format will not affect ENETC v1
(LS1028A). Due to a hardware limitation of ENETC v1, the ENETC PF and
VFs can only be controlled by the same OS. If the PF is controlled by
the Linux kernel driver, then the VFs must also be controlled by the
Linux kernel driver.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260522092438.1264020-7-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agonet: enetc: use read_poll_timeout() for VF mailbox polling
Wei Fang [Fri, 22 May 2026 09:24:31 +0000 (17:24 +0800)] 
net: enetc: use read_poll_timeout() for VF mailbox polling

Replace the manual do-while polling loop in enetc_msg_vsi_send() with
the standard read_poll_timeout() helper to simplify the code.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260522092438.1264020-6-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agonet: enetc: integrate enetc_msg.c into enetc-pf-common driver
Wei Fang [Fri, 22 May 2026 09:24:30 +0000 (17:24 +0800)] 
net: enetc: integrate enetc_msg.c into enetc-pf-common driver

Move enetc_msg.c from the fsl-enetc driver to the nxp-enetc-pf-common
driver so that SR-IOV mailbox handling can be shared between ENETC v1
and v4 PF drivers.

Changes:
- Move enetc_msg.o compilation from fsl-enetc to nxp-enetc-pf-common
- Export enetc_sriov_configure() with EXPORT_SYMBOL_GPL for use by
  both PF drivers

The fsl-enetc driver now depends on nxp-enetc-pf-common for SR-IOV
functionality.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260522092438.1264020-5-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agonet: enetc: relocate SR-IOV configuration helper for common PF support
Wei Fang [Fri, 22 May 2026 09:24:29 +0000 (17:24 +0800)] 
net: enetc: relocate SR-IOV configuration helper for common PF support

Move enetc_sriov_configure() from enetc_pf.c to enetc_msg.c to prepare
for integrating enetc_msg.c into the enetc-pf-common driver, where it
will be shared between ENETC v1 and v4 PF drivers.

Since enetc_msg_psi_init() and enetc_msg_psi_free() are now only called
from enetc_sriov_configure() within the same file, make them static.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260522092438.1264020-4-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agonet: enetc: move VF message handlers to enetc_msg.c
Wei Fang [Fri, 22 May 2026 09:24:28 +0000 (17:24 +0800)] 
net: enetc: move VF message handlers to enetc_msg.c

Move enetc_msg_pf_set_vf_primary_mac_addr() and enetc_msg_handle_rxmsg()
to enetc_msg.c to consolidate VF mailbox message handling logic.

Make enetc_msg_handle_rxmsg() static since it's only called from
enetc_msg_task() within the same file.

This prepares for integrating enetc_msg.c into the enetc-pf-common
driver to be shared between ENETC v1 and v4 PF drivers.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260522092438.1264020-3-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agonet: enetc: use enetc_set_si_hw_addr() for setting MAC address
Wei Fang [Fri, 22 May 2026 09:24:27 +0000 (17:24 +0800)] 
net: enetc: use enetc_set_si_hw_addr() for setting MAC address

Replace enetc_pf_set_primary_mac_addr() with the generic
enetc_set_si_hw_addr() function. This prepares for moving
enetc_msg_pf_set_vf_primary_mac_addr() to the enetc-pf-common driver,
where it can be shared between ENETC v1 and v4 PF drivers.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260522092438.1264020-2-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agoPM: sleep: Use complete() in device_pm_sleep_init()
Jiakai Xu [Sat, 23 May 2026 02:23:14 +0000 (02:23 +0000)] 
PM: sleep: Use complete() in device_pm_sleep_init()

Replace complete_all() with complete() in device_pm_sleep_init() to allow
it to be called in atomic contexts without triggering a false-positive
WARNING from lockdep_assert_RT_in_threaded_ctx() when
CONFIG_PROVE_RAW_LOCK_NESTING is enabled.

device_pm_sleep_init() may be called during device initialization while
holding a raw_spinlock (e.g., from within device_initialize()), and
complete_all() is unsafe in atomic contexts on PREEMPT_RT kernels.
complete(), which is safe to call from any context, is sufficient here.

complete_all() sets the completion count to UINT_MAX/2 (permanently
signaled), while complete() increments it by 1. Since no threads can be
waiting during device initialization, both are functionally equivalent.
The completion is always reinitialized via reinit_completion() in
dpm_clear_async_state() before each suspend/resume cycle.

However, changing to complete() introduces a potential deadlock for
devices with no PM support (dev->power.no_pm = true). Such devices are
never added to the dpm_list and never go through dpm_clear_async_state(),
so their completion is never reinitialized. A parent device waiting on a
no_pm child across multiple suspend phases would consume the single-use
token in the first phase and block forever in the second.

Fix this by adding an early return in dpm_wait() when dev->power.no_pm is
set, since no_pm devices do not participate in system suspend/resume.

Fixes: 152e1d592071 ("PM: Prevent waiting forever on asynchronous resume after failing suspend")
Signed-off-by: Jiakai Xu <xujiakai24@mails.ucas.ac.cn>
[ rjw: Subject adjustment ]
Link: https://patch.msgid.link/20260523022314.2657232-1-xujiakai24@mails.ucas.ac.cn
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3 weeks agocpufreq/amd-pstate-ut: Disable dynamic_epp after the mode switch
K Prateek Nayak [Sat, 23 May 2026 05:55:03 +0000 (05:55 +0000)] 
cpufreq/amd-pstate-ut: Disable dynamic_epp after the mode switch

Dan reported a possible NULL pointer dereference in amd-pstate-ut.c from
static analysis and sure enough, running amd-pstate-ut in active mode
with amd_dynamic_epp=enable results in a crash as a reult of the policy
reference being set to NULL early, before disabling dynamic EPP.

Kalpana also reported seeing amd-pstate-ut error out with -EBUSY for
"amd_pstate_ut_epp" test when starting from the passive mode and
amd_dynamic_epp=enable in the command line. The reason for the failure
is that the command line enables dynamic_epp by default after the mode
switch and the modifications to EPP values are blocked when running in
dynamic EPP mode.

Solution to both problems is to toggle off dynamic_epp *after* the mode
switch when the driver grabs the policy reference again since the unit
test is in full control of the policy after that point.

The final restoration step will reset the dynamic_epp state via mode
switch based on the initial conditions of the system.

Reported-by: Kalpana Shetty <kalpana.shetty@amd.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/linux-pm/ahEq0CvdBX0T7_cO@stanley.mountain/
Fixes: f9f16835d4dc ("cpufreq/amd-pstate-ut: Drop policy reference before driver switch")
Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com>
Link: https://patch.msgid.link/20260523055503.7651-1-kprateek.nayak@amd.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3 weeks agodrm/bridge: ite-it66121: Select HDMI or DVI mode based on sink type
Javier Martinez Canillas [Sat, 23 May 2026 10:41:00 +0000 (12:41 +0200)] 
drm/bridge: ite-it66121: Select HDMI or DVI mode based on sink type

The driver unconditionally sets the transmission mode to HDMI, which
leads to display output not working with DVI monitors. Check the
connector's display information sink type to identify the correct mode
to configure the bridge.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patch.msgid.link/20260523-it66121-fix-dvi-mode-v5-v5-3-33b4468162f9@redhat.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
3 weeks agodrm/bridge: ite-it66121: Move .mode_set logic to .atomic_enable
Javier Martinez Canillas [Sat, 23 May 2026 10:40:59 +0000 (12:40 +0200)] 
drm/bridge: ite-it66121: Move .mode_set logic to .atomic_enable

Move the existing .mode_set logic to the .atomic_enable callback. The
former is deprecated and drivers are supposed to use the latter instead.

Also, drop the struct it66121_ctx.connector field because the connector
can be accessed through the atomic state and there is no need to store
it anymore.

Suggested-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patch.msgid.link/20260523-it66121-fix-dvi-mode-v5-v5-2-33b4468162f9@redhat.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
3 weeks agodrm/bridge: ite-it66121: Switch to the HDMI connector helpers
Javier Martinez Canillas [Sat, 23 May 2026 10:40:58 +0000 (12:40 +0200)] 
drm/bridge: ite-it66121: Switch to the HDMI connector helpers

Instead of open coding the HDMI AVI Infoframes buffer management, use the
helpers provided by the HDMI connector framework.

Also, add callbacks to implement HDMI Vendor Specific Infoframe and Audio
InfoFrame support. The driver was not sending these before, but they are
required when using the HDMI helpers.

These were implemented following the IT66121 Programming Guide.

Suggested-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patch.msgid.link/20260523-it66121-fix-dvi-mode-v5-v5-1-33b4468162f9@redhat.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
3 weeks agoMerge branch 'mv88e6xxx-cache-scratch-config3-of-6352'
Paolo Abeni [Tue, 26 May 2026 10:11:51 +0000 (12:11 +0200)] 
Merge branch 'mv88e6xxx-cache-scratch-config3-of-6352'

Fidan Aliyeva says:

====================
mv88e6xxx: Cache scratch config3 of 6352

In mv88e6352 scratch register in Global Control 2 set of registers
returns which port is attached to SERDES. This value is a pin
strapping value and is set after the switch is released from reset.
Thus, it can be cached during chip setup instead of reading the
register everytime when SERDES check is needed.

The series consist of 4 parts:
1. Add new mv88e6352_reset function as ops->reset
2. Cache the register value in this reset function
3. Refactor mv88e6352_g2_scratch_port_has_serdes to use the cached
value.
4. Remove the locks surrounding mv88e6352_g2_scratch_port_has_serdes.

v1: https://lore.kernel.org/netdev/20260515223707.1026325-1-fidan.aliyeva.ext@ericsson.com/
RFC: https://lore.kernel.org/netdev/20260510213429.2044612-1-fidan.aliyeva.ext@ericsson.com/
====================

Link: https://patch.msgid.link/20260521202924.727929-1-fidan.aliyeva.ext@ericsson.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agomv88e6xxx: Remove locks for 6352's has_serdes
Fidan Aliyeva [Thu, 21 May 2026 20:29:24 +0000 (22:29 +0200)] 
mv88e6xxx: Remove locks for 6352's has_serdes

There is no register access anymore in
mv88e6352_g2_scratch_port_has_serdes. So, remove the locks
surrounding the function.

Co-developed-by: Thomas Eckerman <thomas.eckerman.ext@ericsson.com>
Signed-off-by: Thomas Eckerman <thomas.eckerman.ext@ericsson.com>
Signed-off-by: Fidan Aliyeva <fidan.aliyeva.ext@ericsson.com>
Link: https://patch.msgid.link/20260521202924.727929-5-fidan.aliyeva.ext@ericsson.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agomv88e6xxx: Use cached config3 in 6352 has_serdes
Fidan Aliyeva [Thu, 21 May 2026 20:29:23 +0000 (22:29 +0200)] 
mv88e6xxx: Use cached config3 in 6352 has_serdes

1. Refactor mv88e6352_g2_scratch_port_has_serdes to use the cached
scratch config3 value instead of reading it everytime.
2. Remove err<0 check from mv88e6352_phylink_get_caps as it is never
true anymore

Co-developed-by: Thomas Eckerman <thomas.eckerman.ext@ericsson.com>
Signed-off-by: Thomas Eckerman <thomas.eckerman.ext@ericsson.com>
Signed-off-by: Fidan Aliyeva <fidan.aliyeva.ext@ericsson.com>
Link: https://patch.msgid.link/20260521202924.727929-4-fidan.aliyeva.ext@ericsson.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agomv88e6xxx: Cache scratch config3 of 6352
Fidan Aliyeva [Thu, 21 May 2026 20:29:22 +0000 (22:29 +0200)] 
mv88e6xxx: Cache scratch config3 of 6352

Changes:

1. Add g2_scratch_config3 member to mv88e6xxx_chip.

2. Add mv88e6352_g2_cache_global_scratch_config3  which reads the
CONFIG3 value from the scratch register and caches it.

3. Call this function in mv88e6352_reset.

Co-developed-by: Thomas Eckerman <thomas.eckerman.ext@ericsson.com>
Signed-off-by: Thomas Eckerman <thomas.eckerman.ext@ericsson.com>
Signed-off-by: Fidan Aliyeva <fidan.aliyeva.ext@ericsson.com>
Link: https://patch.msgid.link/20260521202924.727929-3-fidan.aliyeva.ext@ericsson.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agomv88e6xxx: Add mv88e6352_reset for 6352 family
Fidan Aliyeva [Thu, 21 May 2026 20:29:21 +0000 (22:29 +0200)] 
mv88e6xxx: Add mv88e6352_reset for 6352 family

1. Add mv88e6352_reset which calls the previous ops->reset function
 - mv88e6352_g1_reset.
2. Make all 6352 family use this new function as ops->reset

Co-developed-by: Thomas Eckerman <thomas.eckerman.ext@ericsson.com>
Signed-off-by: Thomas Eckerman <thomas.eckerman.ext@ericsson.com>
Signed-off-by: Fidan Aliyeva <fidan.aliyeva.ext@ericsson.com>
Link: https://patch.msgid.link/20260521202924.727929-2-fidan.aliyeva.ext@ericsson.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agoMerge branch 'net-mdio-realtek-rtl9300-groundwork-for-multi-soc-support'
Paolo Abeni [Tue, 26 May 2026 09:56:18 +0000 (11:56 +0200)] 
Merge branch 'net-mdio-realtek-rtl9300-groundwork-for-multi-soc-support'

Markus Stockhausen says:

====================
net: mdio: realtek-rtl9300: Groundwork for multi SOC support

The Realtek Otto switch platform consist of four different series

- RTL838x aka maple   : 28 port 1G Switches
- RTL839x aka cypress : 52 port 1G Switches
- RTL930x aka longan  : 28 port 1G/2.5G/10G Switches
- RTL931x aka mango   : 56 port 1G/2.5G/10G Switches

The existing realtek-rtl9300 MDIO driver was only designed for RTL930x
devices. The three other SOCs are not supported although they basically
incorporate a very similar MDIO controller.

This series is the first step in a multi-stage approach to also support
the missing SOCs. Device specific properties and registers are converted
into designated initializers. Based on this new devices can be added
much easier in future commits.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
====================

Link: https://patch.msgid.link/20260521175918.1494797-1-markus.stockhausen@gmx.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agonet: mdio: realtek-rtl9300: Link I/O functions in info structure
Markus Stockhausen [Thu, 21 May 2026 17:59:18 +0000 (19:59 +0200)] 
net: mdio: realtek-rtl9300: Link I/O functions in info structure

The MDIO controller registers of the different devices of the
Realtek Otto switch series are very similar. Nevertheless each
device will need to feed the whole command data distributed over
the controller registers slightly different.

E.g. the combined C22/command register has different field layouts.
On RTL930x bits 24-20 define the to-be-accessed C22 register number
while on RTL839x this is stored in bits 9-5.

Thus there need to be device specific read/write functions that
are called dynamically. Add them into the info structure and make
use of them where needed.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://patch.msgid.link/20260521175918.1494797-10-markus.stockhausen@gmx.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agonet: mdio: realtek-rtl9300: Add port mask register
Markus Stockhausen [Thu, 21 May 2026 17:59:17 +0000 (19:59 +0200)] 
net: mdio: realtek-rtl9300: Add port mask register

MDIO controller commands work on ports. These are converted by
the driver and hardware forth and back to bus/address. For write
commands a port mask register needs to be filled. Each bit tells the
controller to which PHY the write will be issued. Setting multiple
bits allows to program multiple PHYs in one step. The driver will
not make use of this parallel write feature. But it must at least
fill the bit of the target port that it wants to write to.

Depending on the SOC type and the number of supported PHYs this is
either one or two 32 bit port mask registers. The driver currently only
supports the 28 port RTL930x SOCs. So provide only the mask register
for the lower 32 ports. Add it to the register structure and make use
of it where needed.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://patch.msgid.link/20260521175918.1494797-9-markus.stockhausen@gmx.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agonet: mdio: realtek-rtl9300: Add I/O register
Markus Stockhausen [Thu, 21 May 2026 17:59:16 +0000 (19:59 +0200)] 
net: mdio: realtek-rtl9300: Add I/O register

The MDIO data that needs to be written or read to registers of the
controller is handled by an I/O register. Add that to the register
structure and make use of it where needed.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://patch.msgid.link/20260521175918.1494797-8-markus.stockhausen@gmx.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agonet: mdio: realtek-rtl9300: Add command/C22 register
Markus Stockhausen [Thu, 21 May 2026 17:59:15 +0000 (19:59 +0200)] 
net: mdio: realtek-rtl9300: Add command/C22 register

Command issuing/status bits and C22 data share the same register. In the
future the number of places where this register is used will be:

- One generic command helper/runner for all devices that will access the
  command bits of the register
- 8 device specific C22 read/write functions that will access the C22
  data fields.

Thus name the register c22_data to align with the existing c45_data
register. This way all device specific helpers will have a common
view on the to-be-fed data. Add the register to the existing structure
and make use of it where needed.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://patch.msgid.link/20260521175918.1494797-7-markus.stockhausen@gmx.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agonet: mdio: realtek-rtl9300: Add register structure
Markus Stockhausen [Thu, 21 May 2026 17:59:14 +0000 (19:59 +0200)] 
net: mdio: realtek-rtl9300: Add register structure

The MDIO controller of the Realtek Otto switches has either 4 or 7 command
registers. This depends on the number of supported ports. These registers
are "scattered" around the MMIO block and their addresses depend on the
specific model.

Nevertheless all command registers share a common pattern:

- A mask register with one bit per addressed port
  (remark: the driver internally works on ports instead of bus/address)
- A I/O data register that transfers the to be read/written data
- A C45 registers that takes devnum and regnum
- A C22 register that also includes run and status bits
  (remark: this also takes the Realtek proprietary C22 PHY page)

Provide an additional structure for these command registers so it can be
reused in two places.

1. For defining the register addresses in the regmap.
2. For defining the to be read/written register data

This will finally result in access patterns like

static int otto_emdio_run_cmd(u32 cmd,
                              struct rtl_mdio_cmd_regs *cmd_regs, ...)
{
  regmap_write(regmap, priv->info->reg->cmd_regs.c45_data,
                       cmd_regs->c45_data);
  ...
}

static int otto_emdio_9300_write_c45(...)
{
  struct otto_emdio_cmd_regs cmd_regs = {
    .c45_data  = ...
    .io_data   = ...,
    .port_mask = ...,
  };

  return otto_emdio_run_cmd(RTL9300_CMD_WRITE_C45, &cmd_regs, ...);
}

As a first step start with the C45 register. This one takes the
devnum/regnum data that is stored in the high/low 16 bits.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://patch.msgid.link/20260521175918.1494797-6-markus.stockhausen@gmx.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>