Patch "crypto: qat - ignore subsequent state up commands" has been added to the 6.5-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    crypto: qat - ignore subsequent state up commands

to the 6.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     crypto-qat-ignore-subsequent-state-up-commands.patch
and it can be found in the queue-6.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 0392817bcf275e43834a28c123e9d669de5e4bab
Author: Giovanni Cabiddu <giovanni.cabiddu@xxxxxxxxx>
Date:   Thu Sep 14 10:55:47 2023 +0100

    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@xxxxxxxxx>
    Reviewed-by: Adam Guerin <adam.guerin@xxxxxxxxx>
    Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/crypto/intel/qat/qat_common/adf_sysfs.c b/drivers/crypto/intel/qat/qat_common/adf_sysfs.c
index a8f33558d7cb8..8880af1aa1b5b 100644
--- a/drivers/crypto/intel/qat/qat_common/adf_sysfs.c
+++ b/drivers/crypto/intel/qat/qat_common/adf_sysfs.c
@@ -68,7 +68,9 @@ static ssize_t state_store(struct device *dev, struct device_attribute *attr,
 		dev_info(dev, "Starting device qat_dev%d\n", accel_id);
 
 		ret = adf_dev_up(accel_dev, true);
-		if (ret < 0) {
+		if (ret == -EALREADY) {
+			break;
+		} else if (ret) {
 			dev_err(dev, "Failed to start device qat_dev%d\n",
 				accel_id);
 			adf_dev_down(accel_dev, true);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux