[sane-devel] sane to work with USB 3.0

Olaf Meeuwissen olaf.meeuwissen at avasys.jp
Wed Nov 12 23:40:15 UTC 2014

m. allan noah writes:

> I have added a USB3 port to my computer, and have spent a few days
> investigating this problem.

I haven't had that kind of time, yet :-(

> It seems to be a bug in Linux kernel related to a bookkeeping error
> when the USB device is closed.  [...]
> I have committed these changes to sane-backends git repo in
> 7a590f362e7e93979b706dd9e6ae34584e926ec3. If users of fujitsu scanners
> could try it out, I would appreciate any feedback. Note that this does
> not fix USB3 problems in other sane backends. Until the kernel is
> fixed, these types of repairs will have to be made on a per-backend
> basis, at the discretion of the maintainer.

But I did take a quick look at your patch and had a feeling of deja vu.
A quick `git grep r_cmd_count` found `backend/epson.c` which has the
very same logic in it (and as a result of a fork, `backend/epson2-io.c`
has it as well).  A quick `git blame backend/epson.c` reveals that this
is code from 2005, well before USB3!

The commit message is telling.

  "flaming hack to get USB scanners working without timeouts under linux"
  submitted by "Steve" (in comment to bug #300830)

Is history repeating itself?

Hope this helps,
Olaf Meeuwissen, LPIC-2           FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962               Help support software freedom

More information about the sane-devel mailing list