Date: Fri, 23 Jul 2010 20:59:40 +0200 From: Peer Stritzinger <peerst@gmail.com> To: Hans Petter Selasky <hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: FreeBSD 8: libusb async mode + select(2) = nogo? Message-ID: <AANLkTikkjvV-=mg1w=z45Pd5Gr6iPtZRrYrKnP7_7Yzi@mail.gmail.com> In-Reply-To: <201007231921.45803.hselasky@c2i.net> References: <AANLkTikk7L-63c6wQb0YKoYovGKPcT932Lc9n6mRrmK9@mail.gmail.com> <201007231657.47682.hselasky@c2i.net> <AANLkTi=a__R7gNvE371zs1vNpMXLFXS-09joihFQc-_H@mail.gmail.com> <201007231921.45803.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 23, 2010 at 7:21 PM, Hans Petter Selasky <hselasky@c2i.net> wrote: > Should work, but it might be that the second poll, when you try to process the > events, don't work like expected. After any event on the two fd's you should > call "libusb_handle_events_locked()" using a "tv = NULL". With libusb_handle_events_locked() instead of libusb_handle_events_timeout() there is no improvement ... It looks like if there is a IN alread pending on the bus when program runs the first select call returns the filedesc correctly but after this nothing triggers the second select. At least most of the time it looks like IN transfers that are received during the second select are somehow swallowed unhandled. If there is no IN pending on the bus the first select also returns but libusb_handle_events_locked() doesn't call a callback, then the second select also fails. Regards -- Peer Could it be that after the poll() in lib_usb_handle_events_*() libusb or the usb stack is somewhat in a corrupt state?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikkjvV-=mg1w=z45Pd5Gr6iPtZRrYrKnP7_7Yzi>