Lines Matching full:xhci

4  * xHCI host controller driver
22 /* Code sharing between pci-quirks and xhci hcd */
23 #include "xhci-ext-caps.h"
29 /* xHCI PCI Configuration Registers */
38 * xHCI register interface.
39 * This corresponds to the eXtensible Host Controller Interface (xHCI)
44 * struct xhci_cap_regs - xHCI Host Controller Capability Registers.
52 * @hcc_params2: HCCPARAMS2 Capability Parameters 2, xhci 1.1 only
62 __le32 hcc_params2; /* xhci 1.1 */
159 * struct xhci_op_regs - xHCI Host Controller Operational Registers.
208 * The xHCI driver must reinitialize the xHC after setting this bit.
289 /* bit 8: U3 Entry Enabled, assert PLC when root port enters U3, xhci 1.1 */
291 /* bit 9: Configuration Information Enable, xhci 1.1 */
454 * XHCI 1.0 errata 8/14/12 Table 13 notes:
869 /* Some Intel xHCI host controllers need software to keep track of the bus
957 struct xhci_hcd *xhci; member
1033 * See xhci 1.1 section 4.8.3 for more details
1305 /* xhci 1.1 uses the TD_SIZE field for TBC if Extended TBC is enabled (ETE) */
1310 /* Total burst count field, Rsvdz on xhci 1.1 with Extended TBC enabled (ETE) */
1573 /* xHCI command default timeout value */
1653 /* xhci->event_ring keeps track of segment dma addresses */
1728 * Intel Lynx Point LP xHCI host.
1843 * halt the xHCI host, and complete all URBs with an -ESHUTDOWN code. Any code
1846 * they see this status (any time they drop and re-acquire xhci->lock).
1850 * There are no reports of xHCI host controllers that display this issue.
1918 /* support xHCI 1.0 spec USB2 hardware LPM */
1952 /* Platform specific overrides to generic XHCI hc_driver ops */
1983 static inline struct usb_hcd *xhci_to_hcd(struct xhci_hcd *xhci) in xhci_to_hcd() argument
1985 return xhci->main_hcd; in xhci_to_hcd()
1988 #define xhci_dbg(xhci, fmt, args...) \ argument
1989 dev_dbg(xhci_to_hcd(xhci)->self.controller , fmt , ## args)
1990 #define xhci_err(xhci, fmt, args...) \ argument
1991 dev_err(xhci_to_hcd(xhci)->self.controller , fmt , ## args)
1992 #define xhci_warn(xhci, fmt, args...) \ argument
1993 dev_warn(xhci_to_hcd(xhci)->self.controller , fmt , ## args)
1994 #define xhci_warn_ratelimited(xhci, fmt, args...) \ argument
1995 dev_warn_ratelimited(xhci_to_hcd(xhci)->self.controller , fmt , ## args)
1996 #define xhci_info(xhci, fmt, args...) \ argument
1997 dev_info(xhci_to_hcd(xhci)->self.controller , fmt , ## args)
2002 * Some xHCI implementations may support 64-bit address pointers. Registers
2005 * xHCI implementations that do not support 64-bit address pointers will ignore
2008 static inline u64 xhci_read_64(const struct xhci_hcd *xhci, in xhci_read_64() argument
2013 static inline void xhci_write_64(struct xhci_hcd *xhci, in xhci_write_64() argument
2019 static inline int xhci_link_trb_quirk(struct xhci_hcd *xhci) in xhci_link_trb_quirk() argument
2021 return xhci->quirks & XHCI_LINK_TRB_QUIRK; in xhci_link_trb_quirk()
2024 /* xHCI debugging */
2025 char *xhci_get_slot_state(struct xhci_hcd *xhci,
2027 void xhci_dbg_trace(struct xhci_hcd *xhci, void (*trace)(struct va_format *),
2030 /* xHCI memory management */
2031 void xhci_mem_cleanup(struct xhci_hcd *xhci);
2032 int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags);
2033 void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id);
2034 int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id, struct usb_device *udev, gfp_t flags…
2035 int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *udev);
2036 void xhci_copy_ep0_dequeue_into_input_ctx(struct xhci_hcd *xhci,
2041 void xhci_endpoint_zero(struct xhci_hcd *xhci, struct xhci_virt_device *virt_dev, struct usb_host_e…
2042 void xhci_update_tt_active_eps(struct xhci_hcd *xhci,
2046 void xhci_update_bw_info(struct xhci_hcd *xhci,
2050 void xhci_endpoint_copy(struct xhci_hcd *xhci,
2054 void xhci_slot_copy(struct xhci_hcd *xhci,
2057 int xhci_endpoint_init(struct xhci_hcd *xhci, struct xhci_virt_device *virt_dev,
2060 struct xhci_ring *xhci_ring_alloc(struct xhci_hcd *xhci,
2063 void xhci_ring_free(struct xhci_hcd *xhci, struct xhci_ring *ring);
2064 int xhci_ring_expansion(struct xhci_hcd *xhci, struct xhci_ring *ring,
2066 int xhci_alloc_erst(struct xhci_hcd *xhci,
2072 void xhci_free_erst(struct xhci_hcd *xhci, struct xhci_erst *erst);
2073 void xhci_free_endpoint_ring(struct xhci_hcd *xhci,
2076 struct xhci_stream_info *xhci_alloc_stream_info(struct xhci_hcd *xhci,
2080 void xhci_free_stream_info(struct xhci_hcd *xhci,
2082 void xhci_setup_streams_ep_input_ctx(struct xhci_hcd *xhci,
2087 void xhci_free_device_endpoint_resources(struct xhci_hcd *xhci,
2092 struct xhci_command *xhci_alloc_command(struct xhci_hcd *xhci,
2094 struct xhci_command *xhci_alloc_command_with_ctx(struct xhci_hcd *xhci,
2097 void xhci_free_command(struct xhci_hcd *xhci,
2099 struct xhci_container_ctx *xhci_alloc_container_ctx(struct xhci_hcd *xhci,
2101 void xhci_free_container_ctx(struct xhci_hcd *xhci,
2104 /* xHCI host controller glue */
2107 void xhci_quiesce(struct xhci_hcd *xhci);
2108 int xhci_halt(struct xhci_hcd *xhci);
2109 int xhci_start(struct xhci_hcd *xhci);
2110 int xhci_reset(struct xhci_hcd *xhci, u64 timeout_us);
2123 int xhci_disable_slot(struct xhci_hcd *xhci, u32 slot_id);
2124 int xhci_ext_cap_init(struct xhci_hcd *xhci);
2126 int xhci_suspend(struct xhci_hcd *xhci, bool do_wakeup);
2127 int xhci_resume(struct xhci_hcd *xhci, bool hibernated);
2132 int xhci_alloc_tt_info(struct xhci_hcd *xhci,
2137 /* xHCI ring, segment, TRB, and TD functions */
2139 struct xhci_segment *trb_in_td(struct xhci_hcd *xhci,
2142 int xhci_is_vendor_info_code(struct xhci_hcd *xhci, unsigned int trb_comp_code);
2143 void xhci_ring_cmd_db(struct xhci_hcd *xhci);
2144 int xhci_queue_slot_control(struct xhci_hcd *xhci, struct xhci_command *cmd,
2146 int xhci_queue_address_device(struct xhci_hcd *xhci, struct xhci_command *cmd,
2148 int xhci_queue_vendor_command(struct xhci_hcd *xhci, struct xhci_command *cmd,
2150 int xhci_queue_stop_endpoint(struct xhci_hcd *xhci, struct xhci_command *cmd,
2152 int xhci_queue_ctrl_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb,
2154 int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb,
2156 int xhci_queue_intr_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb,
2158 int xhci_queue_isoc_tx_prepare(struct xhci_hcd *xhci, gfp_t mem_flags,
2160 int xhci_queue_configure_endpoint(struct xhci_hcd *xhci,
2163 int xhci_queue_evaluate_context(struct xhci_hcd *xhci, struct xhci_command *cmd,
2165 int xhci_queue_reset_ep(struct xhci_hcd *xhci, struct xhci_command *cmd,
2168 int xhci_queue_reset_device(struct xhci_hcd *xhci, struct xhci_command *cmd,
2170 void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci, unsigned int slot_id,
2176 void xhci_ring_ep_doorbell(struct xhci_hcd *xhci, unsigned int slot_id,
2178 void xhci_ring_doorbell_for_active_rings(struct xhci_hcd *xhci,
2181 void xhci_cleanup_command_queue(struct xhci_hcd *xhci);
2182 void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring);
2185 /* xHCI roothub code */
2186 void xhci_set_link_state(struct xhci_hcd *xhci, struct xhci_port *port,
2188 void xhci_test_and_clear_bit(struct xhci_hcd *xhci, struct xhci_port *port,
2196 void xhci_hc_died(struct xhci_hcd *xhci);
2209 int xhci_find_slot_id_by_port(struct usb_hcd *hcd, struct xhci_hcd *xhci,
2211 void xhci_ring_device(struct xhci_hcd *xhci, int slot_id);
2213 /* xHCI contexts */
2215 struct xhci_slot_ctx *xhci_get_slot_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx);
2216 struct xhci_ep_ctx *xhci_get_ep_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, unsigned…
2218 struct xhci_ring *xhci_triad_to_transfer_ring(struct xhci_hcd *xhci,
2222 static inline struct xhci_ring *xhci_urb_to_transfer_ring(struct xhci_hcd *xhci, in xhci_urb_to_transfer_ring() argument
2225 return xhci_triad_to_transfer_ring(xhci, urb->dev->slot_id, in xhci_urb_to_transfer_ring()
2245 int (*vendor_init)(struct xhci_hcd *xhci);
2246 void (*vendor_cleanup)(struct xhci_hcd *xhci);
2247 bool (*is_usb_offload_enabled)(struct xhci_hcd *xhci,
2250 irqreturn_t (*queue_irq_work)(struct xhci_hcd *xhci);
2252 struct xhci_device_context_array *(*alloc_dcbaa)(struct xhci_hcd *xhci,
2254 void (*free_dcbaa)(struct xhci_hcd *xhci);
2256 struct xhci_ring *(*alloc_transfer_ring)(struct xhci_hcd *xhci,
2259 void (*free_transfer_ring)(struct xhci_hcd *xhci,
2261 int (*sync_dev_ctx)(struct xhci_hcd *xhci, unsigned int slot_id);
2262 bool (*usb_offload_skip_urb)(struct xhci_hcd *xhci, struct urb *urb);
2263 void (*alloc_container_ctx)(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx,
2265 void (*free_container_ctx)(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx);
2268 struct xhci_vendor_ops *xhci_vendor_get_ops(struct xhci_hcd *xhci);
2270 int xhci_vendor_sync_dev_ctx(struct xhci_hcd *xhci, unsigned int slot_id);
2271 bool xhci_vendor_usb_offload_skip_urb(struct xhci_hcd *xhci, struct urb *urb);
2272 void xhci_vendor_free_transfer_ring(struct xhci_hcd *xhci,
2274 bool xhci_vendor_is_usb_offload_enabled(struct xhci_hcd *xhci,