Re: [PATCH RFC v2 02/18] cxl/mbox: Flag support for Dynamic Capacity Devices (DCD)

From: Jonathan Cameron
Date: Tue Aug 29 2023 - 10:08:53 EST


On Mon, 28 Aug 2023 22:20:53 -0700
Ira Weiny <ira.weiny@xxxxxxxxx> wrote:

> Per the CXL 3.0 specification software must check the Command Effects
> Log (CEL) to know if a device supports DC. If the device does support
> DC the specifics of the DC Regions (0-7) are read through the mailbox.
>
> Flag DC Device (DCD) commands in a device if they are supported.
> Subsequent patches will key off these bits to configure a DCD.
>
> Co-developed-by: Navneet Singh <navneet.singh@xxxxxxxxx>
> Signed-off-by: Navneet Singh <navneet.singh@xxxxxxxxx>
> Signed-off-by: Ira Weiny <ira.weiny@xxxxxxxxx>
>

Trivial unrelated change seems to have sneaked in. Other than that
this looks good to me.

So with that tidied up.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>


Thanks,

Jonathan

> +
> static bool cxl_is_security_command(u16 opcode)
> {
> int i;
> @@ -677,9 +705,10 @@ static void cxl_walk_cel(struct cxl_memdev_state *mds, size_t size, u8 *cel)
> u16 opcode = le16_to_cpu(cel_entry[i].opcode);
> struct cxl_mem_command *cmd = cxl_mem_find_command(opcode);
>
> - if (!cmd && !cxl_is_poison_command(opcode)) {
> - dev_dbg(dev,
> - "Opcode 0x%04x unsupported by driver\n", opcode);
> + if (!cmd && !cxl_is_poison_command(opcode) &&
> + !cxl_is_dcd_command(opcode)) {
> + dev_dbg(dev, "Opcode 0x%04x unsupported by driver\n",
> + opcode);

Clang format has been playing?
Better to leave this alone and save reviewers wondering what the change
in the dev_dbg() was.

> continue;
> }