dmaengine: idxd: Set traffic class values in GRPCFG on DSA 2.0
Subsystems (2)
PATCH 1/1 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 <[email protected]>
Reviewed-by Dave Jiang <[email protected]>
--- drivers/dma/idxd/device.c | 2 +- drivers/dma/idxd/init.c | 2 +- drivers/dma/idxd/sysfs.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/dma/idxd/device.c +1 -1
@@ -834,7 +834,7 @@ static void idxd_groups_clear_state(struct idxd_device *idxd) group->use_rdbuf_limit = false; group->rdbufs_allowed =0 ; group->rdbufs_reserved =0 ; -if (idxd->hw.version <DEVICE_VERSION_2 && !tc_override) { +if (idxd->hw.version <=DEVICE_VERSION_2 && !tc_override) { group->tc_a =1 ; group->tc_b =1 ; }else {
drivers/dma/idxd/init.c +1 -1
@@ -314,7 +314,7 @@ static int idxd_setup_groups(struct idxd_device *idxd) } idxd->groups[i] = group; -if (idxd->hw.version <DEVICE_VERSION_2 && !tc_override) { +if (idxd->hw.version <=DEVICE_VERSION_2 && !tc_override) { group->tc_a =1 ; group->tc_b =1 ; }else {
drivers/dma/idxd/sysfs.c +2 -2
@@ -388,7 +388,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 )
@@ -430,7 +430,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 )
Signature · 1 line
2.32.0
Quoted 5 lines · Fenghua Yu
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.
Applied, thanks
Quoted 61 lines
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 <[email protected]>Reviewed-by Dave Jiang <[email protected]>--- drivers/dma/idxd/device.c | 2 +- drivers/dma/idxd/init.c | 2 +- drivers/dma/idxd/sysfs.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)drivers/dma/idxd/device.c +1
-1@@ -834,7 +834,7 @@ static void idxd_groups_clear_state(struct idxd_device *idxd) group->use_rdbuf_limit = false; group->rdbufs_allowed =0 ; group->rdbufs_reserved =0 ; -if (idxd->hw.version <DEVICE_VERSION_2 && !tc_override) { +if (idxd->hw.version <=DEVICE_VERSION_2 && !tc_override) { group->tc_a =1 ; group->tc_b =1 ; }else {drivers/dma/idxd/init.c +1
-1@@ -314,7 +314,7 @@ static int idxd_setup_groups(struct idxd_device *idxd) } idxd->groups[i] = group; -if (idxd->hw.version <DEVICE_VERSION_2 && !tc_override) { +if (idxd->hw.version <=DEVICE_VERSION_2 && !tc_override) { group->tc_a =1 ; group->tc_b =1 ; }else {drivers/dma/idxd/sysfs.c +2
-2@@ -388,7 +388,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 )@@ -430,7 +430,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 )Signature · 1 line
2.32.0
Signature · 1 line
~Vinod