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:52 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-23 09:46:17 -0400
commit82d1009f537c2a43be0a410abd33521f76ee3a5a (patch)
tree98ff36d6d21b627fd42d0d59b1fc507fd5c92347 /drivers/usb/host/xhci.h
parent2d3f1fac7ee8bb4c6fad40f838488edbeabb0c50 (diff)
USB: xhci: Handle stalled control endpoints.
When a control endpoint stalls, the next control transfer will clear the stall. The USB core doesn't call down to the host controller driver's endpoint_reset() method when control endpoints stall, so the xHCI driver has to do all its stall handling for internal state in its interrupt handler. When the host stalls on a control endpoint, it may stop on the data phase or status phase of the control transfer. Like other stalled endpoints, the xHCI driver needs to queue a Reset Endpoint command and move the hardware's control endpoint ring dequeue pointer past the failed control transfer (with a Set TR Dequeue Pointer or a Configure Endpoint command). Since the USB core doesn't call usb_hcd_reset_endpoint() for control endpoints, we need to do this in interrupt context when we get notified of the stalled transfer. URBs may be queued to the hardware before these two commands complete. The endpoint queue will be restarted once both commands complete. 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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 6aecede77ff6..b1abaeb62b4c 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -589,6 +589,7 @@ struct xhci_ep_ctx {
589 */ 589 */
590#define FORCE_EVENT (0x1) 590#define FORCE_EVENT (0x1)
591#define ERROR_COUNT(p) (((p) & 0x3) << 1) 591#define ERROR_COUNT(p) (((p) & 0x3) << 1)
592#define CTX_TO_EP_TYPE(p) (((p) >> 3) & 0x7)
592#define EP_TYPE(p) ((p) << 3) 593#define EP_TYPE(p) ((p) << 3)
593#define ISOC_OUT_EP 1 594#define ISOC_OUT_EP 1
594#define BULK_OUT_EP 2 595#define BULK_OUT_EP 2
@@ -1231,6 +1232,9 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci,
1231void xhci_queue_new_dequeue_state(struct xhci_hcd *xhci, 1232void xhci_queue_new_dequeue_state(struct xhci_hcd *xhci,
1232 struct xhci_ring *ep_ring, unsigned int slot_id, 1233 struct xhci_ring *ep_ring, unsigned int slot_id,
1233 unsigned int ep_index, struct xhci_dequeue_state *deq_state); 1234 unsigned int ep_index, struct xhci_dequeue_state *deq_state);
1235void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci,
1236 struct usb_device *udev, struct usb_host_endpoint *ep,
1237 unsigned int ep_index, struct xhci_ring *ep_ring);
1234 1238
1235/* xHCI roothub code */ 1239/* xHCI roothub code */
1236int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, 1240int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex,