cxl/pci: Show opcode in debug messages when sending a command
authorRobert Richter <rrichter@amd.com>
Tue, 3 Jan 2023 21:01:50 +0000 (22:01 +0100)
committerDan Williams <dan.j.williams@intel.com>
Wed, 25 Jan 2023 01:52:54 +0000 (17:52 -0800)
For debugging it is very helpful to see which commands are sent. Add
it to the debug message.

Signed-off-by: Robert Richter <rrichter@amd.com>
Link: https://lore.kernel.org/r/20230103210151.1126873-1-rrichter@amd.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/pci.c

index 3a66aadb4df05eb85906fdc46f3f8ecf2f04a086..2bbebbc7e032041e361df73e91ba662f29733fe1 100644 (file)
@@ -160,7 +160,7 @@ static int __cxl_pci_mbox_send_cmd(struct cxl_dev_state *cxlds,
        writeq(cmd_reg, cxlds->regs.mbox + CXLDEV_MBOX_CMD_OFFSET);
 
        /* #4 */
-       dev_dbg(dev, "Sending command\n");
+       dev_dbg(dev, "Sending command: 0x%04x\n", mbox_cmd->opcode);
        writel(CXLDEV_MBOX_CTRL_DOORBELL,
               cxlds->regs.mbox + CXLDEV_MBOX_CTRL_OFFSET);