diff options
author | Fenghua Yu <fenghua.yu@intel.com> | 2022-12-09 20:21:41 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2022-12-28 10:00:50 +0300 |
commit | 9735bde36487da43d3c3fc910df49639f72decbf (patch) | |
tree | 981096770707936e6f87ef4cdeeeadf0213dc51d /drivers/dma/idxd/sysfs.c | |
parent | 5840c8915a2f2becd760ba3a700ee7832d13c53f (diff) | |
download | linux-9735bde36487da43d3c3fc910df49639f72decbf.tar.xz |
dmaengine: idxd: Set traffic class values in GRPCFG on DSA 2.0
On DSA/IAX 1.0, TC-A and TC-B in GRPCFG are set as 1 to have best
performance and cannot be changed through sysfs knobs unless override
option is given.
The same values should be set on DSA 2.0 as well.
Fixes: ea7c8f598c32 ("dmaengine: idxd: restore traffic class defaults after wq reset")
Fixes: ade8a86b512c ("dmaengine: idxd: Set defaults for GRPCFG traffic class")
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20221209172141.562648-1-fenghua.yu@intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/idxd/sysfs.c')
-rw-r--r-- | drivers/dma/idxd/sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/idxd/sysfs.c b/drivers/dma/idxd/sysfs.c index 3229dfc78650..18cd8151dee0 100644 --- a/drivers/dma/idxd/sysfs.c +++ b/drivers/dma/idxd/sysfs.c @@ -387,7 +387,7 @@ static ssize_t group_traffic_class_a_store(struct device *dev, if (idxd->state == IDXD_DEV_ENABLED) return -EPERM; - if (idxd->hw.version < DEVICE_VERSION_2 && !tc_override) + if (idxd->hw.version <= DEVICE_VERSION_2 && !tc_override) return -EPERM; if (val < 0 || val > 7) @@ -429,7 +429,7 @@ static ssize_t group_traffic_class_b_store(struct device *dev, if (idxd->state == IDXD_DEV_ENABLED) return -EPERM; - if (idxd->hw.version < DEVICE_VERSION_2 && !tc_override) + if (idxd->hw.version <= DEVICE_VERSION_2 && !tc_override) return -EPERM; if (val < 0 || val > 7) |