Lines Matching defs:hcd
87 struct usb_bus self; /* hcd is-a bus */
93 * hcd->driver->flags & HCD_MASK
132 #define HCD_HW_ACCESSIBLE(hcd) ((hcd)->flags & (1U << HCD_FLAG_HW_ACCESSIBLE))
133 #define HCD_POLL_RH(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_RH))
134 #define HCD_POLL_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_PENDING))
135 #define HCD_WAKEUP_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_WAKEUP_PENDING))
136 #define HCD_RH_RUNNING(hcd) ((hcd)->flags & (1U << HCD_FLAG_RH_RUNNING))
137 #define HCD_DEAD(hcd) ((hcd)->flags & (1U << HCD_FLAG_DEAD))
144 #define HCD_INTF_AUTHORIZED(hcd) \
145 ((hcd)->flags & (1U << HCD_FLAG_INTF_AUTHORIZED))
242 static inline struct usb_bus *hcd_to_bus(struct usb_hcd *hcd)
244 return &hcd->self;
256 const char *description; /* "ehci-hcd" etc */
261 irqreturn_t (*irq) (struct usb_hcd *hcd);
277 int (*reset) (struct usb_hcd *hcd);
278 int (*start) (struct usb_hcd *hcd);
284 int (*pci_suspend)(struct usb_hcd *hcd, bool do_wakeup);
287 int (*pci_resume)(struct usb_hcd *hcd, bool hibernated);
290 void (*stop) (struct usb_hcd *hcd);
293 void (*shutdown) (struct usb_hcd *hcd);
296 int (*get_frame_number) (struct usb_hcd *hcd);
299 int (*urb_enqueue)(struct usb_hcd *hcd,
301 int (*urb_dequeue)(struct usb_hcd *hcd,
313 int (*map_urb_for_dma)(struct usb_hcd *hcd, struct urb *urb,
315 void (*unmap_urb_for_dma)(struct usb_hcd *hcd, struct urb *urb);
318 void (*endpoint_disable)(struct usb_hcd *hcd,
323 void (*endpoint_reset)(struct usb_hcd *hcd,
327 int (*hub_status_data) (struct usb_hcd *hcd, char *buf);
328 int (*hub_control) (struct usb_hcd *hcd,
351 int (*alloc_streams)(struct usb_hcd *hcd, struct usb_device *udev,
357 int (*free_streams)(struct usb_hcd *hcd, struct usb_device *udev,
417 int (*port_power)(struct usb_hcd *hcd, int portnum, bool enable);
425 static inline int hcd_giveback_urb_in_bh(struct usb_hcd *hcd)
427 return hcd->driver->flags & HCD_BH;
430 static inline bool hcd_periodic_completion_in_progress(struct usb_hcd *hcd,
433 return hcd->high_prio_bh.completing_ep == ep;
436 static inline bool hcd_uses_dma(struct usb_hcd *hcd)
438 return IS_ENABLED(CONFIG_HAS_DMA) && (hcd->driver->flags & HCD_DMA);
441 extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb);
442 extern int usb_hcd_check_unlink_urb(struct usb_hcd *hcd, struct urb *urb,
444 extern void usb_hcd_unlink_urb_from_ep(struct usb_hcd *hcd, struct urb *urb);
448 extern void usb_hcd_giveback_urb(struct usb_hcd *hcd, struct urb *urb,
450 extern int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
475 extern struct usb_hcd *usb_get_hcd(struct usb_hcd *hcd);
476 extern void usb_put_hcd(struct usb_hcd *hcd);
477 extern int usb_hcd_is_primary_hcd(struct usb_hcd *hcd);
478 extern int usb_add_hcd(struct usb_hcd *hcd,
480 extern void usb_remove_hcd(struct usb_hcd *hcd);
481 extern int usb_hcd_find_raw_port_number(struct usb_hcd *hcd, int port1);
482 int usb_hcd_setup_local_mem(struct usb_hcd *hcd, phys_addr_t phys_addr,
506 int hcd_buffer_create(struct usb_hcd *hcd);
507 void hcd_buffer_destroy(struct usb_hcd *hcd);
517 extern void usb_hc_died(struct usb_hcd *hcd);
518 extern void usb_hcd_poll_rh_status(struct usb_hcd *hcd);
525 /* The D0/D1 toggle bits ... USE WITH CAUTION (they're almost hcd-internal) */
585 struct usb_hcd *hcd;
690 extern void usb_hcd_resume_root_hub(struct usb_hcd *hcd);
696 static inline void usb_hcd_resume_root_hub(struct usb_hcd *hcd)
756 /* This rwsem is for use only by the hub driver and ehci-hcd.