aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/pci.c
diff options
context:
space:
mode:
authorAlok Tiwari <[email protected]>2025-06-30 10:58:08 +0000
committerIlpo Järvinen <[email protected]>2025-06-30 11:06:55 +0000
commit644bec18e705ca41d444053407419a21832fcb2f (patch)
treeaa6f94bd9adcd7acbb443910863355152bf8fca8 /rust/helpers/pci.c
parenti2c: Re-enable piix4 driver on non-x86 (diff)
downloadkernel-644bec18e705ca41d444053407419a21832fcb2f.tar.gz
kernel-644bec18e705ca41d444053407419a21832fcb2f.zip
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: 62f9529b8d5c ("platform/mellanox: mlxreg-lc: Add initial support for Nvidia line card devices") Suggested-by: Vadim Pasternak <[email protected]> Signed-off-by: Alok Tiwari <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
Diffstat (limited to 'rust/helpers/pci.c')
0 files changed, 0 insertions, 0 deletions