Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Fenghua Yu and committed by
Vinod Koul
9735bde3 5840c891

+4 -4
+1 -1
drivers/dma/idxd/device.c
··· 701 701 group->use_rdbuf_limit = false; 702 702 group->rdbufs_allowed = 0; 703 703 group->rdbufs_reserved = 0; 704 - if (idxd->hw.version < DEVICE_VERSION_2 && !tc_override) { 704 + if (idxd->hw.version <= DEVICE_VERSION_2 && !tc_override) { 705 705 group->tc_a = 1; 706 706 group->tc_b = 1; 707 707 } else {
+1 -1
drivers/dma/idxd/init.c
··· 295 295 } 296 296 297 297 idxd->groups[i] = group; 298 - if (idxd->hw.version < DEVICE_VERSION_2 && !tc_override) { 298 + if (idxd->hw.version <= DEVICE_VERSION_2 && !tc_override) { 299 299 group->tc_a = 1; 300 300 group->tc_b = 1; 301 301 } else {
+2 -2
drivers/dma/idxd/sysfs.c
··· 387 387 if (idxd->state == IDXD_DEV_ENABLED) 388 388 return -EPERM; 389 389 390 - if (idxd->hw.version < DEVICE_VERSION_2 && !tc_override) 390 + if (idxd->hw.version <= DEVICE_VERSION_2 && !tc_override) 391 391 return -EPERM; 392 392 393 393 if (val < 0 || val > 7) ··· 429 429 if (idxd->state == IDXD_DEV_ENABLED) 430 430 return -EPERM; 431 431 432 - if (idxd->hw.version < DEVICE_VERSION_2 && !tc_override) 432 + if (idxd->hw.version <= DEVICE_VERSION_2 && !tc_override) 433 433 return -EPERM; 434 434 435 435 if (val < 0 || val > 7)