aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/usb_busdma.h
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2015-11-07 11:40:35 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2015-11-07 11:40:35 +0000
commitc6b6f54640ab67acc8c8d10d7cb5a69efd7f1523 (patch)
tree8306045dde3de16309376b2f2a43f688f2801ed1 /sys/dev/usb/usb_busdma.h
parentddd208f7addb378feb10e5148cdec2142d57d0c1 (diff)
downloadsrc-c6b6f54640ab67acc8c8d10d7cb5a69efd7f1523.tar.gz
src-c6b6f54640ab67acc8c8d10d7cb5a69efd7f1523.zip
Add helper function to check if a USB page cache buffer is properly
aligned to reduce the use of bounce buffers in PIO mode. MFC after: 1 week
Notes
Notes: svn path=/head/; revision=290489
Diffstat (limited to 'sys/dev/usb/usb_busdma.h')
-rw-r--r--sys/dev/usb/usb_busdma.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/usb/usb_busdma.h b/sys/dev/usb/usb_busdma.h
index eee91f36893f..077bf8b86417 100644
--- a/sys/dev/usb/usb_busdma.h
+++ b/sys/dev/usb/usb_busdma.h
@@ -159,5 +159,8 @@ void usb_pc_cpu_flush(struct usb_page_cache *pc);
void usb_pc_cpu_invalidate(struct usb_page_cache *pc);
void usb_pc_dmamap_destroy(struct usb_page_cache *pc);
void usb_pc_free_mem(struct usb_page_cache *pc);
+uint8_t usb_pc_buffer_is_aligned(struct usb_page_cache *pc,
+ usb_frlength_t offset, usb_frlength_t len,
+ usb_frlength_t mask);
#endif /* _USB_BUSDMA_H_ */