mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 15:43:56 +00:00
lx_emul usb: handle RPC calls after async-URBS
Prevent missing new RPC calls handed over to a Linux task of a corresponding usb-device, while that task blocked during enqueuing of asynchronous URBs. Fixed genodelabs/genode#4955
This commit is contained in:
committed by
Norman Feske
parent
62a0605cf0
commit
cccb763737
@ -691,6 +691,15 @@ static int poll_usb_device(void * args)
|
|||||||
handle_rpc(data);
|
handle_rpc(data);
|
||||||
while (check_for_urb(data->dev)) ;
|
while (check_for_urb(data->dev)) ;
|
||||||
while (check_for_urb_done(&data->file)) ;
|
while (check_for_urb_done(&data->file)) ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* we have to check for RPC handling once again,
|
||||||
|
* during asynchronous URB handling the Linux task might
|
||||||
|
* have been blocked and a new RPC entered the entrypoint
|
||||||
|
*/
|
||||||
|
handle_rpc(data);
|
||||||
|
|
||||||
|
/* check if device got removed */
|
||||||
if (!data->dev) {
|
if (!data->dev) {
|
||||||
struct usb_device * udev = find_usb_device(bus, dev);
|
struct usb_device * udev = find_usb_device(bus, dev);
|
||||||
release_device(data, udev ? 1 : 0);
|
release_device(data, udev ? 1 : 0);
|
||||||
|
Reference in New Issue
Block a user