Lines Matching +full:usb2 +full:- +full:lpm +full:- +full:disable
1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2001-2002 by David Brownell
38 #define USB_PID_EXT 0xf0 /* USB 2.0 LPM ECN */
56 /*-------------------------------------------------------------------------*/
65 /*-------------------------------------------------------------------------*/
86 struct usb_bus self; /* hcd is-a bus */
92 * hcd->driver->flags & HCD_MASK
96 struct timer_list rh_timer; /* drives root-hub polling */
106 const struct hc_driver *driver; /* hw-specific hooks */
110 * other external phys should be software-transparent
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))
138 #define HCD_DEFER_RH_REGISTER(hcd) ((hcd)->flags & (1U << HCD_FLAG_DEFER_RH_REGISTER))
146 ((hcd)->flags & (1U << HCD_FLAG_INTF_AUTHORIZED))
158 unsigned msix_enabled:1; /* driver has MSI-X enabled? */
168 * support the new root-hub polling mechanism. */
240 return &hcd->self; in hcd_to_bus()
248 /*-------------------------------------------------------------------------*/
252 const char *description; /* "ehci-hcd" etc */
332 /* force handover of high-speed port to full-speed companion */
387 /* Returns the hardware-chosen device address */
403 /* Returns the USB3 hub-encoded value for the U1/U2 timeout. */
407 * disable the LPM timeouts, so this can return an error code.
414 /* Call for SINGLE_STEP_SET_FEATURE Test for USB2 EH certification */
422 return hcd->driver->flags & HCD_BH; in hcd_giveback_urb_in_bh()
428 return hcd->high_prio_bh.completing_ep == ep; in hcd_periodic_completion_in_progress()
433 return IS_ENABLED(CONFIG_HAS_DMA) && (hcd->driver->flags & HCD_DMA); in hcd_uses_dma()
507 /* pci-ish (pdev null is ok) buffer alloc/mapping support */
528 /* The D0/D1 toggle bits ... USE WITH CAUTION (they're almost hcd-internal) */
529 #define usb_gettoggle(dev, ep, out) (((dev)->toggle[out] >> (ep)) & 1)
530 #define usb_dotoggle(dev, ep, out) ((dev)->toggle[out] ^= (1 << (ep)))
532 ((dev)->toggle[out] = ((dev)->toggle[out] & ~(1 << (ep))) | \
535 /* -------------------------------------------------------------------------- */
546 /*-------------------------------------------------------------------------*/
604 /* class requests from the USB 2.0 hub spec, table 11-15 */
620 /*-------------------------------------------------------------------------*/
622 /* class requests from USB 3.1 hub spec, table 10-7 */
631 /* Trying not to use worst-case bit-stuffing
643 /* 4 full-speed bit times (est.) */
667 /*-------------------------------------------------------------------------*/
672 /*-------------------------------------------------------------------------*/
700 /*-------------------------------------------------------------------------*/
715 if (bus->monitored) in usbmon_urb_submit()
716 (*mon_ops->urb_submit)(bus, urb); in usbmon_urb_submit()
722 if (bus->monitored) in usbmon_urb_submit_error()
723 (*mon_ops->urb_submit_error)(bus, urb, error); in usbmon_urb_submit_error()
729 if (bus->monitored) in usbmon_urb_complete()
730 (*mon_ops->urb_complete)(bus, urb, status); in usbmon_urb_complete()
746 /*-------------------------------------------------------------------------*/
750 /* This rwsem is for use only by the hub driver and ehci-hcd.