diff options
Diffstat (limited to 'include/linux/usb/hcd.h')
-rw-r--r-- | include/linux/usb/hcd.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 8aaf6872949f..8a53d3db4fd5 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h @@ -233,7 +233,15 @@ struct hc_driver { int (*urb_dequeue)(struct usb_hcd *hcd, struct urb *urb, int status); - /* dma support */ + /* + * (optional) these hooks allow an HCD to override the default DMA + * mapping and unmapping routines. In general, they shouldn't be + * necessary unless the host controller has special DMA requirements, + * such as alignment contraints. If these are not specified, the + * general usb_hcd_(un)?map_urb_for_dma functions will be used instead + * (and it may be a good idea to call these functions in your HCD + * implementation) + */ 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); @@ -337,6 +345,9 @@ extern int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, 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 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 *, struct urb *); extern void usb_hcd_flush_endpoint(struct usb_device *udev, struct usb_host_endpoint *ep); extern void usb_hcd_disable_endpoint(struct usb_device *udev, |