Lines Matching refs:udev

111 	struct usb_device		*udev;  in get_endpoints()  local
177 udev = testdev_to_usbdev(dev); in get_endpoints()
180 tmp = usb_set_interface(udev, in get_endpoints()
188 dev->in_pipe = usb_rcvbulkpipe(udev, in get_endpoints()
190 dev->out_pipe = usb_sndbulkpipe(udev, in get_endpoints()
195 dev->in_iso_pipe = usb_rcvisocpipe(udev, in get_endpoints()
202 dev->out_iso_pipe = usb_sndisocpipe(udev, in get_endpoints()
209 dev->in_int_pipe = usb_rcvintpipe(udev, in get_endpoints()
216 dev->out_int_pipe = usb_sndintpipe(udev, in get_endpoints()
238 struct usb_device *udev, in usbtest_alloc_urb() argument
253 usb_fill_int_urb(urb, udev, pipe, NULL, bytes, complete_fn, in usbtest_alloc_urb()
256 usb_fill_bulk_urb(urb, udev, pipe, NULL, bytes, complete_fn, in usbtest_alloc_urb()
259 urb->interval = (udev->speed == USB_SPEED_HIGH) in usbtest_alloc_urb()
267 urb->transfer_buffer = usb_alloc_coherent(udev, bytes + offset, in usbtest_alloc_urb()
295 struct usb_device *udev, in simple_alloc_urb() argument
300 return usbtest_alloc_urb(udev, pipe, bytes, URB_NO_TRANSFER_DMA_MAP, 0, in simple_alloc_urb()
305 struct usb_device *udev, in complicated_alloc_urb() argument
310 return usbtest_alloc_urb(udev, pipe, bytes, URB_NO_TRANSFER_DMA_MAP, 0, in complicated_alloc_urb()
319 static unsigned get_maxpacket(struct usb_device *udev, int pipe) in get_maxpacket() argument
323 ep = usb_pipe_endpoint(udev, pipe); in get_maxpacket()
432 struct usb_device *udev = urb->dev; in simple_io() local
458 urb->dev = udev; in simple_io()
477 dev_err(&udev->dev, in simple_io()
574 struct usb_device *udev = testdev_to_usbdev(tdev); in perform_sglist() local
581 retval = usb_sg_init(req, udev, pipe, in perform_sglist()
582 (udev->speed == USB_SPEED_HIGH) in perform_sglist()
632 struct usb_device *udev = interface_to_usbdev(iface); in get_altsetting() local
635 retval = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), in get_altsetting()
653 struct usb_device *udev; in set_altsetting() local
658 udev = interface_to_usbdev(iface); in set_altsetting()
659 return usb_set_interface(udev, in set_altsetting()
789 struct usb_device *udev = interface_to_usbdev(iface); in ch9_postconfig() local
828 if (!realworld || udev->descriptor.bNumConfigurations != 1) { in ch9_postconfig()
829 int expected = udev->actconfig->desc.bConfigurationValue; in ch9_postconfig()
835 retval = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), in ch9_postconfig()
847 retval = usb_get_descriptor(udev, USB_DT_DEVICE, 0, in ch9_postconfig()
848 dev->buf, sizeof(udev->descriptor)); in ch9_postconfig()
849 if (retval != sizeof(udev->descriptor)) { in ch9_postconfig()
858 if (le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0210) { in ch9_postconfig()
864 retval = usb_get_descriptor(udev, USB_DT_BOS, 0, dev->buf, in ch9_postconfig()
865 sizeof(*udev->bos->desc)); in ch9_postconfig()
866 if (retval != sizeof(*udev->bos->desc)) { in ch9_postconfig()
882 retval = usb_get_descriptor(udev, USB_DT_BOS, 0, dev->buf, in ch9_postconfig()
890 length = sizeof(*udev->bos->desc); in ch9_postconfig()
903 dev_warn(&udev->dev, "not device capability descriptor, skip\n"); in ch9_postconfig()
939 for (i = 0; i < udev->descriptor.bNumConfigurations; i++) { in ch9_postconfig()
940 retval = usb_get_descriptor(udev, USB_DT_CONFIG, i, in ch9_postconfig()
955 if (le16_to_cpu(udev->descriptor.bcdUSB) == 0x0200) { in ch9_postconfig()
959 retval = usb_get_descriptor(udev, in ch9_postconfig()
963 if (udev->speed == USB_SPEED_HIGH) { in ch9_postconfig()
980 retval = usb_get_descriptor(udev, in ch9_postconfig()
995 retval = usb_get_status(udev, USB_RECIP_DEVICE, 0, dev->buf); in ch9_postconfig()
1005 retval = usb_get_status(udev, USB_RECIP_INTERFACE, in ch9_postconfig()
1162 struct usb_device *udev = testdev_to_usbdev(dev); in test_ctrl_queue() local
1187 int pipe = usb_rcvctrlpipe(udev, 0); in test_ctrl_queue()
1237 if (udev->speed != USB_SPEED_HIGH) in test_ctrl_queue()
1259 pipe = usb_sndctrlpipe(udev, 0); in test_ctrl_queue()
1291 if (udev->speed == USB_SPEED_SUPER) in test_ctrl_queue()
1294 len = 1024 - udev->descriptor.bMaxPacketSize0; in test_ctrl_queue()
1300 len = udev->descriptor.bMaxPacketSize0; in test_ctrl_queue()
1301 if (udev->speed == USB_SPEED_SUPER) in test_ctrl_queue()
1315 if (udev->bos) in test_ctrl_queue()
1316 len = le16_to_cpu(udev->bos->desc->wTotalLength); in test_ctrl_queue()
1319 if (le16_to_cpu(udev->descriptor.bcdUSB) < 0x0201) in test_ctrl_queue()
1328 urb[i] = u = simple_alloc_urb(udev, pipe, len, 0); in test_ctrl_queue()
1369 urb[i]->dev = udev; in test_ctrl_queue()
1517 struct usb_device *udev = testdev_to_usbdev(dev); in unlink_queued() local
1528 buf = usb_alloc_coherent(udev, size, GFP_KERNEL, &buf_dma); in unlink_queued()
1541 usb_fill_bulk_urb(ctx.urbs[i], udev, pipe, buf, size, in unlink_queued()
1582 usb_free_coherent(udev, size, buf, buf_dma); in unlink_queued()
1686 struct usb_device *udev = testdev_to_usbdev(dev); in halt_simple() local
1688 if (udev->speed == USB_SPEED_SUPER) in halt_simple()
1689 urb = simple_alloc_urb(udev, 0, 1024, 0); in halt_simple()
1691 urb = simple_alloc_urb(udev, 0, 512, 0); in halt_simple()
1730 struct usb_device *udev; in ctrl_out() local
1740 udev = testdev_to_usbdev(dev); in ctrl_out()
1751 retval = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), in ctrl_out()
1765 retval = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), in ctrl_out()
1877 struct usb_device *udev, in iso_alloc_urb() argument
1896 urb->dev = udev; in iso_alloc_urb()
1901 urb->transfer_buffer = usb_alloc_coherent(udev, bytes + offset, in iso_alloc_urb()
1939 struct usb_device *udev; in test_queue() local
1952 udev = testdev_to_usbdev(dev); in test_queue()
1956 urbs[i] = iso_alloc_urb(udev, pipe, desc, in test_queue()
1959 urbs[i] = complicated_alloc_urb(udev, pipe, in test_queue()
1975 (udev->speed == USB_SPEED_HIGH) ? "micro" : "", in test_queue()
1982 / ((udev->speed == USB_SPEED_HIGH) ? 8 : 1), in test_queue()
2081 struct usb_device *udev = testdev_to_usbdev(dev); in usbtest_ioctl() local
2153 urb = simple_alloc_urb(udev, dev->out_pipe, param->length, 0); in usbtest_ioctl()
2168 urb = simple_alloc_urb(udev, dev->in_pipe, param->length, 0); in usbtest_ioctl()
2183 urb = simple_alloc_urb(udev, dev->out_pipe, param->length, 0); in usbtest_ioctl()
2199 urb = simple_alloc_urb(udev, dev->in_pipe, param->length, 0); in usbtest_ioctl()
2507 urb = simple_alloc_urb(udev, dev->out_int_pipe, param->length, in usbtest_ioctl()
2523 urb = simple_alloc_urb(udev, dev->in_int_pipe, param->length, in usbtest_ioctl()
2583 struct usb_device *udev; in usbtest_probe() local
2590 udev = interface_to_usbdev(intf); in usbtest_probe()
2596 if (!vendor || le16_to_cpu(udev->descriptor.idVendor) != (u16)vendor) in usbtest_probe()
2598 if (product && le16_to_cpu(udev->descriptor.idProduct) != (u16)product) in usbtest_probe()
2602 le16_to_cpu(udev->descriptor.idVendor), in usbtest_probe()
2603 le16_to_cpu(udev->descriptor.idProduct)); in usbtest_probe()
2630 if (force_interrupt || udev->speed == USB_SPEED_LOW) { in usbtest_probe()
2632 dev->in_pipe = usb_rcvintpipe(udev, info->ep_in); in usbtest_probe()
2636 dev->out_pipe = usb_sndintpipe(udev, info->ep_out); in usbtest_probe()
2654 dev->in_pipe = usb_rcvbulkpipe(udev, in usbtest_probe()
2657 dev->out_pipe = usb_sndbulkpipe(udev, in usbtest_probe()
2677 usb_speed_string(udev->speed), in usbtest_probe()