From: Sylwester Nawrocki Date: Fri, 24 Apr 2020 16:50:03 +0000 (+0200) Subject: usb: xhci: Add missing cache flush in the scratchpad array initialization X-Git-Tag: submit/tizen/20200528.065747~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F18%2F231518%2F7;p=platform%2Fkernel%2Fu-boot.git usb: xhci: Add missing cache flush in the scratchpad array initialization 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. Reviewed-by: Bin Meng Signed-off-by: Sylwester Nawrocki Signed-off-by: Marek Szyprowski Change-Id: I0a8a482bf452230edd754509b2f1bcdb6b1ea090 --- diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 84c2c3344a..7baad5d4e4 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -392,6 +392,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: