Lines Matching defs:ep_priv

469 static void ep_idle(struct imx21 *imx21, struct ep_priv *ep_priv)
474 int etd_num = ep_priv->etd[i];
480 ep_priv->etd[i] = -1;
491 ep_priv = list_first_entry(&imx21->queue_for_etd,
492 struct ep_priv, queue);
493 list_del(&ep_priv->queue);
495 ep_priv->waiting_etd = 0;
496 ep_priv->etd[i] = etd_num;
498 if (list_empty(&ep_priv->ep->urb_list)) {
503 &ep_priv->ep->urb_list, struct urb, urb_list));
512 struct ep_priv *ep_priv = urb->ep->hcpriv;
525 if (list_empty(&ep_priv->ep->urb_list))
526 ep_idle(imx21, ep_priv);
555 struct ep_priv *ep_priv = ep->hcpriv;
566 if (list_empty(&ep_priv->td_list))
569 etd_num = ep_priv->etd[i];
577 td = list_entry(ep_priv->td_list.next, struct td, list);
680 static struct ep_priv *alloc_isoc_ep(
683 struct ep_priv *ep_priv;
686 ep_priv = kzalloc(sizeof(struct ep_priv), GFP_ATOMIC);
687 if (!ep_priv)
691 ep_priv->etd[i] = -1;
693 INIT_LIST_HEAD(&ep_priv->td_list);
694 ep_priv->ep = ep;
695 ep->hcpriv = ep_priv;
696 return ep_priv;
699 static int alloc_isoc_etds(struct imx21 *imx21, struct ep_priv *ep_priv)
706 if (ep_priv->etd[i] < 0) {
711 ep_priv->etd[i] = etd_num;
712 imx21->etd[etd_num].ep = ep_priv->ep;
720 free_etd(imx21, ep_priv->etd[j]);
721 ep_priv->etd[j] = -1;
733 struct ep_priv *ep_priv;
754 ep_priv = alloc_isoc_ep(imx21, ep);
755 if (ep_priv == NULL) {
760 ep_priv = ep->hcpriv;
763 ret = alloc_isoc_etds(imx21, ep_priv);
780 struct etd_priv *etd = &imx21->etd[ep_priv->etd[i]];
804 if (list_empty(&ep_priv->td_list)) {
807 urb->start_frame = wrap_frame(list_entry(ep_priv->td_list.prev,
841 list_add_tail(&td->list, &ep_priv->td_list);
868 struct urb *urb, struct ep_priv *ep_priv)
876 int etd_num = ep_priv->etd[i];
886 list_for_each_entry_safe(td, tmp, &ep_priv->td_list, list) {
902 struct ep_priv *ep_priv = urb_priv->ep->hcpriv;
904 int etd_num = ep_priv->etd[0];
1136 static struct ep_priv *alloc_ep(void)
1139 struct ep_priv *ep_priv;
1141 ep_priv = kzalloc(sizeof(struct ep_priv), GFP_ATOMIC);
1142 if (!ep_priv)
1146 ep_priv->etd[i] = -1;
1148 return ep_priv;
1157 struct ep_priv *ep_priv;
1179 ep_priv = ep->hcpriv;
1180 if (ep_priv == NULL) {
1181 ep_priv = alloc_ep();
1182 if (!ep_priv) {
1186 ep->hcpriv = ep_priv;
1187 ep_priv->ep = ep;
1210 if (ep_priv->etd[0] < 0) {
1211 if (ep_priv->waiting_etd) {
1214 ep_priv);
1218 ep_priv->etd[0] = alloc_etd(imx21);
1219 if (ep_priv->etd[0] < 0) {
1221 "no ETD available queueing %p\n", ep_priv);
1223 list_add_tail(&ep_priv->queue, &imx21->queue_for_etd);
1224 ep_priv->waiting_etd = 1;
1230 etd = &imx21->etd[ep_priv->etd[0]];
1253 struct ep_priv *ep_priv;
1266 ep_priv = ep->hcpriv;
1271 dequeue_isoc_urb(imx21, urb, ep_priv);
1274 int etd_num = ep_priv->etd[0];
1420 struct ep_priv *ep_priv;
1427 ep_priv = ep->hcpriv;
1428 dev_vdbg(imx21->dev, "disable ep=%p, ep->hcpriv=%p\n", ep, ep_priv);
1433 if (ep_priv != NULL) {
1435 if (ep_priv->etd[i] > -1)
1437 ep_priv->etd[i]);
1439 free_etd(imx21, ep_priv->etd[i]);
1441 kfree(ep_priv);