diff mbox series

cxl/pci: Show opcode in debug messages when sending a command

Message ID 20230103210151.1126873-1-rrichter@amd.com
State Accepted
Commit 852db33c6c180a48268eca52e25b267ed32de3ab
Headers show
Series cxl/pci: Show opcode in debug messages when sending a command | expand

Commit Message

Robert Richter Jan. 3, 2023, 9:01 p.m. UTC
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>
---
 drivers/cxl/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dan Williams Jan. 3, 2023, 11:22 p.m. UTC | #1
Robert Richter wrote:
> For debugging it is very helpful to see which commands are sent. Add
> it to the debug message.

Looks good to me, applied for v6.3.
diff mbox series

Patch

diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c
index 33083a522fd1..316089a393d0 100644
--- a/drivers/cxl/pci.c
+++ b/drivers/cxl/pci.c
@@ -162,7 +162,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);