aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r--drivers/usb/host/xhci.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index fc8dcd2aa770..1a6fd997c343 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -486,8 +486,6 @@ struct xhci_slot_ctx {
486#define LAST_CTX_MASK (0x1f << 27) 486#define LAST_CTX_MASK (0x1f << 27)
487#define LAST_CTX(p) ((p) << 27) 487#define LAST_CTX(p) ((p) << 27)
488#define LAST_CTX_TO_EP_NUM(p) (((p) >> 27) - 1) 488#define LAST_CTX_TO_EP_NUM(p) (((p) >> 27) - 1)
489/* Plus one for the slot context flag */
490#define EPI_TO_FLAG(p) (1 << ((p) + 1))
491#define SLOT_FLAG (1 << 0) 489#define SLOT_FLAG (1 << 0)
492#define EP0_FLAG (1 << 1) 490#define EP0_FLAG (1 << 1)
493 491
@@ -566,7 +564,7 @@ struct xhci_ep_ctx {
566/* bits 10:14 are Max Primary Streams */ 564/* bits 10:14 are Max Primary Streams */
567/* bit 15 is Linear Stream Array */ 565/* bit 15 is Linear Stream Array */
568/* Interval - period between requests to an endpoint - 125u increments. */ 566/* Interval - period between requests to an endpoint - 125u increments. */
569#define EP_INTERVAL (0xff << 16) 567#define EP_INTERVAL(p) ((p & 0xff) << 16)
570 568
571/* ep_info2 bitmasks */ 569/* ep_info2 bitmasks */
572/* 570/*
@@ -626,6 +624,11 @@ struct xhci_virt_device {
626 dma_addr_t in_ctx_dma; 624 dma_addr_t in_ctx_dma;
627 /* FIXME when stream support is added */ 625 /* FIXME when stream support is added */
628 struct xhci_ring *ep_rings[31]; 626 struct xhci_ring *ep_rings[31];
627 /* Temporary storage in case the configure endpoint command fails and we
628 * have to restore the device state to the previous state
629 */
630 struct xhci_ring *new_ep_rings[31];
631 struct completion cmd_completion;
629 /* Status of the last command issued for this device */ 632 /* Status of the last command issued for this device */
630 u32 cmd_status; 633 u32 cmd_status;
631}; 634};
@@ -1075,6 +1078,10 @@ void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id);
1075int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id, struct usb_device *udev, gfp_t flags); 1078int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id, struct usb_device *udev, gfp_t flags);
1076int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *udev); 1079int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *udev);
1077unsigned int xhci_get_endpoint_index(struct usb_endpoint_descriptor *desc); 1080unsigned int xhci_get_endpoint_index(struct usb_endpoint_descriptor *desc);
1081unsigned int xhci_get_endpoint_flag(struct usb_endpoint_descriptor *desc);
1082void xhci_endpoint_zero(struct xhci_hcd *xhci, struct xhci_virt_device *virt_dev, struct usb_host_endpoint *ep);
1083int xhci_endpoint_init(struct xhci_hcd *xhci, struct xhci_virt_device *virt_dev, struct usb_device *udev, struct usb_host_endpoint *ep);
1084void xhci_ring_free(struct xhci_hcd *xhci, struct xhci_ring *ring);
1078 1085
1079#ifdef CONFIG_PCI 1086#ifdef CONFIG_PCI
1080/* xHCI PCI glue */ 1087/* xHCI PCI glue */
@@ -1096,6 +1103,10 @@ void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev);
1096int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev); 1103int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev);
1097int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags); 1104int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags);
1098int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status); 1105int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status);
1106int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev, struct usb_host_endpoint *ep);
1107int xhci_drop_endpoint(struct usb_hcd *hcd, struct usb_device *udev, struct usb_host_endpoint *ep);
1108int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev);
1109void xhci_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev);
1099 1110
1100/* xHCI ring, segment, TRB, and TD functions */ 1111/* xHCI ring, segment, TRB, and TD functions */
1101dma_addr_t trb_virt_to_dma(struct xhci_segment *seg, union xhci_trb *trb); 1112dma_addr_t trb_virt_to_dma(struct xhci_segment *seg, union xhci_trb *trb);
@@ -1106,6 +1117,7 @@ void set_hc_event_deq(struct xhci_hcd *xhci);
1106int queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id); 1117int queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id);
1107int queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, u32 slot_id); 1118int queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, u32 slot_id);
1108int queue_ctrl_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb, int slot_id, unsigned int ep_index); 1119int queue_ctrl_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb, int slot_id, unsigned int ep_index);
1120int queue_configure_endpoint(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, u32 slot_id);
1109 1121
1110/* xHCI roothub code */ 1122/* xHCI roothub code */
1111int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, 1123int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex,