2001-03-14 16:57:42

by David Härdeman

[permalink] [raw]
Subject: Problems with SCSI on 2.4.X

Hi,

I'm having some problems using SCSI-generic (sg loaded as module) to
access my scanner on linux 2.4 (using SANE).

I've been using 2.2.0 - 2.2.19pre17 without any problems, but when I
changed to 2.4 the problems started. 2.4.1 gave the following entries in
my kernel log file (id 7 = scsi card, id 6 = scanner, id 0 = hd):

Mar 10 20:06:15 palpatine kernel: scsi : aborting command due to timeout
: pid 0, scsi0, channel 0, id 6,
lun 0 Read (6) 00 00 5e 8d 00
Mar 10 20:06:17 palpatine kernel: SCSI host 0 abort (pid 0) timed out -
resetting
Mar 10 20:06:17 palpatine kernel: SCSI bus is being reset for host 0
channel 0.
Mar 10 20:06:28 palpatine kernel: (scsi0:0:0:0) Synchronous at 80.0
Mbyte/sec, offset 15

I saw that the Adaptec driver was changed in the latest prereleases so i
tried 2.4.3pre4 which gave me:

Mar 14 15:48:10 palpatine kernel: scsi0:0:6:0: Attempting to queue an
ABORT message
Mar 14 15:48:10 palpatine kernel: (scsi0:A:6:0): Queuing a recovery SCB
Mar 14 15:48:10 palpatine kernel: scsi0:0:6:0: Device is disconnected,
re-queuing SCB
Mar 14 15:48:10 palpatine kernel: Recovery code sleeping
Mar 14 15:48:10 palpatine kernel: Recovery SCB completes
Mar 14 15:48:10 palpatine kernel: Recovery code awake
Mar 14 15:48:10 palpatine kernel: aic7xxx_abort returns 8194
Mar 14 15:48:11 palpatine kernel: scsi0:0:6:0: Attempting to queue a
TARGET RESET message
Mar 14 15:48:11 palpatine kernel: scsi0:0:6:0: Command not found
Mar 14 15:48:11 palpatine kernel: aic7xxx_dev_reset returns 819

If you need more info just mail me and I'll provide it...

Thanks,
David
[email protected]


2001-03-14 20:08:07

by Douglas Gilbert

[permalink] [raw]
Subject: Re: Problems with SCSI on 2.4.X

[email protected] wrote:

> I'm having some problems using SCSI-generic (sg loaded as module) to
> access my scanner on linux 2.4 (using SANE).
>
> [snip output showing timeouts]

This is most likely caused by a bug in SANE 1.0.3 and
1.0.4 which sets timeouts on commands to 10 seconds
rather than 10 minutes. The SANE code detects the new
sg driver in lk 2.4.x and mistakenly shortens the
timeout. This has been fixed in SANE's CVS (and
RedHat's 7.1 beta (fisher)).

Fix for SANE 1.0.4 : in file
sane-backends-1.0.4/sanei/sanei_scsi.c change line 1893
from:
req->sgdata.sg3.hdr.timeout = 10000;
to
req->sgdata.sg3.hdr.timeout = 10 * 60 * 1000;


If you look at the FAQ on the sg web site
( http://www.torque.net/sg ) under the SANE entry you will
find the same information ...

Doug Gilbert