Lines Matching defs:crq
1216 static inline bool feature_is_dev_remote_wakeup(struct usb_ctrlrequest *crq)
1218 if (crq->wValue == cpu_to_le16(USB_DEVICE_REMOTE_WAKEUP))
1223 static inline bool feature_is_dev_test_mode(struct usb_ctrlrequest *crq)
1225 if (crq->wValue == cpu_to_le16(USB_DEVICE_TEST_MODE))
1230 static inline bool feature_is_ep_halt(struct usb_ctrlrequest *crq)
1232 if (crq->wValue == cpu_to_le16(USB_ENDPOINT_HALT))
1238 struct usb_ctrlrequest *crq)
1242 switch (crq->bRequest) {
1246 if (crq->bRequestType == (USB_DIR_IN | USB_RECIP_DEVICE)) {
1248 } else if (crq->bRequestType
1251 } else if (crq->bRequestType
1255 target = get_ep_by_addr(udc, le16_to_cpu(crq->wIndex));
1266 if (crq->wLength != cpu_to_le16(sizeof(status)))
1275 if (crq->bRequestType == USB_RECIP_DEVICE) {
1276 if (feature_is_dev_remote_wakeup(crq))
1282 } else if (crq->bRequestType == USB_RECIP_ENDPOINT) {
1285 if (crq->wLength != cpu_to_le16(0)
1286 || !feature_is_ep_halt(crq))
1288 target = get_ep_by_addr(udc, le16_to_cpu(crq->wIndex));
1305 if (crq->bRequestType == USB_RECIP_DEVICE) {
1306 if (feature_is_dev_test_mode(crq)) {
1309 udc->test_mode = le16_to_cpu(crq->wIndex);
1311 } else if (feature_is_dev_remote_wakeup(crq)) {
1316 } else if (crq->bRequestType == USB_RECIP_ENDPOINT) {
1319 if (crq->wLength != cpu_to_le16(0)
1320 || !feature_is_ep_halt(crq))
1323 target = get_ep_by_addr(udc, le16_to_cpu(crq->wIndex));
1336 if (crq->bRequestType != (USB_DIR_OUT | USB_RECIP_DEVICE))
1339 set_address(udc, le16_to_cpu(crq->wValue));
1347 retval = udc->driver->setup(&udc->gadget, crq);
1356 ep->ep.name, crq->bRequestType, crq->bRequest,
1357 le16_to_cpu(crq->wValue), le16_to_cpu(crq->wIndex),
1358 le16_to_cpu(crq->wLength));
1465 struct usb_ctrlrequest crq;
1467 } crq;
1498 if (pkt_len != sizeof(crq)) {
1500 "(expected %zu)\n", pkt_len, sizeof(crq));
1506 memcpy_fromio(crq.data, ep->fifo, sizeof(crq));
1513 ep->state, crq.crq.bRequestType,
1514 crq.crq.bRequest); */
1516 if (crq.crq.bRequestType & USB_DIR_IN) {
1525 if (crq.crq.wLength != cpu_to_le16(0))
1533 ret = handle_ep0_setup(udc, ep, &crq.crq);
1536 ret = udc->driver->setup(&udc->gadget, &crq.crq);
1541 crq.crq.bRequestType, crq.crq.bRequest,
1542 le16_to_cpu(crq.crq.wLength), ep->state, ret);