Lines Matching refs:ep_ctrl

516 	struct usb_ep_ctrl_prv *ep_ctrl;  in handle_usb_control()  local
518 ep_ctrl = &usbip_ctrl.out_ep_ctrl[ep_idx]; in handle_usb_control()
519 if (ep_ctrl->cb == NULL) { in handle_usb_control()
530 ep_ctrl->data_len = 8; in handle_usb_control()
531 LOG_DBG("SETUP event ep 0x%02x %u", ep_idx, ep_ctrl->data_len); in handle_usb_control()
532 memcpy(ep_ctrl->buf, &hdr->u.submit.bmRequestType, ep_ctrl->data_len); in handle_usb_control()
533 ep_ctrl->cb(ep_idx, USB_DC_EP_SETUP); in handle_usb_control()
539 if (data_len > ARRAY_SIZE(ep_ctrl->buf)) { in handle_usb_control()
543 ep_ctrl->data_len = data_len; in handle_usb_control()
545 if (usbip_recv(ep_ctrl->buf, ep_ctrl->data_len) < 0) { in handle_usb_control()
550 ep_idx, ep_ctrl->data_len); in handle_usb_control()
551 ep_ctrl->cb(ep_idx, USB_DC_EP_DATA_OUT); in handle_usb_control()
560 struct usb_ep_ctrl_prv *ep_ctrl; in handle_usb_data() local
570 ep_ctrl = &usbip_ctrl.out_ep_ctrl[ep_idx]; in handle_usb_data()
574 if (data_len > ARRAY_SIZE(ep_ctrl->buf)) { in handle_usb_data()
578 ep_ctrl->data_len = data_len; in handle_usb_data()
580 if (usbip_recv(ep_ctrl->buf, ep_ctrl->data_len) < 0) { in handle_usb_data()
584 LOG_DBG("DATA OUT event ep 0x%02x %u", ep, ep_ctrl->data_len); in handle_usb_data()
585 ep_ctrl->cb(ep, USB_DC_EP_DATA_OUT); in handle_usb_data()
588 if (!usbip_send_common(ep, ep_ctrl->data_len)) { in handle_usb_data()
596 ep_ctrl = &usbip_ctrl.in_ep_ctrl[ep_idx]; in handle_usb_data()
598 LOG_DBG("DATA IN event ep 0x%02x %u", ep, ep_ctrl->buf_len); in handle_usb_data()
601 if (!usbip_send_common(ep, ep_ctrl->buf_len)) { in handle_usb_data()
605 if (usbip_send(ep, ep_ctrl->buf, ep_ctrl->buf_len) != in handle_usb_data()
606 ep_ctrl->buf_len) { in handle_usb_data()
610 LOG_HEXDUMP_DBG(ep_ctrl->buf, ep_ctrl->buf_len, ">"); in handle_usb_data()
612 ep_ctrl->cb(ep, USB_DC_EP_DATA_IN); in handle_usb_data()
613 ep_ctrl->buf_len = 0; in handle_usb_data()