Lines Matching refs:crq

1283 static inline bool feature_is_dev_remote_wakeup(struct usb_ctrlrequest *crq)  in feature_is_dev_remote_wakeup()  argument
1285 if (crq->wValue == cpu_to_le16(USB_DEVICE_REMOTE_WAKEUP)) in feature_is_dev_remote_wakeup()
1290 static inline bool feature_is_dev_test_mode(struct usb_ctrlrequest *crq) in feature_is_dev_test_mode() argument
1292 if (crq->wValue == cpu_to_le16(USB_DEVICE_TEST_MODE)) in feature_is_dev_test_mode()
1297 static inline bool feature_is_ep_halt(struct usb_ctrlrequest *crq) in feature_is_ep_halt() argument
1299 if (crq->wValue == cpu_to_le16(USB_ENDPOINT_HALT)) in feature_is_ep_halt()
1305 struct usb_ctrlrequest *crq) in handle_ep0_setup() argument
1309 switch (crq->bRequest) { in handle_ep0_setup()
1313 if (crq->bRequestType == (USB_DIR_IN | USB_RECIP_DEVICE)) { in handle_ep0_setup()
1315 } else if (crq->bRequestType in handle_ep0_setup()
1318 } else if (crq->bRequestType in handle_ep0_setup()
1322 target = get_ep_by_addr(udc, le16_to_cpu(crq->wIndex)); in handle_ep0_setup()
1333 if (crq->wLength != cpu_to_le16(sizeof(status))) in handle_ep0_setup()
1342 if (crq->bRequestType == USB_RECIP_DEVICE) { in handle_ep0_setup()
1343 if (feature_is_dev_remote_wakeup(crq)) in handle_ep0_setup()
1349 } else if (crq->bRequestType == USB_RECIP_ENDPOINT) { in handle_ep0_setup()
1352 if (crq->wLength != cpu_to_le16(0) in handle_ep0_setup()
1353 || !feature_is_ep_halt(crq)) in handle_ep0_setup()
1355 target = get_ep_by_addr(udc, le16_to_cpu(crq->wIndex)); in handle_ep0_setup()
1372 if (crq->bRequestType == USB_RECIP_DEVICE) { in handle_ep0_setup()
1373 if (feature_is_dev_test_mode(crq)) { in handle_ep0_setup()
1376 udc->test_mode = le16_to_cpu(crq->wIndex); in handle_ep0_setup()
1378 } else if (feature_is_dev_remote_wakeup(crq)) { in handle_ep0_setup()
1383 } else if (crq->bRequestType == USB_RECIP_ENDPOINT) { in handle_ep0_setup()
1386 if (crq->wLength != cpu_to_le16(0) in handle_ep0_setup()
1387 || !feature_is_ep_halt(crq)) in handle_ep0_setup()
1390 target = get_ep_by_addr(udc, le16_to_cpu(crq->wIndex)); in handle_ep0_setup()
1403 if (crq->bRequestType != (USB_DIR_OUT | USB_RECIP_DEVICE)) in handle_ep0_setup()
1406 set_address(udc, le16_to_cpu(crq->wValue)); in handle_ep0_setup()
1414 retval = udc->driver->setup(&udc->gadget, crq); in handle_ep0_setup()
1423 ep->ep.name, crq->bRequestType, crq->bRequest, in handle_ep0_setup()
1424 le16_to_cpu(crq->wValue), le16_to_cpu(crq->wIndex), in handle_ep0_setup()
1425 le16_to_cpu(crq->wLength)); in handle_ep0_setup()
1532 struct usb_ctrlrequest crq; in usba_control_irq() member
1534 } crq; in usba_control_irq() local
1565 if (pkt_len != sizeof(crq)) { in usba_control_irq()
1567 pkt_len, sizeof(crq)); in usba_control_irq()
1573 memcpy_fromio(crq.data, ep->fifo, sizeof(crq)); in usba_control_irq()
1583 if (crq.crq.bRequestType & USB_DIR_IN) { in usba_control_irq()
1592 if (crq.crq.wLength != cpu_to_le16(0)) in usba_control_irq()
1600 ret = handle_ep0_setup(udc, ep, &crq.crq); in usba_control_irq()
1603 ret = udc->driver->setup(&udc->gadget, &crq.crq); in usba_control_irq()
1608 crq.crq.bRequestType, crq.crq.bRequest, in usba_control_irq()
1609 le16_to_cpu(crq.crq.wLength), ep->state, ret); in usba_control_irq()