Lines Matching full:udc

38 static int v_send_ret_unlink(struct vudc *udc, struct v_unlink *unlink)  in v_send_ret_unlink()  argument
60 ret = kernel_sendmsg(udc->ud.tcp_socket, &msg, iov, in v_send_ret_unlink()
63 usbip_event_add(&udc->ud, VUDC_EVENT_ERROR_TCP); in v_send_ret_unlink()
73 static int v_send_ret_submit(struct vudc *udc, struct urbp *urb_p) in v_send_ret_submit() argument
89 dev_err(&udc->gadget.dev, in v_send_ret_submit()
102 usbip_event_add(&udc->ud, VUDC_EVENT_ERROR_MALLOC); in v_send_ret_submit()
141 usbip_event_add(&udc->ud, VUDC_EVENT_ERROR_TCP); in v_send_ret_submit()
154 usbip_event_add(&udc->ud, in v_send_ret_submit()
166 ret = kernel_sendmsg(udc->ud.tcp_socket, &msg, in v_send_ret_submit()
169 usbip_event_add(&udc->ud, VUDC_EVENT_ERROR_TCP); in v_send_ret_submit()
184 static int v_send_ret(struct vudc *udc) in v_send_ret() argument
191 spin_lock_irqsave(&udc->lock_tx, flags); in v_send_ret()
192 while (!list_empty(&udc->tx_queue)) { in v_send_ret()
193 txi = list_first_entry(&udc->tx_queue, struct tx_item, in v_send_ret()
196 spin_unlock_irqrestore(&udc->lock_tx, flags); in v_send_ret()
200 ret = v_send_ret_submit(udc, txi->s); in v_send_ret()
203 ret = v_send_ret_unlink(udc, txi->u); in v_send_ret()
213 spin_lock_irqsave(&udc->lock_tx, flags); in v_send_ret()
216 spin_unlock_irqrestore(&udc->lock_tx, flags); in v_send_ret()
224 struct vudc *udc = container_of(ud, struct vudc, ud); in v_tx_loop() local
228 if (usbip_event_happened(&udc->ud)) in v_tx_loop()
230 ret = v_send_ret(udc); in v_tx_loop()
235 wait_event_interruptible(udc->tx_waitq, in v_tx_loop()
236 (!list_empty(&udc->tx_queue) || in v_tx_loop()
244 void v_enqueue_ret_unlink(struct vudc *udc, __u32 seqnum, __u32 status) in v_enqueue_ret_unlink() argument
251 usbip_event_add(&udc->ud, VDEV_EVENT_ERROR_MALLOC); in v_enqueue_ret_unlink()
257 usbip_event_add(&udc->ud, VDEV_EVENT_ERROR_MALLOC); in v_enqueue_ret_unlink()
266 list_add_tail(&txi->tx_entry, &udc->tx_queue); in v_enqueue_ret_unlink()
270 void v_enqueue_ret_submit(struct vudc *udc, struct urbp *urb_p) in v_enqueue_ret_submit() argument
276 usbip_event_add(&udc->ud, VDEV_EVENT_ERROR_MALLOC); in v_enqueue_ret_submit()
283 list_add_tail(&txi->tx_entry, &udc->tx_queue); in v_enqueue_ret_submit()