diff options
author | Robert Morell <rmorell@nvidia.com> | 2010-12-15 14:54:13 -0800 |
---|---|---|
committer | Janne Hellsten <jhellsten@nvidia.com> | 2010-12-16 05:19:15 -0800 |
commit | 4bef0b03add4644b2ff3e53acc74366c60dbff87 (patch) | |
tree | 4e829468eb9e4ed86873a13c6e98890ce7fa53af /include | |
parent | e4e5dd01b8df98f010c38a8bb74c78c79bfb048a (diff) |
USB: Add driver hooks for (un)?map_urb_for_dma
These are useful in case your device has quirks involving what memory
is and is not DMAable.
Signed-off-by: Robert Morell <rmorell@nvidia.com>
Change-Id: I60b48ef8efd9f7f78eaba70d708d25b231f23d82
Reviewed-on: http://git-master/r/13381
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Janne Hellsten <jhellsten@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/usb/hcd.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 3b571f1ffbb3..8aaf6872949f 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h @@ -233,6 +233,11 @@ struct hc_driver { int (*urb_dequeue)(struct usb_hcd *hcd, struct urb *urb, int status); + /* dma support */ + int (*map_urb_for_dma)(struct usb_hcd *hcd, struct urb *urb, + gfp_t mem_flags); + void (*unmap_urb_for_dma)(struct usb_hcd *hcd, struct urb *urb); + /* hw synch, freeing endpoint resources that urb_dequeue can't */ void (*endpoint_disable)(struct usb_hcd *hcd, struct usb_host_endpoint *ep); @@ -327,6 +332,9 @@ extern void usb_hcd_unlink_urb_from_ep(struct usb_hcd *hcd, struct urb *urb); extern int usb_hcd_submit_urb(struct urb *urb, gfp_t mem_flags); extern int usb_hcd_unlink_urb(struct urb *urb, int status); +extern int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, + gfp_t mem_flags); +extern void usb_hcd_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb); extern void usb_hcd_giveback_urb(struct usb_hcd *hcd, struct urb *urb, int status); extern void usb_hcd_flush_endpoint(struct usb_device *udev, |