Skip to content

Commit ea7c8f5

Browse files
davejiangvinodkoul
authored andcommitted
dmaengine: idxd: restore traffic class defaults after wq reset
When clearing the group configurations, the driver fails to restore the default setting for DSA 1.x based devices. Add defaults in idxd_groups_clear_state() for traffic class configuration. Fixes: ade8a86 ("dmaengine: idxd: Set defaults for GRPCFG traffic class") Reported-by: Binuraj Ravindran <binuraj.ravindran@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/164304123369.824298.6952463420266592087.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 7326bf8 commit ea7c8f5

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

drivers/dma/idxd/device.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,13 @@ static void idxd_groups_clear_state(struct idxd_device *idxd)
681681
group->use_rdbuf_limit = false;
682682
group->rdbufs_allowed = 0;
683683
group->rdbufs_reserved = 0;
684-
group->tc_a = -1;
685-
group->tc_b = -1;
684+
if (idxd->hw.version < DEVICE_VERSION_2 && !tc_override) {
685+
group->tc_a = 1;
686+
group->tc_b = 1;
687+
} else {
688+
group->tc_a = -1;
689+
group->tc_b = -1;
690+
}
686691
}
687692
}
688693

0 commit comments

Comments
 (0)