Lines Matching refs:crq

526 static int s3c2410_udc_read_fifo_crq(struct usb_ctrlrequest *crq)  in s3c2410_udc_read_fifo_crq()  argument
528 unsigned char *outbuf = (unsigned char *)crq; in s3c2410_udc_read_fifo_crq()
543 bytes_read, crq->bRequest, crq->bRequestType, in s3c2410_udc_read_fifo_crq()
544 crq->wValue, crq->wIndex, crq->wLength); in s3c2410_udc_read_fifo_crq()
550 struct usb_ctrlrequest *crq) in s3c2410_udc_get_status() argument
553 u8 ep_num = crq->wIndex & 0x7F; in s3c2410_udc_get_status()
554 u8 is_in = crq->wIndex & USB_DIR_IN; in s3c2410_udc_get_status()
556 switch (crq->bRequestType & USB_RECIP_MASK) { in s3c2410_udc_get_status()
565 if (ep_num > 4 || crq->wLength > 2) in s3c2410_udc_get_status()
603 struct usb_ctrlrequest *crq, in s3c2410_udc_handle_ep0_idle() argument
614 len = s3c2410_udc_read_fifo_crq(crq); in s3c2410_udc_handle_ep0_idle()
615 if (len != sizeof(*crq)) { in s3c2410_udc_handle_ep0_idle()
618 sizeof(*crq), len); in s3c2410_udc_handle_ep0_idle()
624 crq->bRequest, crq->bRequestType, crq->wLength); in s3c2410_udc_handle_ep0_idle()
627 dev->req_std = (crq->bRequestType & USB_TYPE_MASK) in s3c2410_udc_handle_ep0_idle()
632 switch (crq->bRequest) { in s3c2410_udc_handle_ep0_idle()
636 if (crq->bRequestType == USB_RECIP_DEVICE) { in s3c2410_udc_handle_ep0_idle()
645 if (crq->bRequestType == USB_RECIP_INTERFACE) { in s3c2410_udc_handle_ep0_idle()
654 if (crq->bRequestType == USB_RECIP_DEVICE) { in s3c2410_udc_handle_ep0_idle()
655 tmp = crq->wValue & 0x7F; in s3c2410_udc_handle_ep0_idle()
669 if (!s3c2410_udc_get_status(dev, crq)) in s3c2410_udc_handle_ep0_idle()
677 if (crq->bRequestType != USB_RECIP_ENDPOINT) in s3c2410_udc_handle_ep0_idle()
680 if (crq->wValue != USB_ENDPOINT_HALT || crq->wLength != 0) in s3c2410_udc_handle_ep0_idle()
683 s3c2410_udc_set_halt(&dev->ep[crq->wIndex & 0x7f].ep, 0); in s3c2410_udc_handle_ep0_idle()
690 if (crq->bRequestType != USB_RECIP_ENDPOINT) in s3c2410_udc_handle_ep0_idle()
693 if (crq->wValue != USB_ENDPOINT_HALT || crq->wLength != 0) in s3c2410_udc_handle_ep0_idle()
696 s3c2410_udc_set_halt(&dev->ep[crq->wIndex & 0x7f].ep, 1); in s3c2410_udc_handle_ep0_idle()
705 if (crq->bRequestType & USB_DIR_IN) in s3c2410_udc_handle_ep0_idle()
714 ret = dev->driver->setup(&dev->gadget, crq); in s3c2410_udc_handle_ep0_idle()
718 crq->bRequest, ret); in s3c2410_udc_handle_ep0_idle()
746 struct usb_ctrlrequest crq; in s3c2410_udc_handle_ep0() local
781 s3c2410_udc_handle_ep0_idle(dev, ep, &crq, ep0csr); in s3c2410_udc_handle_ep0()