From f2db024fe608bdbc61cc0edcdae81af7cbb36738 Mon Sep 17 00:00:00 2001 From: Alfred Perlstein Date: Mon, 24 Aug 2009 05:03:30 +0000 Subject: [PATCH] Add a reminder comment to optimize bus_dmamap_sync calls. Submitted by: hps --- sys/dev/usb/usb_busdma.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/usb/usb_busdma.c b/sys/dev/usb/usb_busdma.c index 3769102c5108..177b94faceb1 100644 --- a/sys/dev/usb/usb_busdma.c +++ b/sys/dev/usb/usb_busdma.c @@ -679,6 +679,12 @@ usb_pc_cpu_invalidate(struct usb_page_cache *pc) /* nothing has been loaded into this page cache! */ return; } + + /* + * TODO: We currently do XXX_POSTREAD and XXX_PREREAD at the + * same time, but in the future we should try to isolate the + * different cases to optimise the code. --HPS + */ bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_POSTREAD); bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_PREREAD); }