* [PATCH 1/1] cxl/feature: Update rpc_out in set feature failure case
@ 2025-04-09 2:12 Li Ming
2025-04-09 2:27 ` Li Ming
0 siblings, 1 reply; 2+ messages in thread
From: Li Ming @ 2025-04-09 2:12 UTC (permalink / raw)
To: dave, jonathan.cameron, dave.jiang, alison.schofield,
vishal.l.verma, ira.weiny, dan.j.williams
Cc: linux-cxl, linux-kernel, Li Ming
CXL subsystem supports userspace to configure component features via
fwctl interface, it will configure features by using Set Feature
command. Whatever Set Feature succeeds or fails, CXL subsystem always
needs to return a structure fwctl_rpc_cxl_out to caller, and returned
size is updated in a rpc_out parameter. The rpc_out is only updated in
success case at this moment, it should also be updated in failure cases.
Signed-off-by: Li Ming <ming.li@zohomail.com>
---
drivers/cxl/core/features.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cxl/core/features.c b/drivers/cxl/core/features.c
index fcc624cefe89..63f24f032209 100644
--- a/drivers/cxl/core/features.c
+++ b/drivers/cxl/core/features.c
@@ -540,13 +540,13 @@ static void *cxlctl_set_feature(struct cxl_features_state *cxlfs,
rc = cxl_set_feature(cxl_mbox, &feat_in->uuid,
feat_in->version, feat_in->feat_data,
data_size, flags, offset, &return_code);
+ *out_len = sizeof(*rpc_out);
if (rc) {
rpc_out->retval = return_code;
return no_free_ptr(rpc_out);
}
rpc_out->retval = CXL_MBOX_CMD_RC_SUCCESS;
- *out_len = sizeof(*rpc_out);
return no_free_ptr(rpc_out);
}
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] cxl/feature: Update rpc_out in set feature failure case
2025-04-09 2:12 [PATCH 1/1] cxl/feature: Update rpc_out in set feature failure case Li Ming
@ 2025-04-09 2:27 ` Li Ming
0 siblings, 0 replies; 2+ messages in thread
From: Li Ming @ 2025-04-09 2:27 UTC (permalink / raw)
To: dave, jonathan.cameron, dave.jiang, alison.schofield,
vishal.l.verma, ira.weiny, dan.j.williams
Cc: linux-cxl, linux-kernel
On 4/9/2025 10:12 AM, Li Ming wrote:
> CXL subsystem supports userspace to configure component features via
> fwctl interface, it will configure features by using Set Feature
> command. Whatever Set Feature succeeds or fails, CXL subsystem always
> needs to return a structure fwctl_rpc_cxl_out to caller, and returned
> size is updated in a rpc_out parameter. The rpc_out is only updated in
> success case at this moment, it should also be updated in failure cases.
>
> Signed-off-by: Li Ming <ming.li@zohomail.com>
> ---
> drivers/cxl/core/features.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/core/features.c b/drivers/cxl/core/features.c
> index fcc624cefe89..63f24f032209 100644
> --- a/drivers/cxl/core/features.c
> +++ b/drivers/cxl/core/features.c
> @@ -540,13 +540,13 @@ static void *cxlctl_set_feature(struct cxl_features_state *cxlfs,
> rc = cxl_set_feature(cxl_mbox, &feat_in->uuid,
> feat_in->version, feat_in->feat_data,
> data_size, flags, offset, &return_code);
> + *out_len = sizeof(*rpc_out);
> if (rc) {
> rpc_out->retval = return_code;
> return no_free_ptr(rpc_out);
> }
>
> rpc_out->retval = CXL_MBOX_CMD_RC_SUCCESS;
> - *out_len = sizeof(*rpc_out);
>
> return no_free_ptr(rpc_out);
> }
Sorry, please ignore this patch, Wrong description in changelog, already send out v2 for review.
Ming
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-09 2:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-09 2:12 [PATCH 1/1] cxl/feature: Update rpc_out in set feature failure case Li Ming
2025-04-09 2:27 ` Li Ming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®