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