aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-sched.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-07-11 11:21:48 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 16:50:14 -0700
commitc0c53dbc32ea05a1e1dd9dba4772327da9a11750 (patch)
treec292857a1d2c6e1c4b16bb08649df71fd92178e2 /drivers/usb/host/ehci-sched.c
parent2f5bb665ba7a14c5842fa2e1cde2be039843a2a2 (diff)
downloadlinux-stericsson-c0c53dbc32ea05a1e1dd9dba4772327da9a11750.tar.gz
USB: EHCI: add new root-hub state: STOPPING
This patch (as1571) adds a new state for ehci-hcd's root hubs: EHCI_RH_STOPPING. This value is used at times when the root hub is being stopped and we don't know whether or not the hardware has finished all its DMA yet. Although the purpose may not be apparent, this distinction will come in useful later on. Future patches will avoid actions that depend on the root hub being operational (like turning on the async or periodic schedules) when they see the state is EHCI_RH_STOPPING. 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-sched.c')
-rw-r--r--drivers/usb/host/ehci-sched.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index 027df3de2dc9..3429b8a33c58 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -2299,7 +2299,7 @@ scan_periodic (struct ehci_hcd *ehci)
* Touches as few pages as possible: cache-friendly.
*/
now_uframe = ehci->next_uframe;
- if (ehci->rh_state == EHCI_RH_RUNNING) {
+ if (ehci->rh_state >= EHCI_RH_RUNNING) {
clock = ehci_read_frame_index(ehci);
clock_frame = (clock >> 3) & (ehci->periodic_size - 1);
} else {
@@ -2334,7 +2334,7 @@ restart:
union ehci_shadow temp;
int live;
- live = (ehci->rh_state == EHCI_RH_RUNNING);
+ live = (ehci->rh_state >= EHCI_RH_RUNNING);
switch (hc32_to_cpu(ehci, type)) {
case Q_TYPE_QH:
/* handle any completions */
@@ -2459,7 +2459,7 @@ restart:
* We can't advance our scan without collecting the ISO
* transfers that are still pending in this frame.
*/
- if (incomplete && ehci->rh_state == EHCI_RH_RUNNING) {
+ if (incomplete && ehci->rh_state >= EHCI_RH_RUNNING) {
ehci->next_uframe = now_uframe;
break;
}
@@ -2475,7 +2475,7 @@ restart:
if (now_uframe == clock) {
unsigned now;
- if (ehci->rh_state != EHCI_RH_RUNNING
+ if (ehci->rh_state < EHCI_RH_RUNNING
|| ehci->periodic_sched == 0)
break;
ehci->next_uframe = now_uframe;