usbd_bulk_transfer returns 1 (USBD_IN_PROGRESS) ?!
Seb
sebastien.b at swissinfo.org
Fri May 27 04:41:05 PDT 2005
Ok, I understood the problem.
But I didn't fix it with mutexes, I used semaphores instead.
I initialize a semaphore with a value equal to 1 and then, before the USB
transfers, I do :
mtx_unlock(&Giant);
sema_wait(&sc->usb_tx_sema);
mtx_lock(&Giant);
And after the USB transfers :
sema_post(&sc->usb_tx_sema);
Is this OK ? Apparently it has solved the problem, the driver now sustains
heavy network load :)
I wouln't like to use asynchronous transfers, they make the code hard to read
and would require all users to recompile their kernels to install your USB
driver...
Regards,
Sebastien
More information about the freebsd-usb
mailing list