lx_emul: fix unplug of unclaimed USB devices

USB devices that are never associated to client sessions lack
usb_per_dev_data (and a kernel thread). Therefore, the devices should be
discontinued directly on unplug as no URBs can be pending.

Issue 
This commit is contained in:
Christian Helmuth 2023-06-26 11:55:23 +02:00 committed by Norman Feske
parent afaabb3121
commit ea294fff0c

@ -800,6 +800,9 @@ static int raw_notify(struct notifier_block *nb, unsigned long action, void *dat
if (data) {
data->dev = NULL;
lx_emul_task_unblock(data->task);
} else {
/* discontinue unclaimed device */
genode_usb_discontinue_device(udev->bus->busnum, udev->devnum);
}
break;
}