[sane-devel] Canoscan LIDE 60 with 1.0.18 (and CVS HEAD) -> "invalid argument"

Philippe Troin phil at fifi.org
Mon Jun 4 22:02:36 UTC 2007


The hardware (/proc/bus/usb/devices):

T:  Bus=06 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 53 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1
P:  Vendor=04a9 ProdID=221c Rev= 3.06
S:  Manufacturer=Canon
S:  Product=CanoScan
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=   1 Ivl=16ms

This is a Canon LIDE 60.
If connected to a notebook (Fujitsu P7120), it works fine.
If connected to a dual Opteron 64-bit machine (which where I intend to
use it), scanimage reports this error:

% scanimage -d genesys:libusb:006:053
scanimage: open of device genesys:libusb:006:053 failed: Invalid argument

If I run it with debugging:

% SANE_DEBUG_GENESYS=65535 SANE_DEBUG_GENESYS_GL841=65535 \
  SANE_DEBUG_SANEI_USB=256 scanimage -d genesys:libusb:006:056

8< snip to the juicy part >8

[genesys_gl841] gl841_init
[genesys_gl841] gl841_init_registers
[genesys_gl841] gl841_setup_sensor
[genesys_gl841] gl841_init_registers complete
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 12, value = 135, index = 0, len = 1
[sanei_usb] 0000: 04                                              ................
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 12, value = 131, index = 0, len = 1
[sanei_usb] 0000: 0E                                              ................
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 12, value = 133, index = 0, len = 1
[sanei_usb] 0000: 00                                              ................
[genesys] sanei_genesys_write_register (0x0e, 0x00) completed
[genesys_gl841] gl841_bulk_write_register (size = 208)
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 4, value = 131, index = 0, len = 2
[sanei_usb] 0000: 01 A0                                           ................
[genesys_gl841] reg[0x01] = 0xa0
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 4, value = 131, index = 0, len = 2
[sanei_usb] 0000: 02 38                                           .8..............
[genesys_gl841] reg[0x02] = 0x38
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 4, value = 131, index = 0, len = 2
[sanei_usb] 0000: 03 5F                                           ._..............
[genesys_gl841] reg[0x03] = 0x5f
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 4, value = 131, index = 0, len = 2
[sanei_usb] 0000: 04 10                                           ................
[genesys_gl841] reg[0x04] = 0x10
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 4, value = 131, index = 0, len = 2
[sanei_usb] 0000: 05 40                                           . at ..............
[genesys_gl841] reg[0x05] = 0x40
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 4, value = 131, index = 0, len = 2
[sanei_usb] 0000: 06 18                                           ................
[genesys_gl841] reg[0x06] = 0x18
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 4, value = 131, index = 0, len = 2
[sanei_usb] 0000: 07 00                                           ................
USB error: error sending control message: Protocol error
[sanei_usb] sanei_usb_control_msg: libusb complained: error sending control message: Protocol error
[genesys_gl841] gl841_bulk_write_register: failed while writing command: Invalid argument
scanimage: open of device genesys:libusb:006:057 failed: Invalid argument
[genesys] sane_exit: start
[genesys] sane_exit: exit


However, if I apply this patch, everything works fine.

diff -b -u -r1.10 genesys_gl841.c
--- backend/genesys_gl841.c     10 Dec 2006 14:06:18 -0000      1.10
+++ backend/genesys_gl841.c     4 Jun 2007 22:00:54 -0000
@@ -1457,7 +1457,7 @@
     }


-  dev->reg[reg_0x06].value |= REG06_PWRBIT;
+  /*dev->reg[reg_0x06].value |= REG06_PWRBIT;*/
   dev->reg[reg_0x06].value |= REG06_GAIN4;

   dev->reg[reg_0x09].value |= 1 << REG09S_CLKSET;


Phil.



More information about the sane-devel mailing list