On Fri, 13 Feb 2004, Alan Stern wrote:

> On Thu, 12 Feb 2004, Guennadi Liakhovetski wrote:
>
> > And thanks for rememberring about this problem. Have you got any
> > additional information about the VIA specifics?
>
> A contact at VIA says that this particular error occurs only in USB
> controllers with revision number < 5.  I think your experience proves that
> he is wrong.

Alas...

> > Short:
> > 00:07.2 USB Controller: VIA Technologies, Inc. UHCI USB (rev 16)
> > 00:07.3 USB Controller: VIA Technologies, Inc. UHCI USB (rev 16)
> >
> > Long (-vv) attached at the end (don't think it's needed, just in case).
> > The EHCI card in the other PC has revision 50 and, as reported before, has
> > the same problem.
>
> Unless your camera is a high-speed device, when you plug it into an EHCI
> controller it will be automatically handed off to the companion full-speed
> controller -- which is probably also a VIA UHCI.

Exactly. The chips are VIA, and the UHCI companion is revision 50.

> At the moment, the only way we have for preventing these problems is to
> not allow them to happen in the first place.  That means making certain
> that all reads from a USB device request a multiple of the maximum packet
> size, even if the amount of data expected is smaller.  That way a babble
> error is impossible unless the USB device is _really_ broken.
>
> If you feel up to it, you could try editing the gphoto2 source.  Find the
> part that handles the file listing transfers, and round the transfer
> length up to the next multiple of the maxpacket size (probably 64 but
> check in /proc/bus/usb/devices).

Well, I did try. It worked. gphoto2 fails every other "list files"
command, because it gets confused by those extra bytes, but, at least, I
don't get the babble... Well, it's not a nice solution, of course. You
can't "fix" every user-space application like that. The driver should be
able to handle such problems. Or, at least, not hang... If you don't want
to mask VIA's bugs, maybe we could just implement a timeout to return with
an error, and, at least, let the user to reload the driver? At the moment,
I can generate one event on the bus (e.g. by re-plugging the camera) to
finish the hanging gphoto2, and one more to unload the driver:-))

Thanks
Guennadi
---
Guennadi Liakhovetski




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to