Lines Matching refs:ed

44 	struct ed *ed;  in fhci_transaction_confirm()  local
61 ed = td->ed; in fhci_transaction_confirm()
62 if (ed->mode == FHCI_TF_ISO) { in fhci_transaction_confirm()
63 if (ed->td_list.next->next != &ed->td_list) { in fhci_transaction_confirm()
65 list_entry(ed->td_list.next->next, struct td, in fhci_transaction_confirm()
83 ed->state = FHCI_ED_HALTED; in fhci_transaction_confirm()
118 fhci_move_td_from_ed_to_done_list(usb, ed); in fhci_transaction_confirm()
155 static int add_packet(struct fhci_usb *usb, struct ed *ed, struct td *td) in add_packet() argument
163 td->toggle = ed->toggle_carry; in add_packet()
165 switch (ed->mode) { in add_packet()
173 len = min(td->len - td->actual_len, ed->max_pkt_size); in add_packet()
179 len = min(td->len, ed->max_pkt_size); in add_packet()
181 ((td->len + CRC_SIZE) >= ed->max_pkt_size))) in add_packet()
239 } else if (fhci_host_transaction(usb, pkt, td->type, ed->dev_addr, in add_packet()
240 ed->ep_addr, ed->mode, ed->speed, td->toggle)) { in add_packet()
279 struct ed *ed; in scan_ed_list() local
284 list_for_each_entry(ed, list, node) { in scan_ed_list()
285 td = ed->td_head; in scan_ed_list()
290 if (ed->state != FHCI_ED_OPER) { in scan_ed_list()
291 if (ed->state == FHCI_ED_URB_DEL) { in scan_ed_list()
293 fhci_move_td_from_ed_to_done_list(usb, ed); in scan_ed_list()
294 ed->state = FHCI_ED_SKIP; in scan_ed_list()
308 if (add_packet(usb, ed, td) < 0) in scan_ed_list()
634 struct ed *ed; in process_done_list() local
647 ed = td->ed; in process_done_list()
662 ed->state == FHCI_ED_SKIP) { in process_done_list()
663 fhci_del_ed_list(fhci, ed); in process_done_list()
664 ed->state = FHCI_ED_OPER; in process_done_list()
665 } else if (ed->state == FHCI_ED_HALTED) { in process_done_list()
667 ed->state = FHCI_ED_URB_DEL; in process_done_list()
668 fhci_del_ed_list(fhci, ed); in process_done_list()
669 ed->state = FHCI_ED_OPER; in process_done_list()
699 struct ed *ed = urb->ep->hcpriv; in fhci_queue_urb() local
707 if (ed == NULL) { in fhci_queue_urb()
708 ed = fhci_get_empty_ed(fhci); in fhci_queue_urb()
709 ed->dev_addr = usb_pipedevice(urb->pipe); in fhci_queue_urb()
710 ed->ep_addr = usb_pipeendpoint(urb->pipe); in fhci_queue_urb()
713 ed->mode = FHCI_TF_CTRL; in fhci_queue_urb()
716 ed->mode = FHCI_TF_BULK; in fhci_queue_urb()
719 ed->mode = FHCI_TF_INTR; in fhci_queue_urb()
722 ed->mode = FHCI_TF_ISO; in fhci_queue_urb()
727 ed->speed = (urb->dev->speed == USB_SPEED_LOW) ? in fhci_queue_urb()
729 ed->max_pkt_size = usb_endpoint_maxp(&urb->ep->desc); in fhci_queue_urb()
730 urb->ep->hcpriv = ed; in fhci_queue_urb()
732 ed->speed, ed->max_pkt_size); in fhci_queue_urb()
736 if (ed->mode == FHCI_TF_ISO) { in fhci_queue_urb()
738 urb->start_frame = ed->td_head ? ed->next_iso : in fhci_queue_urb()
740 ed->next_iso = (urb->start_frame + urb->interval * in fhci_queue_urb()
758 urb_priv->ed = ed; in fhci_queue_urb()
764 switch (ed->mode) { in fhci_queue_urb()
772 fhci_td_fill(fhci, urb, urb_priv, ed, cnt, in fhci_queue_urb()
783 fhci_td_fill(fhci, urb, urb_priv, ed, cnt, in fhci_queue_urb()
791 fhci_td_fill(fhci, urb, urb_priv, ed, cnt, in fhci_queue_urb()
800 fhci_td_fill(fhci, urb, urb_priv, ed, cnt++, in fhci_queue_urb()
806 ed->dev_addr = usb_pipedevice(urb->pipe); in fhci_queue_urb()
807 ed->max_pkt_size = usb_endpoint_maxp(&urb->ep->desc); in fhci_queue_urb()
810 fhci_td_fill(fhci, urb, urb_priv, ed, cnt++, FHCI_TA_SETUP, in fhci_queue_urb()
815 fhci_td_fill(fhci, urb, urb_priv, ed, cnt++, in fhci_queue_urb()
824 fhci_td_fill(fhci, urb, urb_priv, ed, cnt++, in fhci_queue_urb()
829 fhci_td_fill(fhci, urb, urb_priv, ed, cnt++, in fhci_queue_urb()
846 fhci_td_fill(fhci, urb, urb_priv, ed, cnt, in fhci_queue_urb()
869 if (!ed->td_head) { in fhci_queue_urb()
870 ed->state = FHCI_ED_OPER; in fhci_queue_urb()
871 switch (ed->mode) { in fhci_queue_urb()
873 list_add(&ed->node, &fhci->hc_list->ctrl_list); in fhci_queue_urb()
876 list_add(&ed->node, &fhci->hc_list->bulk_list); in fhci_queue_urb()
879 list_add(&ed->node, &fhci->hc_list->intr_list); in fhci_queue_urb()
882 list_add(&ed->node, &fhci->hc_list->iso_list); in fhci_queue_urb()
889 fhci_add_tds_to_ed(ed, urb_priv->tds, urb_priv->num_of_tds); in fhci_queue_urb()