2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/platform/mellanox
Alok Tiwari 644bec18e7
platform/mellanox: mlxreg-lc: Fix logic error in power state check
Fixes a logic issue in mlxreg_lc_completion_notify() where the
intention was to check if MLXREG_LC_POWERED flag is not set before
powering on the device.

The original code used "state & ~MLXREG_LC_POWERED" to check for the
absence of the POWERED bit. However this condition evaluates to true
even when other bits are set, leading to potentially incorrect
behavior.

Corrected the logic to explicitly check for the absence of
MLXREG_LC_POWERED using !(state & MLXREG_LC_POWERED).

Fixes: 62f9529b8d ("platform/mellanox: mlxreg-lc: Add initial support for Nvidia line card devices")
Suggested-by: Vadim Pasternak <vadimp@nvidia.com>
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Link: https://lore.kernel.org/r/20250630105812.601014-1-alok.a.tiwari@oracle.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-06-30 14:06:55 +03:00
..
Kconfig platform/mellanox: mlxreg-dpu: Add initial support for Nvidia DPU 2025-04-30 14:05:49 +03:00
Makefile platform/mellanox: mlxreg-dpu: Add initial support for Nvidia DPU 2025-04-30 14:05:49 +03:00
mlx-platform.c platform: mellanox: mlx-platform: Add support for new Nvidia system 2025-04-30 14:05:55 +03:00
mlxbf-bootctl.c mlxbf-bootctl: use sysfs_emit_at() in secure_boot_fuse_state_show() 2025-04-11 12:56:52 +03:00
mlxbf-bootctl.h mlxbf-bootctl: Support sysfs entries for RTC battery status 2025-02-03 14:57:27 +02:00
mlxbf-pmc.c platform/mellanox: mlxbf-pmc: Fix duplicate event ID for CACHE_DATA1 2025-06-25 15:31:04 +03:00
mlxbf-tmfifo-regs.h platform/mellanox: Add BlueField-3 support in the tmfifo driver 2022-11-16 08:48:19 +01:00
mlxbf-tmfifo.c platform/mellanox: Fix spelling and comment clarity in Mellanox drivers 2025-06-26 17:11:58 +03:00
mlxreg-dpu.c platform/mellanox: Fix spelling and comment clarity in Mellanox drivers 2025-06-26 17:11:58 +03:00
mlxreg-hotplug.c platform/mellanox: Rename field to improve code readability 2025-04-15 17:14:30 +03:00
mlxreg-io.c platform/mellanox: mlxreg-io: use sysfs_emit() instead of sprintf() 2025-01-20 14:13:22 +02:00
mlxreg-lc.c platform/mellanox: mlxreg-lc: Fix logic error in power state check 2025-06-30 14:06:55 +03:00
nvsw-sn2201.c platform/mellanox: nvsw-sn2201: Fix bus number in adapter error message 2025-06-26 17:14:31 +03:00