summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-03-30hwmon: (pmbus/bel-pfe) Remove use of i2c_match_id()Andrew Davis
The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has another benefit: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove that. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20260306171652.951274-2-afd@ti.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (asus_atk0110) Convert ACPI driver to a platform oneRafael J. Wysocki
In all cases in which a struct acpi_driver is used for binding a driver to an ACPI device object, a corresponding platform device is created by the ACPI core and that device is regarded as a proper representation of underlying hardware. Accordingly, a struct platform_driver should be used by driver code to bind to that device. There are multiple reasons why drivers should not bind directly to ACPI device objects [1]. Overall, it is better to bind drivers to platform devices than to their ACPI companions, so convert the asus_atk0110 ACPI driver to a platform one. After this change, the subordinate hwmon device will be registered under the platform device used for driver binding and messages will be printed relative to that device instead of its ACPI companion. While this is not expected to alter functionality, it changes sysfs layout and so it will be visible to user space. Link: https://lore.kernel.org/all/2396510.ElGaqSPkdT@rafael.j.wysocki/ [1] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lore.kernel.org/r/3691136.iIbC2pHGDl@rafael.j.wysocki Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (ltc4282) Add default rsense valueNuno Sá
Instead of failing probe when the "adi,rsense-nano-ohms" firmware property is not provided, default rsense to (NANO/MILLI), or 1 milli-Ohm. This allows the device to probe without requiring firmware properties, which might be useful for some high level testing. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20260304-hwmon-ltc4282-minor-improvs-v1-2-344622924d3a@analog.com [groeck: Clarify that the default is 1 milli-Ohm. No functional change.] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30docs: hwmon: ltc4282: Fix scanned addressesNuno Sá
The LTC4282 driver does not implement an I2C .detect() callback, meaning no I2C address scanning is performed. Update the documentation to reflect this by replacing the listed I2C address ranges with "-". Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20260304-hwmon-ltc4282-minor-improvs-v1-1-344622924d3a@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (gpio-fan) Drop unneeded dependency on OF_GPIOBartosz Golaszewski
OF_GPIO is selected automatically on all OF systems. Any symbols it controls also provide stubs so there's really no reason to select it explicitly. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260304-gpio-of-kconfig-v1-9-d597916e79e7@oss.qualcomm.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (emc1403) Replace sprintf() with sysfs_emit()Amay Agarwal
Replace sprintf() with sysfs_emit() when writing to sysfs buffers. sysfs_emit() performs proper bounds checking and is the preferred helper for sysfs output. No functional change intended. Signed-off-by: Amay Agarwal <tt@turingtested.xyz> Link: https://lore.kernel.org/r/20260303152456.35763-6-tt@turingtested.xyz Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (max6650) Replace sprintf() with sysfs_emit()Amay Agarwal
Replace sprintf() with sysfs_emit() when writing to sysfs buffers. sysfs_emit() performs proper bounds checking and is the preferred helper for sysfs output. No functional change intended. Signed-off-by: Amay Agarwal <tt@turingtested.xyz> Link: https://lore.kernel.org/r/20260303152456.35763-5-tt@turingtested.xyz Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (ads7828) Replace sprintf() with sysfs_emit()Amay Agarwal
Replace sprintf() with sysfs_emit() when writing to sysfs buffers. sysfs_emit() performs proper bounds checking and is the preferred helper for sysfs output. No functional change intended. Signed-off-by: Amay Agarwal <tt@turingtested.xyz> Link: https://lore.kernel.org/r/20260303152456.35763-4-tt@turingtested.xyz [groeck: Fixed continuation line alignment] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (max31722) Replace sprintf() with sysfs_emit()Amay Agarwal
Replace sprintf() with sysfs_emit() when writing to sysfs buffers. sysfs_emit() performs proper bounds checking and is the preferred helper for sysfs output. No functional change intended. Signed-off-by: Amay Agarwal <tt@turingtested.xyz> Link: https://lore.kernel.org/r/20260303152456.35763-3-tt@turingtested.xyz Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (tc74) Replace sprintf() with sysfs_emit()Amay Agarwal
Replace sprintf() with sysfs_emit() when writing to sysfs buffers. sysfs_emit() performs proper bounds checking and is the preferred helper for sysfs output. No functional change intended Signed-off-by: Amay Agarwal <tt@turingtested.xyz> Link: https://lore.kernel.org/r/20260303152456.35763-2-tt@turingtested.xyz Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (ina2xx) Shift INA234 shunt and current registersJonas Rebmann
The INA219 has the lowest three bits of the bus voltage register zero-reserved, the bus_voltage_shift ina2xx_config field was introduced to accommodate for that. The INA234 has four bits of the bus voltage, of the shunt voltage, and of the current registers zero-reserved but the latter two were implemented by choosing a 16x higher shunt_div instead of a separate field specifying a bit shift. This is possible because shunt voltage and current are divided by shunt_div, hence a 16x higher shunt_div results in a 16x smaller LSB for both the shunt voltage and the current register, perfectly accounting for the missing bit shift. For consistency and correctness, account for the reserved bits via shunt_voltage_shift and current_shift configuration fields as already done for voltage registers and use the conversion constants given in the INA234 datasheet. Signed-off-by: Jonas Rebmann <jre@pengutronix.de> Link: https://lore.kernel.org/r/20260303-ina234-shift-v1-2-318c33ac4480@pengutronix.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (ina2xx) clean up unused define and outdated commentJonas Rebmann
The list of supported chips in the header is incomplete and contains no other information not readily available. Remove the list and instead hint that the chips supported by this driver have 219/226 compatible register layout [unlike the ones supported by e.g. ina238]. Remove the unused INA226_DIE_ID define. Signed-off-by: Jonas Rebmann <jre@pengutronix.de> Link: https://lore.kernel.org/r/20260303-ina234-shift-v1-1-318c33ac4480@pengutronix.de [groeck: macro -> define in commit message] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: Add LattePanda Sigma EC driverMariano Abad
Add hardware monitoring support for the LattePanda Sigma SBC (DFRobot, ITE IT8613E EC). The driver reads fan speed and temperatures via direct port I/O, as the BIOS disables the ACPI EC interface. Signed-off-by: Mariano Abad <weimaraner@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (acpi_power_meter) Convert ACPI driver to a platform oneRafael J. Wysocki
In all cases in which a struct acpi_driver is used for binding a driver to an ACPI device object, a corresponding platform device is created by the ACPI core and that device is regarded as a proper representation of underlying hardware. Accordingly, a struct platform_driver should be used by driver code to bind to that device. There are multiple reasons why drivers should not bind directly to ACPI device objects [1]. Overall, it is better to bind drivers to platform devices than to their ACPI companions, so convert the hwmon ACPI power meter driver to a platform one. After this change, the subordinate hwmon device will be registered under the platform device representing the ACPI power meter, sysfs notifications will trigger on that device, and diagnostic messages will be printed relative to it instead of its ACPI companion. Link: https://lore.kernel.org/all/2396510.ElGaqSPkdT@rafael.j.wysocki/ [1] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lore.kernel.org/r/1952740.tdWV9SEqCh@rafael.j.wysocki Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (acpi_power_meter) Register ACPI notify handler directlyRafael J. Wysocki
To facilitate subsequent conversion of the driver to a platform one, make it install an ACPI notify handler directly instead of using a .notify() callback in struct acpi_driver. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lore.kernel.org/r/2405555.ElGaqSPkdT@rafael.j.wysocki Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (acpi_power_meter) Drop redundant checks from three functionsRafael J. Wysocki
Since acpi_power_meter_notify() and acpi_power_meter_remove() are .notify() and .remove() callback functions of an ACPI driver, respectively, the first argument of the former and the only argument of the latter cannot be NULL. Likewise, the acpi_power_meter_resume() argument cannot be NULL because it is a system resume callback function. Moreover, since all of these functions can only run after acpi_power_meter_add() has returned 0, the driver_data field in the struct acpi_device object used by them cannot be NULL either. Accordingly, drop the redundant "device" checks against NULL from acpi_power_meter_notify() and acpi_power_meter_remove(), drop the redundant "dev" check against NULL from acpi_power_meter_resume(), and drop the redundant acpi_driver_data() checks against NULL from all of these functions. Additionally, combine the initialization of the "resource" local variable in acpi_power_meter_notify() and acpi_power_meter_remove() with its declaration. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lore.kernel.org/r/5085645.31r3eYUQgx@rafael.j.wysocki Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: tmp102: Add support for TMP110 and TMP113 devicesFlaviu Nistor
TMP110 and TMP113 temperature sensors are software compatible with TMP102 sensor but have different accuracy (maximum error). Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com> Link: https://lore.kernel.org/r/20260225095132.29954-1-flaviu.nistor@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (asus-ec-sensors) add ROG STRIX Z790-H GAMING WIFIVolodimir Buchakchiyskiy
Add limited support for ROG STRIX Z790-H GAMING WIFI (VRM temp and T_Sensor only). Signed-off-by: Volodimir Buchakchiyskiy <vladimirbuchakchiiskiy@gmail.com> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20260228114412.358148-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30dt-bindings: hwmon: convert npcm750-pwm-fan to DT schemaTomer Maimon
Convert the Nuvoton HWMON PWM and FAN controllers binding to schema format. Signed-off-by: Tomer Maimon <tmaimon77@gmail.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20260215163553.1334475-1-tmaimon77@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon:(pmbus/xdpe1a2g7b) Add support for xdpe1a2g5b/7b controllersAshish Yadav
Add the pmbus driver for Infineon Digital Multi-phase XDPE1A2G5B and XDPE1A2G7B controllers. Signed-off-by: Ashish Yadav <ashish.yadav@infineon.com> Link: https://lore.kernel.org/r/20260223050804.4287-4-Ashish.Yadav@infineon.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (pmbus/core) Add support for NVIDIA nvidia195mv modeAshish Yadav
Extend the PMBus core vrm_version handling to support NVIDIA nvidia195mv VID mode. This adds a new VRM/VID encoding type and the corresponding voltage conversion logic so devices reporting nvidia195mv can have their VOUT/VID values interpreted correctly by the hwmon PMBus core. Signed-off-by: Ashish Yadav <ashish.yadav@infineon.com> Link: https://lore.kernel.org/r/20260223050804.4287-3-Ashish.Yadav@infineon.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30dt-bindings: trivial-devices: Add support for XDPE1A2G5B/7BAshish Yadav
Add Infineon Digital Multi-phase XDPE1A2G5B and XDPE1A2G7B Controllers to trivial devices. Signed-off-by: Ashish Yadav <ashish.yadav@infineon.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20260223050804.4287-2-Ashish.Yadav@infineon.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (aht10) add device tree ID matchingHao Yu
Add of_device_id table to allow the driver to be matched via Device Tree. This is required for supporting the AHT10/20/DHT20 sensors on platforms using DT. Signed-off-by: Hao Yu <haoyufine@gmail.com> Link: https://lore.kernel.org/r/20260223173853.30617-3-haoyufine@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30dt-bindings: hwmon: add Aosong AHT10/AHT20/DHT20 to trivial devicesHao Yu
Add Aosong AHT10, AHT20 and DHT20 temperature and humidity sensors to the trivial-devices documentation. These sensors use a standard I2C interface and do not require complex binding definitions. Signed-off-by: Hao Yu <haoyufine@gmail.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260223173853.30617-2-haoyufine@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (ina2xx) Add support for INA234Ian Ray
INA234 is register compatible to INA226 (excepting manufacturer and die or device id registers) but has different scaling. Signed-off-by: Ian Ray <ian.ray@gehealthcare.com> Reviewed-by: Bence Csókás <bence98@sch.bme.hu> # v2 Tested-by: Jens Almer <bagawk@gmail.com> Tested-by: Jonas Rebmann <jre@pengutronix.de> Link: https://lore.kernel.org/r/20260220112024.97446-4-ian.ray@gehealthcare.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (ina2xx) Make it easier to add more devicesIan Ray
* Make sysfs entries documentation easier to maintain. * Use multi-line enum. * Correct "has_power_average" comment. Create a new "has_update_interval" member for chips which support averaging. Signed-off-by: Ian Ray <ian.ray@gehealthcare.com> Reviewed-by: Bence Csókás <bence98@sch.bme.hu> # v2 Tested-by: Jens Almer <bagawk@gmail.com> Link: https://lore.kernel.org/r/20260220112024.97446-3-ian.ray@gehealthcare.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30dt-bindings: hwmon: ti,ina2xx: Add INA234 deviceIan Ray
Add a compatible string for the INA234 device, which is like INA226 but has different scaling. Note that the device tree compatible must be different since the driver uses the compatible to configure the scaling. Signed-off-by: Ian Ray <ian.ray@gehealthcare.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> # v1 Tested-by: Jens Almer <bagawk@gmail.com> Link: https://lore.kernel.org/r/20260220112024.97446-2-ian.ray@gehealthcare.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (gpd-fan) Add GPD Win 5Antheas Kapenekakis
The GPD Win 5 is a new device by GPD with an AMD AI MAX 385/395 chip. It uses the same fan control registers as the GPD Win Duo. This information was provided by GPD. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> Link: https://lore.kernel.org/r/20260220161601.2344291-1-lkml@antheas.dev Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (asus-ec-sensors) add ROG STRIX X470-F GAMINGVarasina Farmadani
Add support for ROG STRIX X470-F GAMING Signed-off-by: Varasina Farmadani <sina@sinanonym.my.id> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20260215151743.20138-4-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (asus-ec-sensors )add ROG CROSSHAIR X670E EXTREMETimothy C. Sweeney-Fanelli
Add support for ROG CROSSHAIR X670E EXTREME Signed-off-by: Timothy C. Sweeney-Fanelli <tim@zerobytellc.com> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20260215151743.20138-3-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (bt1-pvt) Remove not-going-to-be-supported code for Baikal SoCAndy Shevchenko
As noticed in the discussion [1] the Baikal SoC and platforms are not going to be finalized, hence remove stale code. Link: https://lore.kernel.org/lkml/22b92ddf-6321-41b5-8073-f9c7064d3432@infradead.org/ [1] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20260220143500.2401057-1-andriy.shevchenko@linux.intel.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30arm64: dts: intel: agilex5: Drop CPU masks from GICv3 PPI interruptsGeert Uytterhoeven
Unlike older GIC variants, the GICv3 DT bindings do not support specifying a CPU mask in PPI interrupt specifiers. Drop the masks. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
2026-03-30dt-bindings: intel: Add Agilex5 SoCFPGA modular boardDinh Nguyen
Add compatible for Agilex5 SoCFPGA modular board. Signed-off-by: Niravkumar L Rabara <niravkumarlaxmidas.rabara@altera.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
2026-03-30FDDI: defxx: Rate-limit memory allocation errorsMaciej W. Rozycki
Prevent the system from becoming unstable or unusable due to a flood of memory allocation error messages under memory pressure, e.g.: [...] fddi0: Could not allocate receive buffer. Dropping packet. fddi0: Could not allocate receive buffer. Dropping packet. fddi0: Could not allocate receive buffer. Dropping packet. fddi0: Could not allocate receive buffer. Dropping packet. rcu: INFO: rcu_sched self-detected stall on CPU rcu: 0-...!: (332 ticks this GP) idle=255c/1/0x40000000 softirq=16420123/16420123 fqs=0 rcu: (t=2103 jiffies g=35680089 q=4 ncpus=1) rcu: rcu_sched kthread timer wakeup didn't happen for 2102 jiffies! g35680089 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 rcu: Possible timer handling issue on cpu=0 timer-softirq=12779658 rcu: rcu_sched kthread starved for 2103 jiffies! g35680089 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=0 rcu: Unless rcu_sched kthread gets sufficient CPU time, OOM is now expected behavior. rcu: RCU grace-period kthread stack dump: task:rcu_sched state:I stack:0 pid:14 tgid:14 ppid:2 flags:0x00004000 Call Trace: __schedule+0x258/0x580 schedule+0x19/0xa0 schedule_timeout+0x4a/0xb0 ? hrtimers_cpu_dying+0x1b0/0x1b0 rcu_gp_fqs_loop+0xb1/0x450 rcu_gp_kthread+0x9d/0x130 kthread+0xb2/0xe0 ? rcu_gp_init+0x4a0/0x4a0 ? kthread_park+0x90/0x90 ret_from_fork+0x2d/0x50 ? kthread_park+0x90/0x90 ret_from_fork_asm+0x12/0x20 entry_INT80_32+0x10d/0x10d CPU: 0 UID: 500 PID: 21895 Comm: 31370.exe Not tainted 6.13.0-dirty #2 (here running the libstdc++-v3 testsuite). Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/alpine.DEB.2.21.2603291236590.60268@angie.orcam.me.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-30FDDI: defza: Rate-limit memory allocation errorsMaciej W. Rozycki
Prevent the system from becoming unstable or unusable due to a flood of memory allocation error messages under memory pressure. Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/alpine.DEB.2.21.2603291252380.60268@angie.orcam.me.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-30bnxt_en: set backing store type from query typePengpeng Hou
bnxt_hwrm_func_backing_store_qcaps_v2() stores resp->type from the firmware response in ctxm->type and later uses that value to index fixed backing-store metadata arrays such as ctx_arr[] and bnxt_bstore_to_trace[]. ctxm->type is fixed by the current backing-store query type and matches the array index of ctx->ctx_arr. Set ctxm->type from the current loop variable instead of depending on resp->type. Also update the loop to advance type from next_valid_type in the for statement, which keeps the control flow simpler for non-valid and unchanged entries. Fixes: 6a4d0774f02d ("bnxt_en: Add support for new backing store query firmware API") Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Reviewed-by: Michael Chan <michael.chan@broadcom.com> Tested-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20260328234357.43669-1-pengpeng@iscas.ac.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-30net: airoha: Delay offloading until all net_devices are fully registeredLorenzo Bianconi
Netfilter flowtable can theoretically try to offload flower rules as soon as a net_device is registered while all the other ones are not registered or initialized, triggering a possible NULL pointer dereferencing of qdma pointer in airoha_ppe_set_cpu_port routine. Moreover, if register_netdev() fails for a particular net_device, there is a small race if Netfilter tries to offload flowtable rules before all the net_devices are properly unregistered in airoha_probe() error patch, triggering a NULL pointer dereferencing in airoha_ppe_set_cpu_port routine. In order to avoid any possible race, delay offloading until all net_devices are registered in the networking subsystem. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://patch.msgid.link/20260329-airoha-regiser-race-fix-v2-1-f4ebb139277b@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-30net: sched: cls_api: fix tc_chain_fill_node to initialize tcm_info to zero ↵Yochai Eisenrich
to prevent an info-leak When building netlink messages, tc_chain_fill_node() never initializes the tcm_info field of struct tcmsg. Since the allocation is not zeroed, kernel heap memory is leaked to userspace through this 4-byte field. The fix simply zeroes tcm_info alongside the other fields that are already initialized. Fixes: 32a4f5ecd738 ("net: sched: introduce chain object to uapi") Signed-off-by: Yochai Eisenrich <echelonh@gmail.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Link: https://patch.msgid.link/20260328211436.1010152-1-echelonh@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-30udmabuf: fix DMA direction mismatch in release_udmabuf()Mikhail Gavrilov
begin_cpu_udmabuf() maps the sg_table with the caller-provided direction (e.g., DMA_TO_DEVICE for a write-only sync), and caches it in ubuf->sg for reuse. However, release_udmabuf() always unmaps this sg_table with a hardcoded DMA_BIDIRECTIONAL, regardless of the direction that was originally used for the mapping. With CONFIG_DMA_API_DEBUG=y this produces: DMA-API: misc udmabuf: device driver frees DMA memory with different direction [device address=0x000000044a123000] [size=4096 bytes] [mapped with DMA_TO_DEVICE] [unmapped with DMA_BIDIRECTIONAL] The issue was found during video playback when GStreamer performed a write-only DMA_BUF_IOCTL_SYNC on a udmabuf. It can be reproduced with CONFIG_DMA_API_DEBUG=y by creating a udmabuf from a memfd, performing a write-only sync (DMA_BUF_SYNC_WRITE without DMA_BUF_SYNC_READ), and closing the file descriptor. Fix this by storing the DMA direction used when the sg_table is first created in begin_cpu_udmabuf(), and passing that same direction to put_sg_table() in release_udmabuf(). Fixes: 284562e1f348 ("udmabuf: implement begin_cpu_access/end_cpu_access hooks") Cc: stable@vger.kernel.org Signed-off-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com> Reviewed-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Link: https://patch.msgid.link/20260314232722.15555-1-mikhail.v.gavrilov@gmail.com
2026-03-30udmabuf: Do not create malformed scatterlistsJason Gunthorpe
Using a sg_set_folio() loop for every 4K results in a malformed scatterlist because sg_set_folio() has an issue with offsets > PAGE_SIZE and because scatterlist expects the creator to build a list which consolidates any physical contiguity. sg_alloc_table_from_pages() creates a valid scatterlist directly from a struct page array, so go back to that. Remove the offsets allocation and just store an array of tail pages as it did before the below commit. Everything wants that anyhow. Fixes: 0c8b91ef5100 ("udmabuf: add back support for mapping hugetlb pages") Reported-by: Julian Orth <ju.orth@gmail.com> Closes: https://lore.kernel.org/all/20260308-scatterlist-v1-1-39c4566b0bba@gmail.com/ Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Link: https://patch.msgid.link/0-v1-42779f29381a+4b9-udmabuf_sg_jgg@nvidia.com
2026-03-30Merge branch 'net-stmmac-qcom-ethqos-more-cleanups'Jakub Kicinski
Russell King says: ==================== net: stmmac: qcom-ethqos: more cleanups Further cleanups to qcom-ethqos, mainly concentrating on the RGMII code, making it clearer what the differences are for each speed, thus making the code more readable. I'm still not really happy with this. The speed specific configuration remains split between ethqos_fix_mac_speed_rgmii() and ethqos_rgmii_macro_init(), where the latter is only ever called from the former. So, I think further work is needed here - maybe it needs restructuring into the various componenet parts of the RGMII block? ==================== Link: https://patch.msgid.link/acZDEg9wdjhBTHlL@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-30net: stmmac: qcom-ethqos: move phase_shift to register update siteRussell King (Oracle)
Move the determination of the phase shift enable alongside the register update, and make "phase_shift" unsigned. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Link: https://patch.msgid.link/E1w62o3-0000000E3DE-3Vf8@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-30net: stmmac: qcom-ethqos: correct prg_rclk_dly commentRussell King (Oracle)
The comment for calculating the prg_rclk_dly value is incorrect as it omits the brackets around the divisor. Add the brackets to allow the reader to correctly evaluate the value. Validated with the values given in the driver. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Link: https://patch.msgid.link/E1w62ny-0000000E3D8-38Yp@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-30net: stmmac: qcom-ethqos: move loopback decision next to reg updateRussell King (Oracle)
Move the loopback decision next to the register update, and make the local variable unsigned. As a result, there is now no need for the comment referring to the programming being later. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Link: https://patch.msgid.link/E1w62nt-0000000E3D2-2fWk@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-30net: stmmac: qcom-ethqos: simplify prg_rclk_dly programmingRussell King (Oracle)
Rather than coding the entire register update twice with different values, use a local variable to specify the value and have one register update statement that uses this local variable. This results in neater code. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Link: https://patch.msgid.link/E1w62no-0000000E3Cw-2EmH@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-30net: stmmac: qcom-ethqos: finally eliminate the switchRussell King (Oracle)
Move the RCLK delay configuration out of the switch, which just leaves the RGMII_CONFIG_LOOPBACK_EN setting in all three paths. This makes it trivial to eliminate the switch. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Link: https://patch.msgid.link/E1w62nj-0000000E3Cq-1lPL@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-30net: stmmac: qcom-ethqos: move RGMII_CONFIG2_RX_PROG_SWAPRussell King (Oracle)
Move RGMII_CONFIG2_RX_PROG_SWAP out of the switch. 1G speed always sets this field. 100M and 10M sets it for has_emac_ge_3 devices, otherwise it is cleared. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Link: https://patch.msgid.link/E1w62ne-0000000E3Ck-1Haf@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-30net: stmmac: qcom-ethqos: move RGMII_CONFIG2_RSVD_CONFIG15 outRussell King (Oracle)
All paths through the switch clear the RGMII_CONFIG2_RSVD_CONFIG15 field. move it out of the switch statement. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Link: https://patch.msgid.link/E1w62nZ-0000000E3Ce-0lyP@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-30net: stmmac: qcom-ethqos: move 100M/10M speed programmingRussell King (Oracle)
Move the speed programming for 100M and 10M out of the switch. There is no programming done for 1G speed. It looks like there are two fields, 7:6 which are programemd to '1' to select a /2 divisor for 100M, and bits 16:8 which are programmed to '19' to select a /20 divisor. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Link: https://patch.msgid.link/E1w62nU-0000000E3CX-0KF9@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-30net: stmmac: qcom-ethqos: move two more RGMII_IO_MACRO_CONFIG2 outRussell King (Oracle)
RGMII_CONFIG2_DATA_DIVIDE_CLK_SEL is always cleared, and RGMII_CONFIG2_TX_CLK_PHASE_SHIFT_EN is always updated with the phase shift in each path through the switch, so these are independent of the speed. Move them out. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Link: https://patch.msgid.link/E1w62nO-0000000E3CR-445p@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>