diff options
author | Sean Anderson <sean.anderson@seco.com> | 2022-09-03 00:57:35 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-13 13:51:27 +0300 |
commit | f248ecc18665b69f4d295d4097920a3661273022 (patch) | |
tree | 8ca1127f083c4b7f39068d9b5e9763b50a74b180 /include | |
parent | 6e9629518cf8e4da0245a1c3bf2c62f9ba1e9388 (diff) | |
download | linux-f248ecc18665b69f4d295d4097920a3661273022.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.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/soc/fsl/qman.h b/include/soc/fsl/qman.h index aa31c05a103a..f9c622027d85 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 |