Lines Matching full:ud

176 		usbip_start_eh(&udc->ud);  in vgadget_pullup()
182 usbip_event_add(&udc->ud, VUDC_EVENT_REMOVED); in vgadget_pullup()
183 usbip_stop_eh(&udc->ud); /* Wait for eh completion */ in vgadget_pullup()
429 static void vudc_shutdown(struct usbip_device *ud) in vudc_shutdown() argument
431 struct vudc *udc = container_of(ud, struct vudc, ud); in vudc_shutdown()
436 if (ud->tcp_socket) in vudc_shutdown()
437 kernel_sock_shutdown(ud->tcp_socket, SHUT_RDWR); in vudc_shutdown()
439 if (ud->tcp_rx) { in vudc_shutdown()
440 kthread_stop_put(ud->tcp_rx); in vudc_shutdown()
441 ud->tcp_rx = NULL; in vudc_shutdown()
443 if (ud->tcp_tx) { in vudc_shutdown()
444 kthread_stop_put(ud->tcp_tx); in vudc_shutdown()
445 ud->tcp_tx = NULL; in vudc_shutdown()
448 if (ud->tcp_socket) { in vudc_shutdown()
449 sockfd_put(ud->tcp_socket); in vudc_shutdown()
450 ud->tcp_socket = NULL; in vudc_shutdown()
463 static void vudc_device_reset(struct usbip_device *ud) in vudc_device_reset() argument
465 struct vudc *udc = container_of(ud, struct vudc, ud); in vudc_device_reset()
474 spin_lock_irqsave(&ud->lock, flags); in vudc_device_reset()
475 ud->status = SDEV_ST_AVAILABLE; in vudc_device_reset()
476 spin_unlock_irqrestore(&ud->lock, flags); in vudc_device_reset()
479 static void vudc_device_unusable(struct usbip_device *ud) in vudc_device_unusable() argument
483 spin_lock_irqsave(&ud->lock, flags); in vudc_device_unusable()
484 ud->status = SDEV_ST_ERROR; in vudc_device_unusable()
485 spin_unlock_irqrestore(&ud->lock, flags); in vudc_device_unusable()
518 struct usbip_device *ud = &udc->ud; in init_vudc_hw() local
573 spin_lock_init(&ud->lock); in init_vudc_hw()
574 mutex_init(&ud->sysfs_lock); in init_vudc_hw()
575 ud->status = SDEV_ST_AVAILABLE; in init_vudc_hw()
576 ud->side = USBIP_VUDC; in init_vudc_hw()
578 ud->eh_ops.shutdown = vudc_shutdown; in init_vudc_hw()
579 ud->eh_ops.reset = vudc_device_reset; in init_vudc_hw()
580 ud->eh_ops.unusable = vudc_device_unusable; in init_vudc_hw()