summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSean Anderson <sean.anderson@seco.com>2022-09-03 00:57:35 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-13 13:50:07 +0300
commite2bd2df406edd2dff1b105f9dea3c502ee5808c3 (patch)
tree0d3fc2d5387565af18bacba7ca2f1a6d822eaa6c /include
parent99fe1b21b5e5bf69d351adca3c594c46c5bf155b (diff)
downloadlinux-e2bd2df406edd2dff1b105f9dea3c502ee5808c3.tar.xz
soc: fsl: qbman: Add CGR update function
[ Upstream commit 914f8b228ede709274b8c80514b352248ec9da00 ] This adds a function to update a CGR with new parameters. qman_create_cgr can almost be used for this (with flags=0), but it's not suitable because it also registers the callback function. The _safe variant was modeled off of qman_cgr_delete_safe. However, we handle multiple arguments and a return value. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Acked-by: Camelia Groza <camelia.groza@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net> Stable-dep-of: fbec4e7fed89 ("soc: fsl: qbman: Use raw spinlock for cgr_lock") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/soc/fsl/qman.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/soc/fsl/qman.h b/include/soc/fsl/qman.h
index 597783b8a3a0..b67f2e83bbef 100644
--- a/include/soc/fsl/qman.h
+++ b/include/soc/fsl/qman.h
@@ -1160,6 +1160,15 @@ int qman_delete_cgr(struct qman_cgr *cgr);
void qman_delete_cgr_safe(struct qman_cgr *cgr);
/**
+ * qman_update_cgr_safe - Modifies a congestion group object from any CPU
+ * @cgr: the 'cgr' object to modify
+ * @opts: state of the CGR settings
+ *
+ * This will select the proper CPU and modify the CGR settings.
+ */
+int qman_update_cgr_safe(struct qman_cgr *cgr, struct qm_mcc_initcgr *opts);
+
+/**
* qman_query_cgr_congested - Queries CGR's congestion status
* @cgr: the 'cgr' object to query
* @result: returns 'cgr's congestion status, 1 (true) if congested