xhci: Add tracing for xhci doorbell register writes

Trace when a register in the doorbell array is written,
both for host controller command doorbell and device doorbells,
including for which endpoint and stream

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/1573836603-10871-3-git-send-email-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Mathias Nyman
2019-11-15 18:50:01 +02:00
committed by Greg Kroah-Hartman
父節點 dc0ffbea57
當前提交 58b9d71a0f
共有 3 個文件被更改,包括 61 次插入0 次删除

查看文件

@@ -2580,6 +2580,35 @@ static inline const char *xhci_decode_portsc(u32 portsc)
return str;
}
static inline const char *xhci_decode_doorbell(u32 slot, u32 doorbell)
{
static char str[256];
u8 ep;
u16 stream;
int ret;
ep = (doorbell & 0xff);
stream = doorbell >> 16;
if (slot == 0) {
sprintf(str, "Command Ring %d", doorbell);
return str;
}
ret = sprintf(str, "Slot %d ", slot);
if (ep > 0 && ep < 32)
ret = sprintf(str + ret, "ep%d%s",
ep / 2,
ep % 2 ? "in" : "out");
else if (ep == 0 || ep < 248)
ret = sprintf(str + ret, "Reserved %d", ep);
else
ret = sprintf(str + ret, "Vendor Defined %d", ep);
if (stream)
ret = sprintf(str + ret, " Stream %d", stream);
return str;
}
static inline const char *xhci_ep_state_string(u8 state)
{
switch (state) {