Skip to content

Commit 236b3d1

Browse files
committed
usb: xhci-hcd: add a gratuitous doorbell read
This may assist in debugging raspberrypi#6141 The symptom is that the Interrupt endpoint for the dongle sometimes has one outstanding TRB, but the lack of USB bus activity suggests that the xHC didn't correctly register the TRB as valid when the doorbell ring happened. Adding this dummy read seems to fix it. Signed-off-by: Jonathan Bell <[email protected]>
1 parent 4622323 commit 236b3d1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/usb/host/xhci-ring.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,8 @@ void xhci_ring_ep_doorbell(struct xhci_hcd *xhci,
505505

506506
trace_xhci_ring_ep_doorbell(slot_id, DB_VALUE(ep_index, stream_id));
507507

508+
/* Incurs ~1.2us round-trip time (and wakes the link) */
509+
readl(db_addr);
508510
writel(DB_VALUE(ep_index, stream_id), db_addr);
509511
/* flush the write */
510512
readl(db_addr);

0 commit comments

Comments
 (0)