Re: [PATCH] cxl/mbox: Add the CXL 4.0 command return codes 001Fh and 0020h

From: Dave Jiang

Date: Thu Oct 15 2026 - 11:34:12 EST




On 10/15/26 1:42 AM, 黄高彬 wrote:
> Hi Richard,
>
>> Do we have users for them ? or potential users ?
>
> I checked the related code, and the honest answer is no for both today.
>
> 001Fh is the code Perform Maintenance (opcode 0600h) returns when the input
> parameters are transferred in parts and the parts arrive out of order --
> Action = Initiate Transfer, Continue Transfer, End Transfer (CXL r4.0,
> 8.2.10.7). Linux does issue Perform Maintenance: PPR and the sparing
> operations in edac.c both go through cxl_perform_maintenance(). That helper
> always transfers the parameters in a single command though -- it returns
> -ENOMEM when they do not fit in the mailbox payload instead of chunking --
> so the ordering condition cannot arise from the driver. The multi-chunk
> flow in the specification is described for the Built-In Self-Test test
> parameters, and there is no BIST support in the driver.
>
> 0020h is only the return code of Request Abort Background Operation (opcode
> 0005h). Linux does not issue that command either.
>
> So neither code has a producer in the driver today. Both are defined in the
> command return code table (CXL r4.0 Table 8-208) that CMD_CMD_RC_TABLE
> transcribes, and carrying them costs two lines and no behavior change: a
> device that reports either already comes back as -ENXIO through the
> unknown-code path, so what the entries buy is a name instead of "unknown
> return code".
>
> If the point is that a definition should arrive with the code that can
> produce it, that is a fair position too. I can withdraw this patch and
> resend it together with chunked maintenance transfer support, or with abort
> support, whichever is implemented first.

Yes lets do that.
>
> Thanks,
> Gaobin