Lines Matching full:setup

43 		return "SETUP";  in decode_ep0_state()
63 forward_to_driver(struct mtu3 *mtu, const struct usb_ctrlrequest *setup) in forward_to_driver() argument
73 ret = mtu->gadget_driver->setup(&mtu->g, setup); in forward_to_driver()
130 * A. send STALL for setup transfer without data stage:
185 static int ep0_set_sel(struct mtu3 *mtu, struct usb_ctrlrequest *setup) in ep0_set_sel() argument
188 u16 length = le16_to_cpu(setup->wLength); in ep0_set_sel()
206 ep0_get_status(struct mtu3 *mtu, const struct usb_ctrlrequest *setup) in ep0_get_status() argument
214 switch (setup->bRequestType & USB_RECIP_MASK) { in ep0_get_status()
233 epnum = (u8) le16_to_cpu(setup->wIndex); in ep0_get_status()
276 static int handle_test_mode(struct mtu3 *mtu, struct usb_ctrlrequest *setup) in handle_test_mode() argument
282 switch (le16_to_cpu(setup->wIndex) >> 8) { in handle_test_mode()
326 struct usb_ctrlrequest *setup, bool set) in ep0_handle_feature_dev() argument
332 switch (le16_to_cpu(setup->wValue)) { in ep0_handle_feature_dev()
339 (le16_to_cpu(setup->wIndex) & 0xff)) in ep0_handle_feature_dev()
342 handled = handle_test_mode(mtu, setup); in ep0_handle_feature_dev()
382 struct usb_ctrlrequest *setup, bool set) in ep0_handle_feature() argument
391 value = le16_to_cpu(setup->wValue); in ep0_handle_feature()
392 index = le16_to_cpu(setup->wIndex); in ep0_handle_feature()
394 switch (setup->bRequestType & USB_RECIP_MASK) { in ep0_handle_feature()
396 handled = ep0_handle_feature_dev(mtu, setup, set); in ep0_handle_feature()
437 * zero - need delegate SETUP to gadget driver
441 struct usb_ctrlrequest *setup) in handle_standard_request() argument
449 value = le16_to_cpu(setup->wValue); in handle_standard_request()
452 switch (setup->bRequest) { in handle_standard_request()
486 handled = ep0_handle_feature(mtu, setup, 0); in handle_standard_request()
489 handled = ep0_handle_feature(mtu, setup, 1); in handle_standard_request()
492 handled = ep0_get_status(mtu, setup); in handle_standard_request()
495 handled = ep0_set_sel(mtu, setup); in handle_standard_request()
603 static void ep0_read_setup(struct mtu3 *mtu, struct usb_ctrlrequest *setup) in ep0_read_setup() argument
612 ep0_read_fifo(mtu->ep0, (u8 *)setup, count); in ep0_read_setup()
614 dev_dbg(mtu->dev, "SETUP req%02x.%02x v%04x i%04x l%04x\n", in ep0_read_setup()
615 setup->bRequestType, setup->bRequest, in ep0_read_setup()
616 le16_to_cpu(setup->wValue), le16_to_cpu(setup->wIndex), in ep0_read_setup()
617 le16_to_cpu(setup->wLength)); in ep0_read_setup()
624 if (le16_to_cpu(setup->wLength) == 0) { in ep0_read_setup()
626 } else if (setup->bRequestType & USB_DIR_IN) { in ep0_read_setup()
641 struct usb_ctrlrequest setup; in ep0_handle_setup() local
645 ep0_read_setup(mtu, &setup); in ep0_handle_setup()
646 trace_mtu3_handle_setup(&setup); in ep0_handle_setup()
648 if ((setup.bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) in ep0_handle_setup()
649 handled = handle_standard_request(mtu, &setup); in ep0_handle_setup()
659 handled = forward_to_driver(mtu, &setup); in ep0_handle_setup()
665 le16_to_cpu(setup.wLength) ? 0 : EP0_SETUPPKTRDY); in ep0_handle_setup()
684 } else if (le16_to_cpu(setup.wLength) == 0) { /* no data stage */ in ep0_handle_setup()
713 /* abort current SETUP, and process new one */ in mtu3_ep0_isr()
763 dev_err(mtu->dev, "SETUP packet len %d != 8 ?\n", len); in mtu3_ep0_isr()
888 * stalls are usually issued after parsing SETUP packet, either in mtu3_ep0_halt()
889 * directly in irq context from setup() or else later. in mtu3_ep0_halt()