On Tue, 8 Feb 2005, Steve Hosgood wrote: > I've written a driver for a USB camera which sends 1600x1200 or 800x600 > images across a USB 2.0 bulk pipe. It works fine in 1600x1200 mode, but > if switched to 800x600 mode it only gets a couple of frames before it > wedges. > > I took a look at the USB traffic with a (borrowed) USB analyser. Sadly, > I've had to give it back to its owner now, and won't be able to repeat > the experiment. > > The bulk pipe runs in 512 byte packet mode. > > Turns out that 800x600 images don't fit in an integral number of 512 > byte packets, and the last packet of every image is sent as 256 bytes > (this seems perfectly legal). However, *that's* what kills linux. > Occasionally it will handle the situation right, but very soon it will > wedge and never poll that endpoint again. > > You can reset the device and get going again, but that's not a lot of > good to me! > > The 1600x1200 pixel images transfer just fine: They do fit in an exact > number of 512 byte packets. > > I can send 800x600 images if I tell the camera to run in "16 bits per > pixel mode" where it sends 2 bytes per pixel (it just so happens that it > can do that, and thus sends an integral number of 512 byte packets of > course).
A few details would help, such as the contents of /proc/bus/usb/devices and a system log with CONFIG_USB_DEBUG turned on. Are you certain that it isn't your driver that gets wedged, rather than the rest of the USB subsystem? Can you provide log messages showing the system getting into a state where your driver has successfully submitted an URB but the endpoint is not being polled? Alan Stern ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel