[sane-devel] Problem with libusb and 64 bits 2.6.25 kernel

Dennis Lou dlou99 at yahoo.com
Tue Jun 24 04:53:40 UTC 2008


Right now my build system is acting a bit screwy.  I started working on another USB device and now xsane isn't working, so I think I messed something up and am not currently set up to do sane development at the moment.

In any case, I took a look at the patch.  Basically, it's a one-liner that changes the minimum block size from 512 to the remainder.  The reason I chose a 512 byte minimum block size is that the Windows driver does it that way, so I imitated.  If the patch works in 64bit libusb, it looks to me that it would likely work in 32bit as well.  However, it may take me a few days to rebuild my sane development environment and confirm.

My recollection of the USB spec is a bit hazy, but 64bit libusb behavior doesn't seem correct to me.

-Dennis

----- Original Message ----
From: Nicolas <nicolas.martin at freesurf.fr>
To: Dennis Lou <dlou99 at yahoo.com>
Cc: mrsam-guest at alioth.debian.org; sane-devel <sane-devel at lists.alioth.debian.org>
Sent: Saturday, June 21, 2008 9:07:56 AM
Subject: Re: [sane-devel] Problem with libusb and 64 bits 2.6.25 kernel

Hi Dennis, 

A bug was opened a while back by Sam Varshavchik, concerning the pixma
backend for Canon ImageClass MF-4270, when compiled and used on a 64
bits platform (no issue so far on 32 bits), details are given here:

https://alioth.debian.org/tracker/?group_id=30186&atid=410366&func=detail&aid=310861

We shared with Sam some info to try to locate the origin, which looked
to be related to the 64 bits libusb. 

Sam has performed investigations since then, his conclusions spot on
that 32 and 64 bits libusb behave slightly differently when reading data
from USB, more precisely, the 64 bits libusb seems to expect an exact
count of bytes to read (but not 32 bits libusb), and fails (timeout) if
such count is not satisfied.

Sam, in his last post on the bug report page, proposes a patch, which
looks to me fine for both 32 and 64 bits, and impacts only the
ImageClass part of the backend. 

Dennis, If you don't mind, could you also have a look and give a try, so
that we can commit into CVS.

Nicolas


      



More information about the sane-devel mailing list