[sane-devel] usb_clear_halt() in sanei_usb_read_int(), correct?

Wittawat Yamwong wy-sane-devel at arcor.de
Wed May 24 00:24:37 UTC 2006


Hi,

Why is usb_clear_halt() called unconditionally when usb_interrupt_read() 
returns an error? A possible error can be -ETIMEDOUT for example and in this 
case there is no need to call usb_clear_halt(). I've a problem that interrupt 
packets get lost from time to time because of usb_clear_halt().

I did a grep and it seems that only avision backend currently uses 
sanei_usb_read_int(). Will the backend still work if I modify the function so 
that it calls usb_clear_halt() if and only if a halt condition really 
occurred? (usb_interrupt_read() returns -EPIPE)

Regards 
-- 
Wittawat Yamwong
Hannover, Germany



More information about the sane-devel mailing list