[sane-devel] further to the Solaris 'sgen' driver issue with sane/microtek

Henning Meier-Geinitz henning@meier-geinitz.de
Tue, 9 Apr 2002 18:39:13 +0200


Hi,

On Tue, Apr 09, 2002 at 08:50:04PM +1000, Craig Dewick wrote:
> Reading the Microtek backend web page at "http://www.mir.com/mtek" I
> noticed a way to get debug info displayed.

I have mentioned this in my first response to your email.

> [microtek] sane_init:  config- /dev/scsi/scanner/c6t6d0
> [microtek] attach_scanner: /dev/scsi/scanner/c6t6d0
> [microtek] attach_scanner:  opening /dev/scsi/scanner/c6t6d0
> [microtek] attach_scanner:  open failed

Microtek isn't very elaborate about what has happened. It looks like
the call to sanei_scsi_open failed. Maybe you get more information by
additionally setting SANE_DEBUG_SANEI_SCSI=255 .

Look at sanei/sanei_scsi.c. There are three interfaces used in the code:
SOLARIS_INTERFACE, SOLARIS_SG_INTERFACE and SOLARIS_USCSI_INTERFACE.
Maybe it detects the wrong interface? I'm copying the code that
decides which interface to use:

#elif defined (HAVE_SYS_SCSI_SGDEFS_H)
# define USE SOLARIS_SG_INTERFACE
# include <sys/scsi/sgdefs.h>
#elif defined (HAVE_SYS_SCSI_TARGETS_SCGIO_H)
# define USE SOLARIS_INTERFACE
# define SOL2
# include <sys/scsi/targets/scgio.h>
#elif defined (HAVE_SYS_SCSI_SCSI_H)
  /*
   * the "offical" solaris uscsi(7I) interface; comes last, so that users
   * installing the SCG/SG driver can still use these generic scsi interfaces
   */
# define USE SOLARIS_USCSI_INTERFACE
# define SOL2
# include <sys/scsi/scsi.h>

Bye,
  Henning