Lines Matching refs:crq

1281 static inline bool feature_is_dev_remote_wakeup(struct usb_ctrlrequest *crq)  in feature_is_dev_remote_wakeup()  argument
1283 if (crq->wValue == cpu_to_le16(USB_DEVICE_REMOTE_WAKEUP)) in feature_is_dev_remote_wakeup()
1288 static inline bool feature_is_dev_test_mode(struct usb_ctrlrequest *crq) in feature_is_dev_test_mode() argument
1290 if (crq->wValue == cpu_to_le16(USB_DEVICE_TEST_MODE)) in feature_is_dev_test_mode()
1295 static inline bool feature_is_ep_halt(struct usb_ctrlrequest *crq) in feature_is_ep_halt() argument
1297 if (crq->wValue == cpu_to_le16(USB_ENDPOINT_HALT)) in feature_is_ep_halt()
1303 struct usb_ctrlrequest *crq) in handle_ep0_setup() argument
1307 switch (crq->bRequest) { in handle_ep0_setup()
1311 if (crq->bRequestType == (USB_DIR_IN | USB_RECIP_DEVICE)) { in handle_ep0_setup()
1313 } else if (crq->bRequestType in handle_ep0_setup()
1316 } else if (crq->bRequestType in handle_ep0_setup()
1320 target = get_ep_by_addr(udc, le16_to_cpu(crq->wIndex)); in handle_ep0_setup()
1331 if (crq->wLength != cpu_to_le16(sizeof(status))) in handle_ep0_setup()
1340 if (crq->bRequestType == USB_RECIP_DEVICE) { in handle_ep0_setup()
1341 if (feature_is_dev_remote_wakeup(crq)) in handle_ep0_setup()
1347 } else if (crq->bRequestType == USB_RECIP_ENDPOINT) { in handle_ep0_setup()
1350 if (crq->wLength != cpu_to_le16(0) in handle_ep0_setup()
1351 || !feature_is_ep_halt(crq)) in handle_ep0_setup()
1353 target = get_ep_by_addr(udc, le16_to_cpu(crq->wIndex)); in handle_ep0_setup()
1370 if (crq->bRequestType == USB_RECIP_DEVICE) { in handle_ep0_setup()
1371 if (feature_is_dev_test_mode(crq)) { in handle_ep0_setup()
1374 udc->test_mode = le16_to_cpu(crq->wIndex); in handle_ep0_setup()
1376 } else if (feature_is_dev_remote_wakeup(crq)) { in handle_ep0_setup()
1381 } else if (crq->bRequestType == USB_RECIP_ENDPOINT) { in handle_ep0_setup()
1384 if (crq->wLength != cpu_to_le16(0) in handle_ep0_setup()
1385 || !feature_is_ep_halt(crq)) in handle_ep0_setup()
1388 target = get_ep_by_addr(udc, le16_to_cpu(crq->wIndex)); in handle_ep0_setup()
1401 if (crq->bRequestType != (USB_DIR_OUT | USB_RECIP_DEVICE)) in handle_ep0_setup()
1404 set_address(udc, le16_to_cpu(crq->wValue)); in handle_ep0_setup()
1412 retval = udc->driver->setup(&udc->gadget, crq); in handle_ep0_setup()
1421 ep->ep.name, crq->bRequestType, crq->bRequest, in handle_ep0_setup()
1422 le16_to_cpu(crq->wValue), le16_to_cpu(crq->wIndex), in handle_ep0_setup()
1423 le16_to_cpu(crq->wLength)); in handle_ep0_setup()
1530 struct usb_ctrlrequest crq; in usba_control_irq() member
1532 } crq; in usba_control_irq() local
1563 if (pkt_len != sizeof(crq)) { in usba_control_irq()
1565 pkt_len, sizeof(crq)); in usba_control_irq()
1571 memcpy_fromio(crq.data, ep->fifo, sizeof(crq)); in usba_control_irq()
1581 if (crq.crq.bRequestType & USB_DIR_IN) { in usba_control_irq()
1590 if (crq.crq.wLength != cpu_to_le16(0)) in usba_control_irq()
1598 ret = handle_ep0_setup(udc, ep, &crq.crq); in usba_control_irq()
1601 ret = udc->driver->setup(&udc->gadget, &crq.crq); in usba_control_irq()
1606 crq.crq.bRequestType, crq.crq.bRequest, in usba_control_irq()
1607 le16_to_cpu(crq.crq.wLength), ep->state, ret); in usba_control_irq()