Lines Matching refs:uep

776 	struct isp1760_ep *uep = ep_to_udc_ep(ep);  in isp1760_ep_enable()  local
777 struct isp1760_udc *udc = uep->udc; in isp1760_ep_enable()
781 dev_dbg(uep->udc->isp->dev, "%s\n", __func__); in isp1760_ep_enable()
789 desc->bEndpointAddress != uep->addr || in isp1760_ep_enable()
794 desc->bEndpointAddress, uep->addr, in isp1760_ep_enable()
818 uep->desc = desc; in isp1760_ep_enable()
819 uep->maxpacket = le16_to_cpu(desc->wMaxPacketSize); in isp1760_ep_enable()
820 uep->rx_pending = false; in isp1760_ep_enable()
821 uep->halted = false; in isp1760_ep_enable()
822 uep->wedged = false; in isp1760_ep_enable()
824 isp1760_udc_select_ep(udc, uep); in isp1760_ep_enable()
826 isp1760_udc_write(udc, DC_FFOSZ, uep->maxpacket); in isp1760_ep_enable()
827 isp1760_udc_write(udc, DC_BUFLEN, uep->maxpacket); in isp1760_ep_enable()
839 struct isp1760_ep *uep = ep_to_udc_ep(ep); in isp1760_ep_disable() local
840 struct isp1760_udc *udc = uep->udc; in isp1760_ep_disable()
849 if (!uep->desc) { in isp1760_ep_disable()
855 uep->desc = NULL; in isp1760_ep_disable()
856 uep->maxpacket = 0; in isp1760_ep_disable()
858 isp1760_udc_select_ep(udc, uep); in isp1760_ep_disable()
864 list_splice_init(&uep->queue, &req_list); in isp1760_ep_disable()
870 isp1760_udc_request_complete(uep, req, -ESHUTDOWN); in isp1760_ep_disable()
899 struct isp1760_ep *uep = ep_to_udc_ep(ep); in isp1760_ep_queue() local
900 struct isp1760_udc *udc = uep->udc; in isp1760_ep_queue()
912 _req->length, _req->zero ? " (zlp)" : "", uep, uep->addr); in isp1760_ep_queue()
914 req->ep = uep; in isp1760_ep_queue()
916 if (uep->addr == 0) { in isp1760_ep_queue()
931 list_add_tail(&req->queue, &uep->queue); in isp1760_ep_queue()
932 isp1760_udc_transmit(uep, req); in isp1760_ep_queue()
936 list_add_tail(&req->queue, &uep->queue); in isp1760_ep_queue()
937 __isp1760_udc_select_ep(udc, uep, USB_DIR_OUT); in isp1760_ep_queue()
951 } else if (uep->desc) { in isp1760_ep_queue()
952 bool empty = list_empty(&uep->queue); in isp1760_ep_queue()
954 list_add_tail(&req->queue, &uep->queue); in isp1760_ep_queue()
955 if ((uep->addr & USB_DIR_IN) && !uep->halted && empty) in isp1760_ep_queue()
956 isp1760_udc_transmit(uep, req); in isp1760_ep_queue()
957 else if (!(uep->addr & USB_DIR_IN) && uep->rx_pending) in isp1760_ep_queue()
958 complete = isp1760_udc_receive(uep, req); in isp1760_ep_queue()
962 __func__, uep->addr); in isp1760_ep_queue()
973 isp1760_udc_request_complete(uep, req, 0); in isp1760_ep_queue()
981 struct isp1760_ep *uep = ep_to_udc_ep(ep); in isp1760_ep_dequeue() local
982 struct isp1760_udc *udc = uep->udc; in isp1760_ep_dequeue()
985 dev_dbg(uep->udc->isp->dev, "%s(ep%02x)\n", __func__, uep->addr); in isp1760_ep_dequeue()
989 if (req->ep != uep) in isp1760_ep_dequeue()
999 isp1760_udc_request_complete(uep, req, -ECONNRESET); in isp1760_ep_dequeue()
1003 static int __isp1760_ep_set_halt(struct isp1760_ep *uep, bool stall, bool wedge) in __isp1760_ep_set_halt() argument
1005 struct isp1760_udc *udc = uep->udc; in __isp1760_ep_set_halt()
1008 if (!uep->addr) { in __isp1760_ep_set_halt()
1021 if (uep->addr && !uep->desc) { in __isp1760_ep_set_halt()
1023 uep->addr); in __isp1760_ep_set_halt()
1027 if (uep->addr & USB_DIR_IN) { in __isp1760_ep_set_halt()
1029 if (!list_empty(&uep->queue)) { in __isp1760_ep_set_halt()
1032 uep->addr); in __isp1760_ep_set_halt()
1037 ret = __isp1760_udc_set_halt(uep, stall); in __isp1760_ep_set_halt()
1041 if (!uep->addr) { in __isp1760_ep_set_halt()
1051 uep->wedged = true; in __isp1760_ep_set_halt()
1053 uep->wedged = false; in __isp1760_ep_set_halt()
1060 struct isp1760_ep *uep = ep_to_udc_ep(ep); in isp1760_ep_set_halt() local
1064 dev_dbg(uep->udc->isp->dev, "%s: %s halt on ep%02x\n", __func__, in isp1760_ep_set_halt()
1065 value ? "set" : "clear", uep->addr); in isp1760_ep_set_halt()
1067 spin_lock_irqsave(&uep->udc->lock, flags); in isp1760_ep_set_halt()
1068 ret = __isp1760_ep_set_halt(uep, value, false); in isp1760_ep_set_halt()
1069 spin_unlock_irqrestore(&uep->udc->lock, flags); in isp1760_ep_set_halt()
1076 struct isp1760_ep *uep = ep_to_udc_ep(ep); in isp1760_ep_set_wedge() local
1080 dev_dbg(uep->udc->isp->dev, "%s: set wedge on ep%02x)\n", __func__, in isp1760_ep_set_wedge()
1081 uep->addr); in isp1760_ep_set_wedge()
1083 spin_lock_irqsave(&uep->udc->lock, flags); in isp1760_ep_set_wedge()
1084 ret = __isp1760_ep_set_halt(uep, true, true); in isp1760_ep_set_wedge()
1085 spin_unlock_irqrestore(&uep->udc->lock, flags); in isp1760_ep_set_wedge()
1092 struct isp1760_ep *uep = ep_to_udc_ep(ep); in isp1760_ep_fifo_flush() local
1093 struct isp1760_udc *udc = uep->udc; in isp1760_ep_fifo_flush()
1098 isp1760_udc_select_ep(udc, uep); in isp1760_ep_fifo_flush()