aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.h
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2009-08-07 17:04:55 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-23 09:46:17 -0400
commitac9d8fe7c6a8041cca5a0738915d2c4e21381421 (patch)
tree6ac3db149d39a61900e6df41ab9424f933a51489 /drivers/usb/host/xhci.h
parent82d1009f537c2a43be0a410abd33521f76ee3a5a (diff)
USB: xhci: Add quirk for Fresco Logic xHCI hardware.
This Fresco Logic xHCI host controller chip revision puts bad data into the output endpoint context after a Reset Endpoint command. It needs a Configure Endpoint command (instead of a Set TR Dequeue Pointer command) after the reset endpoint command. Set up the input context before issuing the Reset Endpoint command so we don't copy bad data from the output endpoint context. The HW also can't handle two commands queued at once, so submit the TRB for the Configure Endpoint command in the event handler for the Reset Endpoint command. Devices that stall on control endpoints before a configuration is selected will not work under this Fresco Logic xHCI host controller revision. This patch is for prototype hardware that will be given to other companies for evaluation purposes only, and should not reach consumer hands. Fresco Logic's next chip rev should have this bug fixed. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r--drivers/usb/host/xhci.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index b1abaeb62b4c..bc64b500feb8 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -929,6 +929,12 @@ struct xhci_td {
929 union xhci_trb *last_trb; 929 union xhci_trb *last_trb;
930}; 930};
931 931
932struct xhci_dequeue_state {
933 struct xhci_segment *new_deq_seg;
934 union xhci_trb *new_deq_ptr;
935 int new_cycle_state;
936};
937
932struct xhci_ring { 938struct xhci_ring {
933 struct xhci_segment *first_seg; 939 struct xhci_segment *first_seg;
934 union xhci_trb *enqueue; 940 union xhci_trb *enqueue;
@@ -955,12 +961,6 @@ struct xhci_ring {
955 u32 cycle_state; 961 u32 cycle_state;
956}; 962};
957 963
958struct xhci_dequeue_state {
959 struct xhci_segment *new_deq_seg;
960 union xhci_trb *new_deq_ptr;
961 int new_cycle_state;
962};
963
964struct xhci_erst_entry { 964struct xhci_erst_entry {
965 /* 64-bit event ring segment address */ 965 /* 64-bit event ring segment address */
966 u64 seg_addr; 966 u64 seg_addr;
@@ -1063,6 +1063,7 @@ struct xhci_hcd {
1063 int error_bitmask; 1063 int error_bitmask;
1064 unsigned int quirks; 1064 unsigned int quirks;
1065#define XHCI_LINK_TRB_QUIRK (1 << 0) 1065#define XHCI_LINK_TRB_QUIRK (1 << 0)
1066#define XHCI_RESET_EP_QUIRK (1 << 1)
1066}; 1067};
1067 1068
1068/* For testing purposes */ 1069/* For testing purposes */
@@ -1170,6 +1171,8 @@ int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id, struct usb_device
1170int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *udev); 1171int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *udev);
1171unsigned int xhci_get_endpoint_index(struct usb_endpoint_descriptor *desc); 1172unsigned int xhci_get_endpoint_index(struct usb_endpoint_descriptor *desc);
1172unsigned int xhci_get_endpoint_flag(struct usb_endpoint_descriptor *desc); 1173unsigned int xhci_get_endpoint_flag(struct usb_endpoint_descriptor *desc);
1174unsigned int xhci_get_endpoint_flag_from_index(unsigned int ep_index);
1175unsigned int xhci_last_valid_endpoint(u32 added_ctxs);
1173void xhci_endpoint_zero(struct xhci_hcd *xhci, struct xhci_virt_device *virt_dev, struct usb_host_endpoint *ep); 1176void xhci_endpoint_zero(struct xhci_hcd *xhci, struct xhci_virt_device *virt_dev, struct usb_host_endpoint *ep);
1174void xhci_endpoint_copy(struct xhci_hcd *xhci, 1177void xhci_endpoint_copy(struct xhci_hcd *xhci,
1175 struct xhci_virt_device *vdev, unsigned int ep_index); 1178 struct xhci_virt_device *vdev, unsigned int ep_index);
@@ -1233,8 +1236,11 @@ void xhci_queue_new_dequeue_state(struct xhci_hcd *xhci,
1233 struct xhci_ring *ep_ring, unsigned int slot_id, 1236 struct xhci_ring *ep_ring, unsigned int slot_id,
1234 unsigned int ep_index, struct xhci_dequeue_state *deq_state); 1237 unsigned int ep_index, struct xhci_dequeue_state *deq_state);
1235void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci, 1238void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci,
1236 struct usb_device *udev, struct usb_host_endpoint *ep, 1239 struct usb_device *udev,
1237 unsigned int ep_index, struct xhci_ring *ep_ring); 1240 unsigned int ep_index, struct xhci_ring *ep_ring);
1241void xhci_queue_config_ep_quirk(struct xhci_hcd *xhci,
1242 unsigned int slot_id, unsigned int ep_index,
1243 struct xhci_dequeue_state *deq_state);
1238 1244
1239/* xHCI roothub code */ 1245/* xHCI roothub code */
1240int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, 1246int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex,