Dr. Ing. Dieter Jurzitza wrote: > Dear Listmembers, > obviously I did something wrong when setting SANE_DEBUG_SANEI_SCSI=255 the > last > time. However, I said I would retry on January, 7th (back to work :-( ) > > Please have a look on the attachement. If it tells you something, let me know. > If not - sigh! > > By the way - this is sane 1.08 src-rpm from the SuSE 8.1 distribution, > compiled[sanei_scsi] sanei_scsi.issue: 0x70260008 dev_max(currently)=11 max_active_device=6 (origin 1) scsi_dma_free_sectors=2192 sg_pool_secs_aval=320 def_reserved_size=32768 >>> device=sg5 scsi1 chan=0 id=2 lun=0 em=0 sg_tablesize=127 excl=1 FD(1): timeout=60000ms bufflen=131072 (res)sgat=4 low_dma=0 cmd_q=1 f_packid=0 k_orphan=0 closed=0 No requests active [sanei_scsi] sanei_scsi.issue: bad write (errno=22) Invalid argument -1 > on Sparc. > > Hope you will have an idea how to proceed, > many thanks for your efforts in advance,
This is an interesting error; it occurs for the very first SCSI command sent to the scanner: [sanei_scsi] sanei_scsi.issue: 0x70260008 dev_max(currently)=11 max_active_device=6 (origin 1) scsi_dma_free_sectors=2192 sg_pool_secs_aval=320 def_reserved_size=32768 >>> device=sg5 scsi1 chan=0 id=2 lun=0 em=0 sg_tablesize=127 excl=1 FD(1): timeout=60000ms bufflen=131072 (res)sgat=4 low_dma=0 cmd_q=1 f_packid=0 k_orphan=0 closed=0 No requests active [sanei_scsi] sanei_scsi.issue: bad write (errno=22) Invalid argument -1 errno 22 is EINVAL; this error is returned by the SG driver for version 3 SG headers, if the header size passed by the caller (i.e., sanei_scai.c, functions sanei_scsi_req_enter and issue) in a write() or read() call does not match the size expected by the SG driver. You wrote in your first mail that you try to run Sane as a 32 bit application on a 64 bit machine. I don't have any serious experience with 64 bit machines -- but since the size argument in the write() call in sanei_scsi.c/issue is simply sizeof(Sg_io_hdr), which looks quite correct, I can only guess that the SG driver expects struct Sg_io_hdr consists 64 of bit pointers, buffer length parameters etc, while the application provides only 32 bit parameters. Can somebody with more experience on possible "32/64 bit problems" comment on this guess? Abel