USB transfers stuck in kernel/libusb not sent out until next transfer is submitted

Peer Stritzinger peerst at gmail.com
Thu Oct 18 16:02:00 UTC 2012


Hi,

I have a embedded system that communicates to gateway devices via just
on IN and OUT bulk endpoint.
With one kind of gateway devices it works like a charm via High-Speed USB2.

Now we've built another gateway thats using Full-Speed USB only (using
one of the Atmega CPUS).

We were experiencing lost transfers that never reached the gateway.
After first suspecting the gateway we now concluded that the gateway
is not losing this transfers.

I see transfers being submitted to libusb with
libusb_submit_transfer(), but they are not showing up in the callback,
neither as completed nor as any errors.

I'm also watching the USB Bus with a sniffer and I don't see this
transfers being sent.  What I see however that older transfers that
were also missing are sent at the same time I submit a new transfer.

This only seems to happen if I send a few OUT transfers consecutively
(not sure if waiting in between helps) without any IN transfers in
between.

The gateway is always ready to receive more OUT transfers, I never see
a NAK in the traces.

Unfortunately the FreeBSD on these devices is relatively old:

FreeBSD triton.stritzinger.com 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat
Nov 21 15:48:17 UTC 2009
root at almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

It would screw up my deadlines if I need to upgrade the OS to make
this work again, so I thought I asked first:

* Is this a known problem thats being already fixed in newer
FreeBSD's? (so if I loose the time I can be sure it works then)

* Is there a workaround to get this running without upgrading first
(would help a lot meeting the deadline, then upgrading in my own time)

* Any tips how to debug this further?

Cheers,
-- Peer


More information about the freebsd-usb mailing list