# Re: Tamarack 12000C, SCSI problems

From: abel deuring (a.deuring@satzbau-gmbh.de)
Date: Sat Feb 24 2001 - 06:34:54 PST

- Next message: Henning Meier-Geinitz: "Re: always Segmentation Fault"
  - Previous message: Oliver Neukum: "Re: usb-scsi driver problem with SET_WINDOW?"
  - In reply to: Florian Jenn: "Tamarack 12000C, SCSI problems"
  - Next in thread: Florian Jenn: "Re: Tamarack 12000C, SCSI problems"
  - Reply: Florian Jenn: "Re: Tamarack 12000C, SCSI problems"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  Florian Jenn wrote:
  >
  > Hi!
  >
  > I'm working with Linux, Kernel 2.2.12 and tried to get a Tamarack
  > Artiscan 12000C SCSI-Scanner working with Sane 1.0.4.
  >
  > Both scanimage (e.g. with --test) and xscanimage come up with the
  > following error:
  >
  > scanimage: sanei_scsi.c:3707: sanei_scsi_cmd: Assertion
  > `src_size == cmd_size' failed.
  >
  > This results from the call
  >
  > status = sanei_scsi_cmd (s->fd, &cmd, sizeof (cmd)+2, buf,
  > &nbytes);
  >
  > in line 565 of backends/tamarack.c. (That `+2' seems a bit strange to
  > me...)
  >
  > Searching the mailing list archive resulted in some mails where the
  > sanei_scsi_cmd function was modified because of problems with command
  > sizes and the sg driver. Yet I don't know very much about Sane
  > internals to get a clue what exactly is wrong in my case.

  Florian,

  Right, this '+2' is indeed strange, and right, there were problems with
  command length and older versions of the Linux SG driver.

  But these problems occured for vendor specific SCSI commands for Canon
  scanners, while the assert failure with the tamarack backend happens for
  the well standardized READ command. OTOH your suspicion is correct, that
  the assert failure is related to the modifications I made for correct
  handling of vendor specific commands. Without these patches, the
  Tamarack backend would probably run under Linux. But the assert I
  introduced is exactly the same as used in Sane's SCSI layer for other
  operating systems.

  Anyway, this '+2' does not make any sense: It means that two bytes of
  _write data_ should be sent to the scanner for the READ command, while
  it should return nbytes of scan data. This can't work -- a command can
  either write data to a device or it can read data.

  So I'd recommend to simply omit this '+2'. Please let me know, if it
  works.

  Abel

      --
      Source code, list archive, and docs: http://www.mostang.com/sane/
      To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

  - Next message: Henning Meier-Geinitz: "Re: always Segmentation Fault"
  - Previous message: Oliver Neukum: "Re: usb-scsi driver problem with SET_WINDOW?"
  - In reply to: Florian Jenn: "Tamarack 12000C, SCSI problems"
  - Next in thread: Florian Jenn: "Re: Tamarack 12000C, SCSI problems"
  - Reply: Florian Jenn: "Re: Tamarack 12000C, SCSI problems"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  This archive was generated by hypermail 2b29 : Sat Feb 24 2001 - 05:15:06 PST