• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/drivers/usb/host/

Lines Matching defs:ehci

19 /* this file is part of ehci-hcd.c */
33 * an ongoing challenge. That's in "ehci-sched.c".
87 qh_update (struct ehci_hcd *ehci, struct ehci_qh *qh, struct ehci_qtd *qtd)
121 qh_refresh (struct ehci_hcd *ehci, struct ehci_qh *qh)
136 qh_update (ehci, qh, qtd);
142 struct ehci_hcd *ehci,
176 ehci_dbg (ehci, "devpath %s ep%d%s 3strikes\n",
188 ehci_vdbg (ehci,
200 && (!ehci_is_TDI(ehci)
202 ehci_to_hcd(ehci)->self.root_hub)) {
216 ehci_urb_done (struct ehci_hcd *ehci, struct urb *urb)
217 __releases(ehci->lock)
218 __acquires(ehci->lock)
227 ehci_to_hcd(ehci)->self.bandwidth_int_reqs--;
238 COUNT (ehci->stats.complete);
243 COUNT (ehci->stats.complete);
247 COUNT (ehci->stats.unlink);
253 ehci_dbg (ehci,
263 spin_unlock (&ehci->lock);
264 usb_hcd_giveback_urb (ehci_to_hcd(ehci), urb);
265 spin_lock (&ehci->lock);
270 ehci_qtdc_unlink (struct ehci_hcd *ehci, struct urb *unlink, struct pt_regs *regs)
277 spin_lock_irqsave (&ehci->lock, flags);
280 ehci_qtdc_t *qtdc_this = ehci->qtdc[i];
307 ehci_urb_done (ehci, urb);
308 ehci_qtd_free (ehci, qtd);
315 spin_unlock_irqrestore (&ehci->lock, flags);
320 static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh);
321 static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh);
323 static void intr_deschedule (struct ehci_hcd *ehci, struct ehci_qh *qh);
324 static int qh_schedule (struct ehci_hcd *ehci, struct ehci_qh *qh);
333 qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh)
371 ehci_urb_done (ehci, last->urb);
374 ehci_qtd_free (ehci, last);
403 && HC_IS_RUNNING (ehci_to_hcd(ehci)->state))) {
409 if (unlikely (!HC_IS_RUNNING (ehci_to_hcd(ehci)->state)))
445 qtd_copy_status (ehci, urb, qtd->length, token);
461 ehci_urb_done (ehci, last->urb);
463 ehci_qtd_free (ehci, last);
476 qh_refresh(ehci, qh);
484 intr_deschedule (ehci, qh);
485 (void) qh_schedule (ehci, qh);
487 unlink_async (ehci, qh);
508 struct ehci_hcd *ehci,
519 ehci_qtd_free (ehci, qtd);
528 struct ehci_hcd *ehci,
542 qtd = ehci_qtd_alloc (ehci, flags);
562 qtd = ehci_qtd_alloc (ehci, flags);
597 qtd->hw_alt_next = ehci->async->hw_alt_next;
607 qtd = ehci_qtd_alloc (ehci, flags);
640 qtd = ehci_qtd_alloc (ehci, flags);
658 qtd_list_free (ehci, urb, head);
681 struct ehci_hcd *ehci,
685 struct ehci_qh *qh = ehci_qh_alloc (ehci, flags);
778 if (ehci_has_fsl_portno_bug(ehci))
786 if (!ehci_is_TDI(ehci)
788 ehci_to_hcd(ehci)->self.root_hub)
825 qh_refresh (ehci, qh);
833 static void qh_link_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
839 head = ehci->async;
840 timer_action_done (ehci, TIMER_ASYNC_OFF);
842 u32 cmd = ehci_readl(ehci, &ehci->regs->command);
846 (void)handshake(ehci, &ehci->regs->status,
849 ehci_writel(ehci, cmd, &ehci->regs->command);
850 ehci_to_hcd(ehci)->state = HC_STATE_RUNNING;
857 qh_refresh (ehci, qh);
882 struct ehci_hcd *ehci,
893 /* can't sleep here, we have ehci->lock... */
894 qh = qh_make (ehci, urb, GFP_ATOMIC);
899 if (ehci_optimized(ehci, qh) >= 0)
901 ehci_err(ehci, "EHCI Fastpath: Attempted non-optimized write to optimized pipe\n");
983 struct ehci_hcd *ehci,
999 ehci_dbg (ehci,
1007 spin_lock_irqsave (&ehci->lock, flags);
1013 if (!ehci->qtdc_dev) {
1014 if (ehci->qtdc_vid && (urb->dev->descriptor.idVendor == ehci->qtdc_vid) &&
1015 ehci->qtdc_pid && (urb->dev->descriptor.idProduct == ehci->qtdc_pid)) {
1016 ehci->qtdc_dev = urb->dev;
1023 if (ehci->qtdc[0] && (urb->dev == ehci->qtdc_dev) && (epnum == ehci->qtdc[0]->ep))
1024 qtdc_hit = ehci->qtdc[0];
1025 else if (ehci->qtdc[1] && (urb->dev == ehci->qtdc_dev) &&
1026 (epnum == ehci->qtdc[1]->ep))
1027 qtdc_hit = ehci->qtdc[1];
1055 spin_unlock_irqrestore (&ehci->lock, flags);
1082 &ehci_to_hcd(ehci)->flags))) {
1087 qh = qh_append_tds (ehci, urb, qtd_list, epnum, &ep->hcpriv);
1097 qh_link_async (ehci, qh_get (qh));
1099 spin_unlock_irqrestore (&ehci->lock, flags);
1101 qtd_list_free (ehci, urb, qtd_list);
1109 static void end_unlink_async (struct ehci_hcd *ehci)
1111 struct ehci_qh *qh = ehci->reclaim;
1114 timer_action_done (ehci, TIMER_IAA_WATCHDOG);
1123 ehci->reclaim = next;
1124 ehci->reclaim_ready = 0;
1127 qh_completions (ehci, qh);
1130 && HC_IS_RUNNING (ehci_to_hcd(ehci)->state))
1131 qh_link_async (ehci, qh);
1138 if (HC_IS_RUNNING (ehci_to_hcd(ehci)->state)
1139 && ehci->async->qh_next.qh == NULL)
1140 timer_action (ehci, TIMER_ASYNC_OFF);
1144 ehci->reclaim = NULL;
1145 start_unlink_async (ehci, next);
1150 /* caller must own ehci->lock */
1152 static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
1154 int cmd = ehci_readl(ehci, &ehci->regs->command);
1158 assert_spin_locked(&ehci->lock);
1159 if (ehci->reclaim
1166 if (ehci_optimized(ehci, qh) >= 0)
1168 ehci_err(ehci, "EHCI Fastpath: Regular unlink of optimized pipe\n");
1172 if (unlikely (qh == ehci->async)) {
1174 if (ehci_to_hcd(ehci)->state != HC_STATE_HALT
1175 && !ehci->reclaim) {
1177 ehci_writel(ehci, cmd & ~CMD_ASE,
1178 &ehci->regs->command);
1181 timer_action_done (ehci, TIMER_ASYNC_OFF);
1187 ehci->reclaim = qh = qh_get (qh);
1189 prev = ehci->async;
1197 if (unlikely (ehci_to_hcd(ehci)->state == HC_STATE_HALT)) {
1201 end_unlink_async (ehci);
1205 ehci->reclaim_ready = 0;
1207 ehci_writel(ehci, cmd, &ehci->regs->command);
1208 (void)ehci_readl(ehci, &ehci->regs->command);
1209 timer_action (ehci, TIMER_IAA_WATCHDOG);
1214 static void scan_async (struct ehci_hcd *ehci)
1219 if (!++(ehci->stamp))
1220 ehci->stamp++;
1221 timer_action_done (ehci, TIMER_ASYNC_SHRINK);
1223 qh = ehci->async->qh_next.qh;
1227 if (qh->stamp != ehci->stamp) {
1228 int pipeindex = ehci_optimized(ehci, qh);
1230 ehci->ehci_bypass_callback != NULL) {
1231 qh->stamp = ehci->stamp;
1232 ehci->ehci_bypass_callback(pipeindex, qh, &ehci->lock);
1246 qh->stamp = ehci->stamp;
1247 temp = qh_completions (ehci, qh);
1262 if (qh->stamp == ehci->stamp)
1264 else if (!ehci->reclaim
1266 start_unlink_async (ehci, qh);
1274 timer_action (ehci, TIMER_ASYNC_SHRINK);