diff options
Diffstat (limited to 'include/linux/usb/hcd.h')
| -rw-r--r-- | include/linux/usb/hcd.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index a20e7815d814..712b2a603645 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
| @@ -256,6 +256,7 @@ struct hc_driver { | |||
| 256 | 256 | ||
| 257 | int flags; | 257 | int flags; |
| 258 | #define HCD_MEMORY 0x0001 /* HC regs use memory (else I/O) */ | 258 | #define HCD_MEMORY 0x0001 /* HC regs use memory (else I/O) */ |
| 259 | #define HCD_DMA 0x0002 /* HC uses DMA */ | ||
| 259 | #define HCD_SHARED 0x0004 /* Two (or more) usb_hcds share HW */ | 260 | #define HCD_SHARED 0x0004 /* Two (or more) usb_hcds share HW */ |
| 260 | #define HCD_USB11 0x0010 /* USB 1.1 */ | 261 | #define HCD_USB11 0x0010 /* USB 1.1 */ |
| 261 | #define HCD_USB2 0x0020 /* USB 2.0 */ | 262 | #define HCD_USB2 0x0020 /* USB 2.0 */ |
| @@ -422,8 +423,10 @@ static inline bool hcd_periodic_completion_in_progress(struct usb_hcd *hcd, | |||
| 422 | return hcd->high_prio_bh.completing_ep == ep; | 423 | return hcd->high_prio_bh.completing_ep == ep; |
| 423 | } | 424 | } |
| 424 | 425 | ||
| 425 | #define hcd_uses_dma(hcd) \ | 426 | static inline bool hcd_uses_dma(struct usb_hcd *hcd) |
| 426 | (IS_ENABLED(CONFIG_HAS_DMA) && (hcd)->self.uses_dma) | 427 | { |
| 428 | return IS_ENABLED(CONFIG_HAS_DMA) && (hcd->driver->flags & HCD_DMA); | ||
| 429 | } | ||
| 427 | 430 | ||
| 428 | extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); | 431 | extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); |
| 429 | extern int usb_hcd_check_unlink_urb(struct usb_hcd *hcd, struct urb *urb, | 432 | extern int usb_hcd_check_unlink_urb(struct usb_hcd *hcd, struct urb *urb, |
| @@ -594,6 +597,10 @@ extern void usb_ep0_reinit(struct usb_device *); | |||
| 594 | #define GetPortStatus HUB_CLASS_REQ(USB_DIR_IN, USB_RT_PORT, USB_REQ_GET_STATUS) | 597 | #define GetPortStatus HUB_CLASS_REQ(USB_DIR_IN, USB_RT_PORT, USB_REQ_GET_STATUS) |
| 595 | #define SetHubFeature HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_HUB, USB_REQ_SET_FEATURE) | 598 | #define SetHubFeature HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_HUB, USB_REQ_SET_FEATURE) |
| 596 | #define SetPortFeature HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_PORT, USB_REQ_SET_FEATURE) | 599 | #define SetPortFeature HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_PORT, USB_REQ_SET_FEATURE) |
| 600 | #define ClearTTBuffer HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_PORT, HUB_CLEAR_TT_BUFFER) | ||
| 601 | #define ResetTT HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_PORT, HUB_RESET_TT) | ||
| 602 | #define GetTTState HUB_CLASS_REQ(USB_DIR_IN, USB_RT_PORT, HUB_GET_TT_STATE) | ||
| 603 | #define StopTT HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_PORT, HUB_STOP_TT) | ||
| 597 | 604 | ||
| 598 | 605 | ||
| 599 | /*-------------------------------------------------------------------------*/ | 606 | /*-------------------------------------------------------------------------*/ |
