[sane-devel] Microtek Film Scan 35

abel deuring adeuring at gmx.net
Sun Jan 8 16:27:58 UTC 2006


Henning Meier-Geinitz wrote:
> Hi,
> 
> On 2006-01-08 14:27, Volker Kuhlmann wrote:
>>Most annoying that it doesn't work with SCSI scanners on 64bit machines,
>>something a recompile would fix. Hence my recent question about write()
>>encapsulation in sanei_scsi.c (which no-one replied to :( ).
> 
> I didn't answer because I'm not really sure about SCSI and 64bit
> systems. As far as I know there is no special handling for 64bit
> systems in our SCSI code.
> 
> If somebody else needs such a special handling because of the
> binary-only nature of his software, it's up to him to fix the problems
> caused by this. 
> 
> If there are general problems with sanei_scsi/SANE on 64 bit systems,
> I'd like to know about this. As far as I know, this is not the case,
> however.

The problem is probably the same that has been discussed for Linux
on 64 bit Sparc machines some time ago. The SG interface version 3
can't deal with 32 bit programs on a 64 bit kernel. In read/write
calls of the SG driver, the application passes 32 bit pointers to
three buffers (SCSI command, data buffer, sense data) to the SG
driver, while the driver expects 64 bit pointers to these buffers.
As a workaround, one can enforce the usage of the old interface, by
inserting the line

#define DISABLE_LINUX_SG_IO 1

at the start of sanei_scsi.c. OK, a proper solution would be to add
a configure option, but I am not familiar enough with the details of
autoconf to tell how to implement such an option.

Abel



More information about the sane-devel mailing list