Skip to content

Commit

Permalink
usb: xhci: Add missing cache flush in the scratchpad array initializa…
Browse files Browse the repository at this point in the history
…tion

In current code there is no cache flush after initializing the scratchpad
buffer array with the scratchpad buffer pointers. This leads to a failure
of the "slot enable" command on the rpi4 board (Broadcom STB PCIe
controller + VL805 USB hub) - the very first TRB transfer on the command
ring fails and there is a timeout while waiting for the command completion
event. After adding the missing cache flush everything seems to be working
as expected.

Signed-off-by: Sylwester Nawrocki <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Nicolas Saenz Julienne <[email protected]>
Signed-off-by: Matthias Brugger <[email protected]>
  • Loading branch information
Sylwester Nawrocki authored and mbgg committed Jul 9, 2020
1 parent 61608f3 commit 61293f5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/usb/host/xhci-mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,9 @@ static int xhci_scratchpad_alloc(struct xhci_ctrl *ctrl)
scratchpad->sp_array[i] = cpu_to_le64(ptr);
}

xhci_flush_cache((uintptr_t)scratchpad->sp_array,
sizeof(u64) * num_sp);

return 0;

fail_sp3:
Expand Down

0 comments on commit 61293f5

Please sign in to comment.