[sane-devel] sane to work with USB 3.0

m. allan noah kitno455 at gmail.com
Fri Dec 12 02:05:34 UTC 2014


On Thu, Dec 11, 2014 at 2:21 AM, Olaf Meeuwissen
<olaf.meeuwissen at avasys.jp> wrote:
>
> m. allan noah writes:
>
>> I have just pushed your patches to git. They don't seem to help with
>> any scanner that I have, but I doubt they will hurt anything.
>
> Thanks!
>
>> It appears that we also have USB3 issues with Canon scanners as well-
>> they do use clear_halt frequently, and it seems that maybe the Linux
>> kernel is not passing them down to the scanner in some cases.
>
> Do they halt/stall that frequently?  If there's no stall, clear_halt
> should not be used, IIUC.  Hmm, it doesn't look like sanei_usb allows
> you to find out about that ...

Yeah, the Canon machines halt at the drop of a hat. I added
sanei_usb_clear_halt specifically for them.

But, no matter. Based on the threads linked from this post:
http://www.spinics.net/lists/linux-usb/msg105515.html I have come up
with a workaround that fixes both the Canon and the Fujitsu machines I
have access to. It seems the xhci controller refuses to transmit a
clear_halt to the device or reset the data 0/1 toggle in the host when
the ehci controller would. However, sending a set_interface command
for the interface that is already selected, seems to do both of those
things. So, I added a call to

sanei_usb_set_altinterface (s->fd, 0);

right before the calls to sanei_usb_close() or sanei_usb_clear_halt()
in those two backends, and everything suddenly seems to work.

I need to do some further testing, and see if these changes should be
moved up to sanei_usb instead of the backends.

allan
-- 
"well, I stand up next to a mountain- and I chop it down with the edge
of my hand"



More information about the sane-devel mailing list