Lines Matching refs:crq
499 static int s3c2410_udc_read_fifo_crq(struct usb_ctrlrequest *crq) in s3c2410_udc_read_fifo_crq() argument
501 unsigned char *outbuf = (unsigned char *)crq; in s3c2410_udc_read_fifo_crq()
516 bytes_read, crq->bRequest, crq->bRequestType, in s3c2410_udc_read_fifo_crq()
517 crq->wValue, crq->wIndex, crq->wLength); in s3c2410_udc_read_fifo_crq()
523 struct usb_ctrlrequest *crq) in s3c2410_udc_get_status() argument
526 u8 ep_num = crq->wIndex & 0x7F; in s3c2410_udc_get_status()
527 u8 is_in = crq->wIndex & USB_DIR_IN; in s3c2410_udc_get_status()
529 switch (crq->bRequestType & USB_RECIP_MASK) { in s3c2410_udc_get_status()
538 if (ep_num > 4 || crq->wLength > 2) in s3c2410_udc_get_status()
576 struct usb_ctrlrequest *crq, in s3c2410_udc_handle_ep0_idle() argument
587 len = s3c2410_udc_read_fifo_crq(crq); in s3c2410_udc_handle_ep0_idle()
588 if (len != sizeof(*crq)) { in s3c2410_udc_handle_ep0_idle()
591 sizeof(*crq), len); in s3c2410_udc_handle_ep0_idle()
597 crq->bRequest, crq->bRequestType, crq->wLength); in s3c2410_udc_handle_ep0_idle()
600 dev->req_std = (crq->bRequestType & USB_TYPE_MASK) in s3c2410_udc_handle_ep0_idle()
605 switch (crq->bRequest) { in s3c2410_udc_handle_ep0_idle()
609 if (crq->bRequestType == USB_RECIP_DEVICE) { in s3c2410_udc_handle_ep0_idle()
618 if (crq->bRequestType == USB_RECIP_INTERFACE) { in s3c2410_udc_handle_ep0_idle()
627 if (crq->bRequestType == USB_RECIP_DEVICE) { in s3c2410_udc_handle_ep0_idle()
628 tmp = crq->wValue & 0x7F; in s3c2410_udc_handle_ep0_idle()
642 if (!s3c2410_udc_get_status(dev, crq)) in s3c2410_udc_handle_ep0_idle()
650 if (crq->bRequestType != USB_RECIP_ENDPOINT) in s3c2410_udc_handle_ep0_idle()
653 if (crq->wValue != USB_ENDPOINT_HALT || crq->wLength != 0) in s3c2410_udc_handle_ep0_idle()
656 s3c2410_udc_set_halt(&dev->ep[crq->wIndex & 0x7f].ep, 0); in s3c2410_udc_handle_ep0_idle()
663 if (crq->bRequestType != USB_RECIP_ENDPOINT) in s3c2410_udc_handle_ep0_idle()
666 if (crq->wValue != USB_ENDPOINT_HALT || crq->wLength != 0) in s3c2410_udc_handle_ep0_idle()
669 s3c2410_udc_set_halt(&dev->ep[crq->wIndex & 0x7f].ep, 1); in s3c2410_udc_handle_ep0_idle()
678 if (crq->bRequestType & USB_DIR_IN) in s3c2410_udc_handle_ep0_idle()
687 ret = dev->driver->setup(&dev->gadget, crq); in s3c2410_udc_handle_ep0_idle()
691 crq->bRequest, ret); in s3c2410_udc_handle_ep0_idle()
719 struct usb_ctrlrequest crq; in s3c2410_udc_handle_ep0() local
754 s3c2410_udc_handle_ep0_idle(dev, ep, &crq, ep0csr); in s3c2410_udc_handle_ep0()