octeontx2-af: convert dev_dbg to tracepoint in mbox

Use tracepoint instead of dev_dbg since the entire
mailbox code uses tracepoints for debugging.

Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Link: https://patch.msgid.link/1747136408-30685-2-git-send-email-sbhatta@marvell.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Subbaraya Sundeep
2025-05-13 17:10:05 +05:30
committed by Paolo Abeni
parent c16608005c
commit aa2263b3c3
2 changed files with 12 additions and 2 deletions

View File

@@ -188,14 +188,13 @@ int otx2_mbox_wait_for_rsp(struct otx2_mbox *mbox, int devid)
{
unsigned long timeout = jiffies + msecs_to_jiffies(MBOX_RSP_TIMEOUT);
struct otx2_mbox_dev *mdev = &mbox->dev[devid];
struct device *sender = &mbox->pdev->dev;
while (!time_after(jiffies, timeout)) {
if (mdev->num_msgs == mdev->msgs_acked)
return 0;
usleep_range(800, 1000);
}
dev_dbg(sender, "timed out while waiting for rsp\n");
trace_otx2_msg_wait_rsp(mbox->pdev);
return -EIO;
}
EXPORT_SYMBOL(otx2_mbox_wait_for_rsp);

View File

@@ -95,6 +95,17 @@ TRACE_EVENT(otx2_msg_process,
otx2_mbox_id2name(__entry->id), __entry->err)
);
TRACE_EVENT(otx2_msg_wait_rsp,
TP_PROTO(const struct pci_dev *pdev),
TP_ARGS(pdev),
TP_STRUCT__entry(__string(dev, pci_name(pdev))
),
TP_fast_assign(__assign_str(dev)
),
TP_printk("[%s] timed out while waiting for response\n",
__get_str(dev))
);
#endif /* __RVU_TRACE_H */
#undef TRACE_INCLUDE_PATH