On 03.10.2007 14:46, Joerg Platte wrote: > Am Mittwoch, 3. Oktober 2007 schrieb abel deuring: > Hi, > >> It is very weird that the SG_GET_SCSI_ID ioctl does not work: Could you >> check, if /dev/scanner -- should be a symlink -- indeed points to a >> device file of some SCSI device (ideally, to the scanner's device file)? > > I wrote this udev rule to create /dev/scanner: > SUBSYSTEMS=="scsi", SYSFS{vendor}=="SCANNER ", OWNER="saned", > GROUP="jplatte", > MODE="660", NAME="scanner" > > root at jako:~> ls -la /dev/scanner > crw-rw---- 1 saned jplatte 254, 5 2007-10-03 14:37 /dev/scanner > >> And if so, do you see any "suspicious" output in /var/log/messages? > > No. > >> Finally, can you run sane-find-scaner with SANE_DEBUG_SANEI_SCSI=255 and >> send us the output? > > Here it is: > root at jako:~> SANE_DEBUG_SANEI_SCSI=255 sane-find-scanner > > # sane-find-scanner will now attempt to detect your scanner. If the > # result is different from what you expected, first make sure your > # scanner is powered up and properly connected to your computer. > > [sanei_debug] Setting debug level of sanei_scsi to 255.
did not give me any clue, but you already found the cause of the problem :) And since the host adapter driver did not see any devices, we can't expect to get useful output. > [sanei_debug] Setting debug level of sanei_scsi to 255. > [sanei_scsi] sanei_scsi_find_devices: vendor=(null) model=(null) type=Scanner > bus=0 chan=0 id=6 lun=0 num=5 [...] >> And which SCSI adapter and which adapter driver are you using? > > An old Symbios based card > 02:07.0 SCSI storage controller: LSI Logic / Symbios Logic 53c875 (rev 26) > > with this driver: > sym53c8xx 66964 0 > scsi_transport_spi 20864 1 sym53c8xx > scsi_mod 122124 8 > sg,sr_mod,st,sd_mod,osst,sym53c8xx,scsi_transport_spi,libata Both driver and adapter are generally very reliable. > > After some reboots I discovered, that the scanner is recognized by > sane-add-scanner if it is turned on during system boot. It is not detected > after executing the following script to rescan all SCSI busses (I'm using > ata_piix, hence there is more than one SCSI bus): > for device in /sys/class/scsi_host/host*/scan ; do > echo "0 - -" > $device > done Yes, if the scanner is not known to its host adapter driver, no application will find it :) But it is nevertheless very weird that _some_ SCSI related IOCTLs worked, but SG_GET_SCSI_ID failed, probably for a "stale" device file. > With this script the kernel detects the scanner according to /proc/scsi/scsi > and the device node is created: > Host: scsi0 Channel: 00 Id: 06 Lun: 00 > Vendor: SCANNER Model: Rev: 2.02 > Type: Scanner ANSI SCSI revision: 01 CCS > > but then sane-add-scanner is not able to find it. Looks more like a kernel > bug, because this script worked fine with older kernels. right. Abel