Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Apr 2005 22:20:48 +0200
From:      Sebastien B <sebastien.b@swissinfo.org>
To:        hselasky@c2i.net
Cc:        freebsd-usb@freebsd.org
Subject:   Re: panic: uhci_abort_xfer: not in process context
Message-ID:  <200504022220.49835.sebastien.b@swissinfo.org>
In-Reply-To: <200504021316.59434.hselasky@c2i.net>
References:  <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <200504021101.11602.sebastien.b@swissinfo.org> <200504021316.59434.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> > > You can call usbd_transfer(), if the transfer is not
> > > synchronous.
> >
> > But it is. To send network packets, I must perform two USB transfers on
> > two different endpoints, and I must wait for the first one to complete
> > before initiating the second.
>
> What you need to do is to allocate two [non synchronous] transfers besides
> from the data transfer. The callback of the first transfer starts the
> second transfer. The callback of the second transfer starts the data
> transfer. Then you need to make a flag so that the first transfer is not
> started again, before the data transfer has been started.

This requires a quite complex locking mechanism by comparison to scheduling a 
software interrupt handler.
Why is using a software interrupt handler and synchronous transfers wrong ?
I've disabled the timeout in usbd_bulk_transfer() and it does not panic 
anymore. So this is indeed the timeout function which causes the panic when 
it is called.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200504022220.49835.sebastien.b>