diff options
Diffstat (limited to 'drivers/usb/host/ehci-q.c')
-rw-r--r-- | drivers/usb/host/ehci-q.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index b10f39c047e9..776a97f33914 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c | |||
@@ -198,7 +198,8 @@ static int qtd_copy_status ( | |||
198 | 198 | ||
199 | /* if async CSPLIT failed, try cleaning out the TT buffer */ | 199 | /* if async CSPLIT failed, try cleaning out the TT buffer */ |
200 | if (status != -EPIPE | 200 | if (status != -EPIPE |
201 | && urb->dev->tt && !usb_pipeint (urb->pipe) | 201 | && urb->dev->tt |
202 | && !usb_pipeint(urb->pipe) | ||
202 | && ((token & QTD_STS_MMF) != 0 | 203 | && ((token & QTD_STS_MMF) != 0 |
203 | || QTD_CERR(token) == 0) | 204 | || QTD_CERR(token) == 0) |
204 | && (!ehci_is_TDI(ehci) | 205 | && (!ehci_is_TDI(ehci) |
@@ -211,6 +212,9 @@ static int qtd_copy_status ( | |||
211 | urb->dev->ttport, urb->dev->devnum, | 212 | urb->dev->ttport, urb->dev->devnum, |
212 | usb_pipeendpoint (urb->pipe), token); | 213 | usb_pipeendpoint (urb->pipe), token); |
213 | #endif /* DEBUG */ | 214 | #endif /* DEBUG */ |
215 | /* REVISIT ARC-derived cores don't clear the root | ||
216 | * hub TT buffer in this way... | ||
217 | */ | ||
214 | usb_hub_tt_clear_buffer (urb->dev, urb->pipe); | 218 | usb_hub_tt_clear_buffer (urb->dev, urb->pipe); |
215 | } | 219 | } |
216 | } | 220 | } |
@@ -638,6 +642,7 @@ qh_make ( | |||
638 | u32 info1 = 0, info2 = 0; | 642 | u32 info1 = 0, info2 = 0; |
639 | int is_input, type; | 643 | int is_input, type; |
640 | int maxp = 0; | 644 | int maxp = 0; |
645 | struct usb_tt *tt = urb->dev->tt; | ||
641 | 646 | ||
642 | if (!qh) | 647 | if (!qh) |
643 | return qh; | 648 | return qh; |
@@ -661,8 +666,9 @@ qh_make ( | |||
661 | * For control/bulk requests, the HC or TT handles these. | 666 | * For control/bulk requests, the HC or TT handles these. |
662 | */ | 667 | */ |
663 | if (type == PIPE_INTERRUPT) { | 668 | if (type == PIPE_INTERRUPT) { |
664 | qh->usecs = NS_TO_US (usb_calc_bus_time (USB_SPEED_HIGH, is_input, 0, | 669 | qh->usecs = NS_TO_US(usb_calc_bus_time(USB_SPEED_HIGH, |
665 | hb_mult (maxp) * max_packet (maxp))); | 670 | is_input, 0, |
671 | hb_mult(maxp) * max_packet(maxp))); | ||
666 | qh->start = NO_FRAME; | 672 | qh->start = NO_FRAME; |
667 | 673 | ||
668 | if (urb->dev->speed == USB_SPEED_HIGH) { | 674 | if (urb->dev->speed == USB_SPEED_HIGH) { |
@@ -680,7 +686,6 @@ qh_make ( | |||
680 | goto done; | 686 | goto done; |
681 | } | 687 | } |
682 | } else { | 688 | } else { |
683 | struct usb_tt *tt = urb->dev->tt; | ||
684 | int think_time; | 689 | int think_time; |
685 | 690 | ||
686 | /* gap is f(FS/LS transfer times) */ | 691 | /* gap is f(FS/LS transfer times) */ |
@@ -736,10 +741,8 @@ qh_make ( | |||
736 | /* set the address of the TT; for TDI's integrated | 741 | /* set the address of the TT; for TDI's integrated |
737 | * root hub tt, leave it zeroed. | 742 | * root hub tt, leave it zeroed. |
738 | */ | 743 | */ |
739 | if (!ehci_is_TDI(ehci) | 744 | if (tt && tt->hub != ehci_to_hcd(ehci)->self.root_hub) |
740 | || urb->dev->tt->hub != | 745 | info2 |= tt->hub->devnum << 16; |
741 | ehci_to_hcd(ehci)->self.root_hub) | ||
742 | info2 |= urb->dev->tt->hub->devnum << 16; | ||
743 | 746 | ||
744 | /* NOTE: if (PIPE_INTERRUPT) { scheduler sets c-mask } */ | 747 | /* NOTE: if (PIPE_INTERRUPT) { scheduler sets c-mask } */ |
745 | 748 | ||
@@ -973,7 +976,7 @@ static void end_unlink_async (struct ehci_hcd *ehci) | |||
973 | struct ehci_qh *qh = ehci->reclaim; | 976 | struct ehci_qh *qh = ehci->reclaim; |
974 | struct ehci_qh *next; | 977 | struct ehci_qh *next; |
975 | 978 | ||
976 | timer_action_done (ehci, TIMER_IAA_WATCHDOG); | 979 | iaa_watchdog_done(ehci); |
977 | 980 | ||
978 | // qh->hw_next = cpu_to_hc32(qh->qh_dma); | 981 | // qh->hw_next = cpu_to_hc32(qh->qh_dma); |
979 | qh->qh_state = QH_STATE_IDLE; | 982 | qh->qh_state = QH_STATE_IDLE; |
@@ -983,7 +986,6 @@ static void end_unlink_async (struct ehci_hcd *ehci) | |||
983 | /* other unlink(s) may be pending (in QH_STATE_UNLINK_WAIT) */ | 986 | /* other unlink(s) may be pending (in QH_STATE_UNLINK_WAIT) */ |
984 | next = qh->reclaim; | 987 | next = qh->reclaim; |
985 | ehci->reclaim = next; | 988 | ehci->reclaim = next; |
986 | ehci->reclaim_ready = 0; | ||
987 | qh->reclaim = NULL; | 989 | qh->reclaim = NULL; |
988 | 990 | ||
989 | qh_completions (ehci, qh); | 991 | qh_completions (ehci, qh); |
@@ -1059,11 +1061,10 @@ static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
1059 | return; | 1061 | return; |
1060 | } | 1062 | } |
1061 | 1063 | ||
1062 | ehci->reclaim_ready = 0; | ||
1063 | cmd |= CMD_IAAD; | 1064 | cmd |= CMD_IAAD; |
1064 | ehci_writel(ehci, cmd, &ehci->regs->command); | 1065 | ehci_writel(ehci, cmd, &ehci->regs->command); |
1065 | (void)ehci_readl(ehci, &ehci->regs->command); | 1066 | (void)ehci_readl(ehci, &ehci->regs->command); |
1066 | timer_action (ehci, TIMER_IAA_WATCHDOG); | 1067 | iaa_watchdog_start(ehci); |
1067 | } | 1068 | } |
1068 | 1069 | ||
1069 | /*-------------------------------------------------------------------------*/ | 1070 | /*-------------------------------------------------------------------------*/ |