]> git.hungrycats.org Git - linux/commit
dmaengine: idxd: Fix issues with PRS disable sysfs knob
authorFenghua Yu <fenghua.yu@intel.com>
Fri, 11 Aug 2023 01:26:35 +0000 (18:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:48:36 +0000 (09:48 +0200)
commitbfcf280533ad4481022e5c8268a751b094c68a6c
treedf21a2a78ff44442d438d09b911e05ca2e8e67ac
parentdf212ed77384b55bd15ed0ca1cd28f70868f63f7
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@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20230811012635.535413-2-fenghua.yu@intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/idxd/sysfs.c