aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci.h
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2013-03-22 13:31:11 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-25 16:35:05 -0400
commit7bc782d73c7db042ecc965866b8c1c2b7d6e93d6 (patch)
treefa5fcfb05da245b4b611585b36a9271c8144fd6b /drivers/usb/host/ehci.h
parent79bcf7b02ba3d45bafe81a2753cedb8ef49548e3 (diff)
USB: EHCI: split needs_rescan into two flags
This patch (as1662) does some more QH-related cleanup in ehci-hcd. The qh->needs_rescan flag is currently used for two different purposes; the patch replaces it with two separate flags for greater clarity: qh->dequeue_during_giveback indicates that a completion handler dequeued an URB (implying that a rescan is needed), and qh->exception indicates that the QH is in an exceptional state requiring an unlink (either it encountered an I/O error or an unlink was requested). The new flags get set where the dequeue, exception, or unlink request occurred, rather than where the unlink is started. This is so that in the future, if we need to, we will be able to tell apart unlinks that truly were required from those that were carried out merely because the QH wasn't being used. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci.h')
-rw-r--r--drivers/usb/host/ehci.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 36c3a8210595..6815209511aa 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -384,7 +384,6 @@ struct ehci_qh {
384 384
385 unsigned unlink_cycle; 385 unsigned unlink_cycle;
386 386
387 u8 needs_rescan; /* Dequeue during giveback */
388 u8 qh_state; 387 u8 qh_state;
389#define QH_STATE_LINKED 1 /* HC sees this */ 388#define QH_STATE_LINKED 1 /* HC sees this */
390#define QH_STATE_UNLINK 2 /* HC may still see this */ 389#define QH_STATE_UNLINK 2 /* HC may still see this */
@@ -407,6 +406,9 @@ struct ehci_qh {
407 struct usb_device *dev; /* access to TT */ 406 struct usb_device *dev; /* access to TT */
408 unsigned is_out:1; /* bulk or intr OUT */ 407 unsigned is_out:1; /* bulk or intr OUT */
409 unsigned clearing_tt:1; /* Clear-TT-Buf in progress */ 408 unsigned clearing_tt:1; /* Clear-TT-Buf in progress */
409 unsigned dequeue_during_giveback:1;
410 unsigned exception:1; /* got a fault, or an unlink
411 was requested */
410}; 412};
411 413
412/*-------------------------------------------------------------------------*/ 414/*-------------------------------------------------------------------------*/