On Wed, 20 Dec 2006, Phil Endecott wrote:

> Dear USB Experts,
> 
> I have a Net2280 PCI card and I'm trying to get the gadgetfs user-mode 
> test program from http://www.linux-usb.org/gadget/usb.c to work.  
> There's a second Linux box at the other end of the USB cable and both 
> ends are running 2.6.19.  I have encountered a problem which I think 
> could be a bug in the net2280 driver - though I suppose it's more likely 
> that I just don't understand it properly yet.
> 
> The test program sends descriptors to gadgetfs.  The two ends CONNECT.  
> The host asks for descriptors, and those that the kernel knows about 
> itself are sent OK.  Then the host asks for a string descriptor.  
> This is the responsibility of the test program.  Gadgetfs delegates 
> this request to userspace.
> 
> From here on the exact behaviour varies from one run to the next.  
> I think it is sensitive to how quickly the test program returns the 
> string descriptor data.  Certainly running the test program under 
> strace slows it down enough to change the behaviour.  However, much 
> of the time I believe that the Net2280 chip generates an interrupt 
> saying "ep0 IN fifo empty, data required" before the test program 
> has provided the string data for it to send.
> 
> As I understand it, at this point the driver should NOT write 
> anything to the fifo and the hardware should NAK.   Eventually the 
> test program would supply the string descriptor data and this 
> would be returned to the host.  But this doesn't seem to be what 
> happens.  It looks as if the hardware returns a ZLP immediately.  
> The host isn't satisfied with this, and looking at the host-end 
> code it retries a few times, then tries again asking for only 2 
> bytes (there's a comment about broken devices), and eventually 
> gives up.

This has been fixed in the current development kernels (-mm or Greg KH's 
development patch series).  Here is the patch:

http://marc.theaimsgroup.com/?l=linux-usb-devel&m=116369017318210&w=2

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to