Re: SYM22801 & HP Scanjet 5P Sane problems...

From: Douglas Gilbert (dgilbert@interlog.com)
Date: Fri Mar 31 2000 - 20:00:36 PST


Rogier Stam wrote:
>
> Hi Peter,
>
> Thanks for replying to my email. I really cannot find what I'm doing
> wrong. I've added an extract from the /var/log/messages file. These
> messages appear directly after the start of xscanimage (with or without
> any options specified, it does not matter), just before it segfaults.
> Mar 31 21:31:49 Drizzt kernel: sym53c876-0-<3,*>: target did not report
> SYNC.
> Mar 31 21:31:52 Drizzt kernel: sym53c876-0-<6,*>: asynchronous.
>
> I've also added the /proc/scsi/scsi file, so you can see what's where :
>
> Attached devices:
> Host: scsi0 Channel: 00 Id: 03 Lun: 00
> Vendor: HP Model: C5110A Rev: 3701
> Type: Processor ANSI SCSI revision: 02
> Host: scsi0 Channel: 00 Id: 04 Lun: 00
> Vendor: IOMEGA Model: ZIP 100 Rev: J.03
> Type: Direct-Access ANSI SCSI revision: 02
> Host: scsi0 Channel: 00 Id: 06 Lun: 00
> Vendor: HP Model: C1533A Rev: 9608
> Type: Sequential-Access ANSI SCSI revision: 02
> Host: scsi1 Channel: 00 Id: 04 Lun: 00
> Vendor: PLEXTOR Model: CD-ROM PX-40TS Rev: 1.10
> Type: CD-ROM ANSI SCSI revision: 02
> Host: scsi1 Channel: 00 Id: 05 Lun: 00
> Vendor: PHILIPS Model: CDD3600 CD-R/RW Rev: 2.00
> Type: CD-ROM ANSI SCSI revision: 02
> Host: scsi1 Channel: 00 Id: 06 Lun: 00
> Vendor: IBM Model: DDRS-39130D Rev: DC1G
> Type: Direct-Access ANSI SCSI revision: 02
>
> You can find the output generated by hpinq in the attached file
> (hpinq.out). It seems to work normally, that's the odd thing.
> The output from the find-scanner tool also suggests that the scanner can
> be found by sane....
>
> find-scanner: found processor "HP C5110A 3701" at device /dev/scanner
> find-scanner: found processor "HP C5110A 3701" at device /dev/sg0
> find-scanner: found processor "HP C5110A 3701" at device /dev/sga

/dev/sg0 and /dev/sga are synonymous (with the former now preferred).
/dev/scanner, if present, should be a symbolic link to the preferred
scanner device. In lk 2.4 the sg driver will announce seeing a
scanner device with a message like:
    Detected scsi generic sg0 at scsi1, channel 0, id 5, lun 0, type 6

where as in lk 2.2 it will say:
    Detected scsi generic sga at scsi1, channel 0, id 5, lun 0

[Note that HP use type 3 ("Processor") for scanners.]

To further confuse things lk 2.4 optionally supports a device pseudo
file system in which the actual device will be found at:
    /dev/scsi/host1/bus0/target5/lun0/generic
With luck most distros will set up the devfs daemon to make /dev/sg0 ,
/dev/sga be symbolic links to the appropriate generic device. Ide
devices (and perhaps usb devices, I haven't checked) use a similar
naming convention.

> Another odd thing I found (I don't know if it's related), is when I run
> the scsi_info tool on /dev/sga. The result is the following :
>
> SCSI_ID="0,3,0"
> MODEL="Direct-A "
> FW_REV="SCSI"
>
> That should say something like what can be found in the /proc/scsi/scsi
> file as far as I know, which would make me expect that model would be
> C5110A instead of Direct-A .....

This is confusing. Eric Youngdale has written a tool called
"scsiinfo" that outputs mode page information about scsi
devices (and I have a variant called "sginfo" which is
equivalent). "scsiinfo -i /dev/sg0" yields the correct
inquiry information.

The "scsi_info" (1.12 1999/07/20 16:04:26) is an unrelated
program that tries to analyse the output of /proc/scsi/scsi.
On my system (running a 2.3.99-pre3 kernel):

$ cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 06 Lun: 00
  Vendor: YAMAHA Model: CRW4416S Rev: 1.0g
  Type: CD-ROM ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: IBM Model: DCHS04U Rev: 2727
  Type: Direct-Access ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 02 Lun: 00
  Vendor: IBM Model: DCHS04U Rev: 2727
  Type: Direct-Access ANSI SCSI revision: 02
Host: scsi3 Channel: 00 Id: 02 Lun: 00
  Vendor: PIONEER Model: DVD-ROM DVD-303 Rev: 1.10
  Type: CD-ROM ANSI SCSI revision: 02

Now let's try scsi_info on the 4 scsi devices:

$ ./scsi_info /dev/sg0
could not find SCSI host in /proc/scsi: Success
SCSI_ID="0,6,0"
MODEL="CD-ROM "
FW_REV="SCSI"

$ ./scsi_info /dev/sg1
SCSI_ID="0,0,0"
MODEL="CD-ROM "
FW_REV="SCSI"

$ ./scsi_info /dev/sg2
SCSI_ID="0,2,0"
MODEL="CD-ROM "
FW_REV="SCSI"

$ ./scsi_info /dev/sg3
could not find SCSI host in /proc/scsi: Success
SCSI_ID="0,2,0"
MODEL="CD-ROM "
FW_REV="SCSI"

The output is wrong and/or misleading in all 4 cases.
"scsi_info" needs to be retired or fixed. I'll take
the subject up with its author.

I don't think this has any bearing on your problem.

Doug Gilbert

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



This archive was generated by hypermail 2b29 : Fri Mar 31 2000 - 19:25:42 PST