Re: [PATCH] cxl/mbox: Add debug messages for supported mailbox commands

From: Robert Richter
Date: Tue Jan 24 2023 - 07:40:38 EST


On 23.01.23 11:26:55, Alison Schofield wrote:
> On Mon, Jan 23, 2023 at 01:32:55PM +0100, Robert Richter wrote:
> > Hi Alison,
> >
> > On 22.01.23 21:39:33, Alison Schofield wrote:
> > > On Thu, Jan 19, 2023 at 02:04:50PM +0100, Robert Richter wrote:
> > > > Only unsupported mailbox commands are reported in debug messages. A
> > > > list of supported commands is useful too. Change debug messages to
> > > > also report the opcodes of supported commands.
> > >
> > > Hi Robert,
> > > I wonder if you can get this info another way. When I try this
> > > loading cxl_test today, I get 99 new messages. Is this going to
> > > create too much noise with debug kernels?
> >
> > There are 26 commands supported by the driver, so I assume there are
> > at least 4 cards in your system? To me the number of messages looks ok
> > for a debug kernel. And, most kernels have dyndbg enabled allowing to
> > enable only messages of interest? Esp. if card initialization fails
> > there is no way to get this information from userland. The list of
> > unsupported commands is of less use than the one for supported. That
> > is the intention for the change.
>
> cxl_walk_cel() job is to create the enabled_cmds list for the device.
> How about we use that language in the message, like:
>
> set_bit(cmd->info.id, cxlds->enabled_cmds);
> - dev_dbg(cxlds->dev, "Opcode 0x%04x supported by driver\n", opcode);
> + dev_dbg(cxlds->dev, "Opcode 0x%04x enabled\n", opcode);
>
> Because when we say, "Opcode 0x%04x supported by driver\n", that comes
> with the assumption that the device supported it too. By saying
> 'enabled', it's clear device and driver are aligned.

Yes, that message is more meaningful.

Thanks,

-Robert