]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: qat - ignore subsequent state up commands
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Thu, 14 Sep 2023 09:55:47 +0000 (10:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:57:07 +0000 (11:57 +0100)
commit99fe5f7b6c992748eccfe0f786747a48addea642
treedd653620de37bbd168765ec4305f368a59f0f67c
parent36f45cb3d919337190a6534ac4eb8764b39eee07
crypto: qat - ignore subsequent state up commands

[ Upstream commit 9c20cb8b1847dedddec3d5163079290542bf00bf ]

If the device is already in the up state, a subsequent write of `up` to
the sysfs attribute /sys/bus/pci/devices/<BDF>/qat/state brings the
device down.
Fix this behaviour by ignoring subsequent `up` commands if the device is
already in the up state.

Fixes: 1bdc85550a2b ("crypto: qat - fix concurrency issue when device state changes")
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Adam Guerin <adam.guerin@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/intel/qat/qat_common/adf_sysfs.c