diff options
Diffstat (limited to 'drivers/usb/host/ehci-sched.c')
-rw-r--r-- | drivers/usb/host/ehci-sched.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index 9af4f64532a9..b56f25864ed6 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c | |||
@@ -301,7 +301,7 @@ static int qh_link_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
301 | 301 | ||
302 | dev_dbg (&qh->dev->dev, | 302 | dev_dbg (&qh->dev->dev, |
303 | "link qh%d-%04x/%p start %d [%d/%d us]\n", | 303 | "link qh%d-%04x/%p start %d [%d/%d us]\n", |
304 | period, le32_to_cpup (&qh->hw_info2) & 0xffff, | 304 | period, le32_to_cpup (&qh->hw_info2) & (QH_CMASK | QH_SMASK), |
305 | qh, qh->start, qh->usecs, qh->c_usecs); | 305 | qh, qh->start, qh->usecs, qh->c_usecs); |
306 | 306 | ||
307 | /* high bandwidth, or otherwise every microframe */ | 307 | /* high bandwidth, or otherwise every microframe */ |
@@ -385,7 +385,8 @@ static void qh_unlink_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
385 | 385 | ||
386 | dev_dbg (&qh->dev->dev, | 386 | dev_dbg (&qh->dev->dev, |
387 | "unlink qh%d-%04x/%p start %d [%d/%d us]\n", | 387 | "unlink qh%d-%04x/%p start %d [%d/%d us]\n", |
388 | qh->period, le32_to_cpup (&qh->hw_info2) & 0xffff, | 388 | qh->period, |
389 | le32_to_cpup (&qh->hw_info2) & (QH_CMASK | QH_SMASK), | ||
389 | qh, qh->start, qh->usecs, qh->c_usecs); | 390 | qh, qh->start, qh->usecs, qh->c_usecs); |
390 | 391 | ||
391 | /* qh->qh_next still "live" to HC */ | 392 | /* qh->qh_next still "live" to HC */ |
@@ -411,7 +412,7 @@ static void intr_deschedule (struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
411 | * active high speed queues may need bigger delays... | 412 | * active high speed queues may need bigger delays... |
412 | */ | 413 | */ |
413 | if (list_empty (&qh->qtd_list) | 414 | if (list_empty (&qh->qtd_list) |
414 | || (__constant_cpu_to_le32 (0x0ff << 8) | 415 | || (__constant_cpu_to_le32 (QH_CMASK) |
415 | & qh->hw_info2) != 0) | 416 | & qh->hw_info2) != 0) |
416 | wait = 2; | 417 | wait = 2; |
417 | else | 418 | else |
@@ -533,7 +534,7 @@ static int qh_schedule (struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
533 | 534 | ||
534 | /* reuse the previous schedule slots, if we can */ | 535 | /* reuse the previous schedule slots, if we can */ |
535 | if (frame < qh->period) { | 536 | if (frame < qh->period) { |
536 | uframe = ffs (le32_to_cpup (&qh->hw_info2) & 0x00ff); | 537 | uframe = ffs (le32_to_cpup (&qh->hw_info2) & QH_SMASK); |
537 | status = check_intr_schedule (ehci, frame, --uframe, | 538 | status = check_intr_schedule (ehci, frame, --uframe, |
538 | qh, &c_mask); | 539 | qh, &c_mask); |
539 | } else { | 540 | } else { |
@@ -569,10 +570,10 @@ static int qh_schedule (struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
569 | qh->start = frame; | 570 | qh->start = frame; |
570 | 571 | ||
571 | /* reset S-frame and (maybe) C-frame masks */ | 572 | /* reset S-frame and (maybe) C-frame masks */ |
572 | qh->hw_info2 &= __constant_cpu_to_le32 (~0xffff); | 573 | qh->hw_info2 &= __constant_cpu_to_le32(~(QH_CMASK | QH_SMASK)); |
573 | qh->hw_info2 |= qh->period | 574 | qh->hw_info2 |= qh->period |
574 | ? cpu_to_le32 (1 << uframe) | 575 | ? cpu_to_le32 (1 << uframe) |
575 | : __constant_cpu_to_le32 (0xff); | 576 | : __constant_cpu_to_le32 (QH_SMASK); |
576 | qh->hw_info2 |= c_mask; | 577 | qh->hw_info2 |= c_mask; |
577 | } else | 578 | } else |
578 | ehci_dbg (ehci, "reused qh %p schedule\n", qh); | 579 | ehci_dbg (ehci, "reused qh %p schedule\n", qh); |