Date: Thu, 5 Jul 2007 17:24:30 +0200 From: Hans Petter Selasky <hselasky@c2i.net> To: "Xiaofan Chen" <xiaofanc@gmail.com> Cc: freebsd-usb@freebsd.org Subject: Re: libusb usb_interrupt_read hangs under FreeBSD Message-ID: <200707051724.30175.hselasky@c2i.net> In-Reply-To: <a276da400707041005k636319bax582c018c46da00ef@mail.gmail.com> References: <a276da400704030427g6fcfdc37u43bdf0fd1cd69ea8@mail.gmail.com> <a276da400704040434y6451900eg95e3cd2f35cae593@mail.gmail.com> <a276da400707041005k636319bax582c018c46da00ef@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 04 July 2007 19:05, Xiaofan Chen wrote: > > On 4/4/07, Hans Petter Selasky <hselasky@c2i.net> wrote: > > > On Wednesday 04 April 2007 01:55, Xiaofan Chen wrote: > > > > On 4/3/07, Hans Petter Selasky <hselasky@c2i.net> wrote: > > > > > Hi, > > > > > > > > > > I think that your device is broken, and goes bad when it receives a > > > > > clear-stall request for the interrupt pipe. That is not very > > > > > uncommon. > > > > > > > > Could you be more clearer? I'd like to communicate this problem > > > > to the firmware developer of PICKit 2 inside Microchip. Thanks. > > > > > > The chip does not handle a clear-stall request on the control pipe to > > > clear-stall on the interrupt pipe. The result is that the interrupt > > > pipe stops, or at least all buffers are cleared. > > > > > > I could be more detailed, but I think the developers will understand > > > what I mean. > > Sorry to dig out this again. I read a bit more on the firmware source code > and I found the following. Seems a bit dubious. The USB controller used > is Microchip 18F2550. > > Any comments? Thanks in advance. > This pre-condition does not always hold: > * > * PreCondition: A STALL packet is sent to the host by the SIE. > * Usually the clear-stall is specific to an endpoint, which is stored in the lower byte of "wIndex". Where does this "wIndex" end up? > if(UEP0bits.EPSTALL == 1) > { > USBPrepareForNextSetupTrf(); // Firmware Work-Around > UEP0bits.EPSTALL = 0; > } > UIRbits.STALLIF = 0; > }//end USBStallHandler > > Maybe this code path has never been taken before? --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707051724.30175.hselasky>