commit 6bd09032a496354cf7aec0142e36ab92c96bda8e Author: Piotr Ziecik Date: Wed Jun 17 10:40:40 2009 +0200 usb: Fix cache flush/invalidate operation. USB stack implements cache flush and invalidate operations as bus_dma sychronization. However used synchronization flags does not caused required cache operation on all architectures. This patch fixes this problem passing correct flags to bus_dmamap_sync() function. diff --git a/sys/dev/usb/usb_busdma.c b/sys/dev/usb/usb_busdma.c index 3d6a5be..69a6fff 100644 --- a/sys/dev/usb/usb_busdma.c +++ b/sys/dev/usb/usb_busdma.c @@ -658,8 +658,7 @@ usb_pc_cpu_invalidate(struct usb_page_cache *pc) /* nothing has been loaded into this page cache! */ return; } - bus_dmamap_sync(pc->tag, pc->map, - BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD); + bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_PREREAD); } /*------------------------------------------------------------------------* @@ -672,8 +671,7 @@ usb_pc_cpu_flush(struct usb_page_cache *pc) /* nothing has been loaded into this page cache! */ return; } - bus_dmamap_sync(pc->tag, pc->map, - BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); + bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_PREWRITE); } /*------------------------------------------------------------------------*