[PATCH 1/2] fixup! usb: ehci-hcd: port periodic transactions implementation from the u-boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux