Lines Matching full:ed

153 	struct ed	*ed;  in ohci_urb_enqueue()  local
160 /* every endpoint has a ed, locate and maybe (re)initialize it */ in ohci_urb_enqueue()
161 ed = ed_get(ohci, urb->ep, urb->dev, pipe, urb->interval); in ohci_urb_enqueue()
162 if (! ed) in ohci_urb_enqueue()
166 switch (ed->type) { in ohci_urb_enqueue()
198 urb_priv->ed = ed; in ohci_urb_enqueue()
225 /* schedule the ed if needed */ in ohci_urb_enqueue()
226 if (ed->state == ED_IDLE) { in ohci_urb_enqueue()
227 retval = ed_schedule (ohci, ed); in ohci_urb_enqueue()
241 list_add(&ed->in_use_list, &ohci->eds_in_use); in ohci_urb_enqueue()
243 if (ed->type == PIPE_ISOCHRONOUS) { in ohci_urb_enqueue()
247 frame += max_t (u16, 8, ed->interval); in ohci_urb_enqueue()
248 frame &= ~(ed->interval - 1); in ohci_urb_enqueue()
249 frame |= ed->branch; in ohci_urb_enqueue()
251 ed->last_iso = frame + ed->interval * (size - 1); in ohci_urb_enqueue()
253 } else if (ed->type == PIPE_ISOCHRONOUS) { in ohci_urb_enqueue()
255 u16 frame = ed->last_iso + ed->interval; in ohci_urb_enqueue()
256 u16 length = ed->interval * (size - 1); in ohci_urb_enqueue()
263 frame += (next - frame + ed->interval - 1) & in ohci_urb_enqueue()
264 -ed->interval; in ohci_urb_enqueue()
274 * to the next ED instead of the next TD. in ohci_urb_enqueue()
280 ed->interval); in ohci_urb_enqueue()
290 ed->last_iso = frame + length; in ohci_urb_enqueue()
293 /* fill the TDs and link them to the ed; and in ohci_urb_enqueue()
311 * partially transferred, or an ED with other urbs being unlinked.
329 if (urb_priv->ed->state == ED_OPER) in ohci_urb_dequeue()
330 start_ed_unlink(ohci, urb_priv->ed); in ohci_urb_dequeue()
344 * including ED memory, dummy TD, and bulk/intr data toggle
352 struct ed *ed = ep->hcpriv; in ohci_endpoint_disable() local
358 if (!ed) in ohci_endpoint_disable()
366 ed->state = ED_IDLE; in ohci_endpoint_disable()
370 switch (ed->state) { in ohci_endpoint_disable()
374 ohci_warn(ohci, "ED unlink timeout\n"); in ohci_endpoint_disable()
381 if (list_empty (&ed->td_list)) { in ohci_endpoint_disable()
382 td_free (ohci, ed->dummy); in ohci_endpoint_disable()
383 ed_free (ohci, ed); in ohci_endpoint_disable()
389 * that's not our job. can't recover; must leak ed. in ohci_endpoint_disable()
391 ohci_err (ohci, "leak ed %p (#%02x) state %d%s\n", in ohci_endpoint_disable()
392 ed, ep->desc.bEndpointAddress, ed->state, in ohci_endpoint_disable()
393 list_empty (&ed->td_list) ? "" : " (has tds)"); in ohci_endpoint_disable()
394 td_free (ohci, ed->dummy); in ohci_endpoint_disable()
753 struct ed *ed; in io_watchdog_func() local
782 /* Check every ED which might have pending TDs */ in io_watchdog_func()
783 list_for_each_entry(ed, &ohci->eds_in_use, in_use_list) { in io_watchdog_func()
784 if (ed->pending_td) { in io_watchdog_func()
786 OKAY_TO_TAKEBACK(ohci, ed)) { in io_watchdog_func()
787 unsigned tmp = hc32_to_cpu(ohci, ed->hwINFO); in io_watchdog_func()
793 add_to_done_list(ohci, ed->pending_td); in io_watchdog_func()
798 td = ed->pending_td; in io_watchdog_func()
802 list_for_each_entry(td_next, &ed->td_list, td_list) { in io_watchdog_func()
810 head = hc32_to_cpu(ohci, READ_ONCE(ed->hwHeadP)) & TD_MASK; in io_watchdog_func()
812 td_next = list_prepare_entry(td, &ed->td_list, td_list); in io_watchdog_func()
813 list_for_each_entry_continue(td_next, &ed->td_list, td_list) { in io_watchdog_func()
824 ed->takeback_wdh_cnt = ohci->wdh_cnt + 2; in io_watchdog_func()
825 ed->pending_td = td; in io_watchdog_func()
967 /* handle any pending URB/ED unlinks, leaving INTR_SF enabled in ohci_irq()
1053 struct ed *ed = priv->ed; in ohci_restart() local
1055 switch (ed->state) { in ohci_restart()
1057 ed->state = ED_UNLINK; in ohci_restart()
1058 ed->hwINFO |= cpu_to_hc32(ohci, ED_DEQUEUE); in ohci_restart()
1059 ed_deschedule (ohci, ed); in ohci_restart()
1061 ed->ed_next = ohci->ed_rm_list; in ohci_restart()
1062 ed->ed_prev = NULL; in ohci_restart()
1063 ohci->ed_rm_list = ed; in ohci_restart()
1068 ohci_dbg(ohci, "bogus ed %p state %d\n", in ohci_restart()
1069 ed, ed->state); in ohci_restart()
1282 pr_debug ("%s: block sizes: ed %zd td %zd\n", hcd_name, in ohci_hcd_mod_init()
1283 sizeof (struct ed), sizeof (struct td)); in ohci_hcd_mod_init()