Commit ea7c8f59 authored by Dave Jiang's avatar Dave Jiang Committed by Vinod Koul
Browse files

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: ade8a86b ("dmaengine: idxd: Set defaults for GRPCFG traffic class")
Reported-by: default avatarBinuraj Ravindran <binuraj.ravindran@intel.com>
Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/164304123369.824298.6952463420266592087.stgit@djiang5-desk3.ch.intel.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 7326bf80
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -681,10 +681,15 @@ 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) {
			group->tc_a = 1;
			group->tc_b = 1;
		} else {
			group->tc_a = -1;
			group->tc_b = -1;
		}
	}
}

static void idxd_device_wqs_clear_state(struct idxd_device *idxd)
{