Patch "dmaengine: idxd: Fix issues with PRS disable sysfs knob" has been added to the 6.4-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

    dmaengine: idxd: Fix issues with PRS disable sysfs knob

to the 6.4-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:
     dmaengine-idxd-fix-issues-with-prs-disable-sysfs-kno.patch
and it can be found in the queue-6.4 subdirectory.

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



commit 0abc6409ffba65f0caf8d456db1f09e430240940
Author: Fenghua Yu <fenghua.yu@xxxxxxxxx>
Date:   Thu Aug 10 18:26:35 2023 -0700

    dmaengine: idxd: Fix issues with PRS disable sysfs knob
    
    [ Upstream commit 8cae66574398326134a41513b419e00ad4e380ca ]
    
    There are two issues in the current PRS disable sysfs store function
    wq_prs_disable_store():
    
    1. Since PRS disable knob is invisible if PRS disable is not supported
       in WQ, it's redundant to check PRS support again in the store function
       again. Remove the redundant PRS support check.
    2. Since PRS disable is read-only when the device is not configurable,
       PRS disable cannot be changed on the device. Add device configurable
       check in the store function.
    
    Fixes: f2dc327131b5 ("dmaengine: idxd: add per wq PRS disable")
    Signed-off-by: Fenghua Yu <fenghua.yu@xxxxxxxxx>
    Reviewed-by: Dave Jiang <dave.jiang@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20230811012635.535413-2-fenghua.yu@xxxxxxxxx
    Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/dma/idxd/sysfs.c b/drivers/dma/idxd/sysfs.c
index 66c89b07b3f7b..a5c3eb4348325 100644
--- a/drivers/dma/idxd/sysfs.c
+++ b/drivers/dma/idxd/sysfs.c
@@ -1131,8 +1131,8 @@ static ssize_t wq_prs_disable_store(struct device *dev, struct device_attribute
 	if (wq->state != IDXD_WQ_DISABLED)
 		return -EPERM;
 
-	if (!idxd->hw.wq_cap.wq_prs_support)
-		return -EOPNOTSUPP;
+	if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags))
+		return -EPERM;
 
 	rc = kstrtobool(buf, &prs_dis);
 	if (rc < 0)



[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