[PATCH 1/2] fixup! usb: ehci-hcd: port periodic transactions implementation from the u-boot
Sascha Hauer
s.hauer at pengutronix.de
Wed Sep 23 07:34:54 PDT 2015
Flush/invalidate caches for interrupt transfers.
---
drivers/usb/host/ehci-hcd.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 394f2d1..4946bfa 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1266,6 +1266,9 @@ submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
dev_dbg(ehci->dev, "dev=%p, pipe=%lu, buffer=%p, length=%d, interval=%d",
dev, pipe, buffer, length, interval);
+ dma_sync_single_for_device((unsigned long)buffer, length,
+ DMA_BIDIRECTIONAL);
+
queue = ehci_create_int_queue(dev, pipe, 1, length, buffer, interval);
if (!queue) {
ehci->sem--;
@@ -1290,6 +1293,9 @@ submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
result = -EINVAL;
}
+ dma_sync_single_for_cpu((unsigned long)buffer, length,
+ DMA_BIDIRECTIONAL);
+
ret = ehci_destroy_int_queue(dev, queue);
if (!result)
result = ret;
--
2.5.1
More information about the barebox
mailing list