libusb: avoid active polling of control URBs

Some control URBs have to be handled synchronously within the
libusb, to meet the semantics of get_device_descriptor, set_interface,
etc., but this was using the VFS libusb plugin in a way that it
polled actively during the control URB being active. This commit
removes the not desired polling behaviour.

Fix genodelabs/genode#5469
This commit is contained in:
Stefan Kalkowski 2025-02-28 12:02:20 +01:00 committed by Norman Feske
parent f4d5e480e3
commit c053c46fae

View File

@ -199,9 +199,13 @@ void Usb_device::_wait_for_urb(Urb &urb)
.revents = 0
};
if (urb.completed())
break;
int poll_result = poll(&pollfds, 1, -1);
if ((poll_result != 1) || !(pollfds.revents & POLLIN))
error("could not complete request");
libusb_genode_backend_signaling = false;
}
}