Lines Matching refs:intf
82 struct usb_interface *intf; member
112 static struct wdm_device *wdm_find_device(struct usb_interface *intf) in wdm_find_device() argument
118 if (desc->intf == intf) in wdm_find_device()
133 if (desc->intf->minor == minor) in wdm_find_device_by_minor()
168 dev_dbg(&desc->intf->dev, in wdm_in_callback()
172 dev_dbg(&desc->intf->dev, in wdm_in_callback()
176 dev_dbg(&desc->intf->dev, in wdm_in_callback()
180 dev_err(&desc->intf->dev, in wdm_in_callback()
184 dev_err(&desc->intf->dev, in wdm_in_callback()
227 dev_err(&desc->intf->dev, "Stall on int endpoint\n"); in wdm_int_callback()
230 dev_err(&desc->intf->dev, in wdm_int_callback()
237 dev_err(&desc->intf->dev, "wdm_int_callback - %d bytes\n", in wdm_int_callback()
244 dev_dbg(&desc->intf->dev, in wdm_int_callback()
251 dev_dbg(&desc->intf->dev, in wdm_int_callback()
257 dev_err(&desc->intf->dev, in wdm_int_callback()
269 dev_dbg(&desc->intf->dev, "%s: usb_submit_urb %d", in wdm_int_callback()
281 dev_err(&desc->intf->dev, in wdm_int_callback()
288 dev_err(&desc->intf->dev, in wdm_int_callback()
365 r = usb_autopm_get_interface(desc->intf); in wdm_write()
391 interface_to_usbdev(desc->intf), in wdm_write()
393 usb_sndctrlpipe(interface_to_usbdev(desc->intf), 0), in wdm_write()
415 dev_err(&desc->intf->dev, "Tx URB error: %d\n", rv); in wdm_write()
418 dev_dbg(&desc->intf->dev, "Tx URB has been submitted index=%d", in wdm_write()
422 usb_autopm_put_interface(desc->intf); in wdm_write()
475 usb_mark_last_busy(interface_to_usbdev(desc->intf)); in wdm_read()
499 dev_dbg(&desc->intf->dev, "%s: zero length - clearing WDM_READ\n", __func__); in wdm_read()
543 dev_err(&desc->intf->dev, "Error in flush path: %d\n", in wdm_flush()
579 struct usb_interface *intf; in wdm_open() local
587 intf = desc->intf; in wdm_open()
592 rv = usb_autopm_get_interface(desc->intf); in wdm_open()
594 dev_err(&desc->intf->dev, "Error autopm - %d\n", rv); in wdm_open()
606 dev_err(&desc->intf->dev, in wdm_open()
615 desc->manage_power(intf, 1); in wdm_open()
616 usb_autopm_put_interface(desc->intf); in wdm_open()
635 dev_dbg(&desc->intf->dev, "wdm_release: cleanup"); in wdm_release()
637 desc->manage_power(desc->intf, 0); in wdm_release()
707 static int wdm_create(struct usb_interface *intf, struct usb_endpoint_descriptor *ep, in wdm_create() argument
723 desc->inum = cpu_to_le16((u16)intf->cur_altsetting->desc.bInterfaceNumber); in wdm_create()
724 desc->intf = intf; in wdm_create()
766 interface_to_usbdev(intf), in wdm_create()
767 usb_rcvintpipe(interface_to_usbdev(intf), ep->bEndpointAddress), in wdm_create()
783 interface_to_usbdev(intf), in wdm_create()
785 usb_rcvctrlpipe(interface_to_usbdev(desc->intf), 0), in wdm_create()
799 rv = usb_register_dev(intf, &wdm_class); in wdm_create()
803 dev_info(&intf->dev, "%s: USB WDM device\n", dev_name(intf->usb_dev)); in wdm_create()
814 static int wdm_manage_power(struct usb_interface *intf, int on) in wdm_manage_power() argument
817 int rv = usb_autopm_get_interface(intf); in wdm_manage_power()
821 intf->needs_remote_wakeup = on; in wdm_manage_power()
822 usb_autopm_put_interface(intf); in wdm_manage_power()
827 static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id) in wdm_probe() argument
833 u8 *buffer = intf->altsetting->extra; in wdm_probe()
834 int buflen = intf->altsetting->extralen; in wdm_probe()
841 dev_err(&intf->dev, "skipping garbage\n"); in wdm_probe()
851 dev_dbg(&intf->dev, in wdm_probe()
855 dev_err(&intf->dev, in wdm_probe()
865 iface = intf->cur_altsetting; in wdm_probe()
870 rv = wdm_create(intf, ep, maxcom, &wdm_manage_power); in wdm_probe()
895 struct usb_driver *usb_cdc_wdm_register(struct usb_interface *intf, in usb_cdc_wdm_register() argument
902 rv = wdm_create(intf, ep, bufsize, manage_power); in usb_cdc_wdm_register()
912 static void wdm_disconnect(struct usb_interface *intf) in wdm_disconnect() argument
917 usb_deregister_dev(intf, &wdm_class); in wdm_disconnect()
918 desc = wdm_find_device(intf); in wdm_disconnect()
944 dev_dbg(&intf->dev, "%s: %d open files - postponing cleanup\n", __func__, desc->count); in wdm_disconnect()
949 static int wdm_suspend(struct usb_interface *intf, pm_message_t message) in wdm_suspend() argument
951 struct wdm_device *desc = wdm_find_device(intf); in wdm_suspend()
954 dev_dbg(&desc->intf->dev, "wdm%d_suspend\n", intf->minor); in wdm_suspend()
992 dev_err(&desc->intf->dev, in recover_from_urb_loss()
999 static int wdm_resume(struct usb_interface *intf) in wdm_resume() argument
1001 struct wdm_device *desc = wdm_find_device(intf); in wdm_resume()
1004 dev_dbg(&desc->intf->dev, "wdm%d_resume\n", intf->minor); in wdm_resume()
1013 static int wdm_pre_reset(struct usb_interface *intf) in wdm_pre_reset() argument
1015 struct wdm_device *desc = wdm_find_device(intf); in wdm_pre_reset()
1037 static int wdm_post_reset(struct usb_interface *intf) in wdm_post_reset() argument
1039 struct wdm_device *desc = wdm_find_device(intf); in wdm_post_reset()