Discussion:
SANE's scanimage -L hangs system hard
(too old to reply)
Al Savage
2013-02-08 17:42:38 UTC
Permalink
It's hard to summarize these things in a terse fashion.

Summary:
Attempting to use SANE's scanimage.exe locks up the computer hard. No
POPUPLOG entry, no trap screen. The eCenter CPU load freezes, as does
the clock, and the mouse doesn't move, all I can do is pull the power
cord. Same problem on two identical computers (but differing version of
OS, different SCSI HAs and cables). Both computers can boot WinXP and
are able to scan well using TWAIN & PMView there.

Details:
I'd been all-SCSI until two years ago, when I went all-SATA, except for
two old large-format SCSI scanners. I gave away all my SCSI HDDs and
HAs, keeping only three HAs for these two scanners.

The HAs are Adaptec 2940UW Pro and 2930B.
I use the 2002 driver AIC7870.ADD v10.1.3
The HA BIOSs have been updated to the latest level for many years.

The last SANE that worked here was the 1.0.22 of Nov2011; I had not
tried the later Jan/Feb2012 release.

The scanner has an "In" and "Out" port. I've always had a separate,
expensive active terminator (with LED indicator) on the "Out" port.

As there is only the scanner on the SCSI chain on either computer, I
have set the 2930B & 2940UW Pro to Termination Enable for the adapter.
Automatic has worked fine in the past, though.

I've also turned off "Allow Disconnect/Reconnect" in the adapter
settings, and tried different SCSI bus speeds, and tried toggling "Auto
Negotiation" of bus width.

Recently, I migrated my W4 (FP17 HPFS386) box to newer hardware. In the
process, many OS files had to be changed. I needed APIC to work. I had
to move the kernel from 14.104 to 14.105_SMP, etc. Memory went from 1Gb
to 2Gb.

I've been attempting to get the scanners working with the same version
of SANE (or any version) and the new hardware. After a number of hours,
I also set up an eCS box with SCSI and SANE and tried from there as
well. Both boxes exhibit the same problem of a hard system hang at a
certain point after running sane-find-scanner or scanimage.

After trying two older sane releases (.15 & .18), for recent testing
I've been sticking with the last port: 1.0.22-os2-20120131 and the eCS
box.

I added these to CONFIG.SYS (without the versioning comments):

REM *** 07Feb2013 Added SCSI support for AHA2940 family
basedev=AIC7870.ADD /V (v10.1.3)
BASEDEV=OS2SCSI.DMD (v10.70)
BASEDEV=OS2ASPI.DMD /ALL (v10.70)
DEVICE=c:\OS2\BOOT\ASPIROUT.SYS /v (v1.1b10)


I'm using:
SET SANE_DEBUG_DLL=255
SET SANE_DEBUG_SANEI_SCSI=255
SET SANE_DEBUG_MUSTEK=255
SET SANE_DEBUG_SANEI_THREAD=255

I can't take screenshots when it's hung, so I resorted to a camera. I've
commented out everything in dll.conf except my scanner:

scanimage -L
Loading Image...

At the time of the screenshots, the system is dead-dead; all I can do is
pull the power cord.

I ran ASPIROUT.SYS' ASPIDBUG.exe /F and captured a log of the ASPI
interaction prior to a system hang:

1: Set buffer (pre): 02E7:0000
1: Set buffer (post): Status 0x0000; RC: 0

2: Send SRB (pre): 02DF:21A0; Inquiry; HA: 0; Ext. sig: 0x0000; Ext.
length: 0
2: Send SRB (post): Status 0x0000; SRB Status: 0x01
Num HA: 2; HA ID: 7; Ext. sig: 0x0000; Ext. length: 0
AspiMgr: 'OS2ASPI Dev Mgr '; Host: ''; Unique: ''

3: Send SRB (pre): 02DF:21A0; Inquiry; HA: 0; Ext. sig: 0x0000; Ext.
length: 0
3: Send SRB (post): Status 0x0000; SRB Status: 0x01
Num HA: 2; HA ID: 7; Ext. sig: 0x0000; Ext. length: 0
AspiMgr: 'OS2ASPI Dev Mgr '; Host: ''; Unique: ''

4: Send SRB (pre): 02DF:21A0; Device Type; HA,ID,LUN: 0,0,0
Ext. sig: 0x0000; Ext. length: 0
4: Send SRB (post): Status 0x0000; SRB Status: 0x82

5: Send SRB (pre): 02DF:21A0; Device Type; HA,ID,LUN: 0,1,0
Ext. sig: 0x0000; Ext. length: 0
5: Send SRB (post): Status 0x0000; SRB Status: 0x82

6: Send SRB (pre): 02DF:21A0; Device Type; HA,ID,LUN: 0,2,0
Ext. sig: 0x0000; Ext. length: 0
6: Send SRB (post): Status 0x0000; SRB Status: 0x82

7: Send SRB (pre): 02DF:21A0; Device Type; HA,ID,LUN: 0,3,0
Ext. sig: 0x0000; Ext. length: 0
7: Send SRB (post): Status 0x0000; SRB Status: 0x82

8: Send SRB (pre): 02DF:21A0; Device Type; HA,ID,LUN: 0,4,0
Ext. sig: 0x0000; Ext. length: 0
8: Send SRB (post): Status 0x0000; SRB Status: 0x82

9: Send SRB (pre): 02DF:21A0; Device Type; HA,ID,LUN: 0,5,0
Ext. sig: 0x0000; Ext. length: 0
9: Send SRB (post): Status 0x0000; SRB Status: 0x82

10: Send SRB (pre): 02DF:21A0; Device Type; HA,ID,LUN: 0,6,0
Ext. sig: 0x0000; Ext. length: 0
10: Send SRB (post): Status 0x0000; SRB Status: 0x01; Device Type: 6
Ext. sig: 0x0000; Ext. length: 0

11: Send SRB (pre): 02DF:21A0; Command; HA,ID,LUN: 0,6,0; Flags: 0x09
Data pointer: 0000:0000; Data length: 5; Sense length: 32; CDB length: 6
CDB (Unknown command): 12 00 00 00 05 00

[system hang]

The scanner is the only SCSI device, and it's ID is 6,0, so that looks
correct right up to entry 11.

Entry 11's DBD's command is 12 (INQUIRY), and the system hangs before a
response is found.

Anybody know where I should be looking next?
--
Regards,
Al S.
Al Savage
2013-02-08 20:13:56 UTC
Permalink
Post by Al Savage
I use the 2002 driver AIC7870.ADD v10.1.3
My mistake: make that v10.3.1
--
Regards,
Al S.
David H. Durgee
2013-02-08 20:45:02 UTC
Permalink
Post by Al Savage
Post by Al Savage
I use the 2002 driver AIC7870.ADD v10.1.3
My mistake: make that v10.3.1
I have an IBM Server 320 and I still use the 8.157 version dated as
1996/07/08 as I would encounter hangs with later versions and gave up on
trying them. Perhaps they finally got things worked out, perhaps you
need features that the later drivers have. If not, perhaps it would be
worth trying an older driver.

Dave
Paul Ratcliffe
2013-02-08 22:01:10 UTC
Permalink
Post by Al Savage
11: Send SRB (pre): 02DF:21A0; Command; HA,ID,LUN: 0,6,0; Flags: 0x09
Data pointer: 0000:0000; Data length: 5; Sense length: 32; CDB length: 6
CDB (Unknown command): 12 00 00 00 05 00
[system hang]
The scanner is the only SCSI device, and it's ID is 6,0, so that looks
correct right up to entry 11.
Entry 11's DBD's command is 12 (INQUIRY), and the system hangs before a
response is found.
Anybody know where I should be looking next?
Having a data pointer of 0000:0000 isn't going to get you very far is it?

I thought this would have been verified so as not to crash, but it's years
since I looked at the ASPIROUT code. Anyway it's an application problem...
Dave Yeo
2013-02-09 04:14:13 UTC
Permalink
Post by Al Savage
Anybody know where I should be looking next?
Just a guess, an IRQ problem? Some drivers don't like high IRQs
Dave
Al Savage
2013-02-09 05:15:28 UTC
Permalink
Post by Dave Yeo
Just a guess, an IRQ problem? Some drivers don't like high IRQs
The IRQ for the SCSI HA is 11 in BIOS, however . . .
. . . Hardware Manager on eCS says ACPI has moved it to IRQ 22. A good
guess, Dave.
--
Regards,
Al S.
Dave Yeo
2013-02-09 07:45:02 UTC
Permalink
Post by Al Savage
Post by Dave Yeo
Just a guess, an IRQ problem? Some drivers don't like high IRQs
The IRQ for the SCSI HA is 11 in BIOS, however . . .
. . . Hardware Manager on eCS says ACPI has moved it to IRQ 22. A good
guess, Dave.
Can you reserve 11 in the MB BIOS probably in the plug'n'play section?
Dave
Al Savage
2013-02-09 08:11:04 UTC
Permalink
Post by Dave Yeo
Post by Al Savage
The IRQ for the SCSI HA is 11 in BIOS, however . . .
. . . Hardware Manager on eCS says ACPI has moved it to IRQ 22. A good
guess, Dave.
Can you reserve 11 in the MB BIOS probably in the plug'n'play section?
Well, sorta. The BIOS lets me juggle three (and only three) IRQs
between about 15 devices, most of which are Intel controllers of various
things (USB, sound, vid). Yes, the Adaptec HA is set to 11 there.

I set the PSD to /PIC; Hardware Manager then says the SCSI is using IRQ
11, and "scanimage -L" no longer hangs, but operates like it should.

/PIC is not the optimum solution, though.

I've tried to add "REMAP 22 to 11" in %boot%\OS2\BOOT\ACPI.cfg and
remvoing /PIC from PSD line, but Hardware Manager still says SCSI HA is
using 22.

Right now, it looks like I need to learn how to configure REMAP (if
possible) or obtain a SCSI HA with a driver that can use all the IRQs
that ACPI can. I've used Adaptec 29xx HAs for over 15 years, but time
marches on, and if I need to switch to another, I would.
--
Regards,
Al S.
Dave Yeo
2013-02-09 08:28:46 UTC
Permalink
Post by Al Savage
Post by Dave Yeo
Can you reserve 11 in the MB BIOS probably in the plug'n'play section?
Well, sorta. The BIOS lets me juggle three (and only three) IRQs
between about 15 devices, most of which are Intel controllers of various
things (USB, sound, vid). Yes, the Adaptec HA is set to 11 there.
I was thinking of the legacy section but I'd guess it has gone away in
newer BIOS.
Does it make any difference which slot it is in? My NIC doesn't like
sharing IRQs so it only works in one of my three PCI slots.
Dave
Percival P. Cassidy
2013-02-09 13:43:53 UTC
Permalink
Post by Al Savage
Post by Dave Yeo
Post by Al Savage
The IRQ for the SCSI HA is 11 in BIOS, however . . .
. . . Hardware Manager on eCS says ACPI has moved it to IRQ 22. A good
guess, Dave.
Can you reserve 11 in the MB BIOS probably in the plug'n'play section?
Well, sorta. The BIOS lets me juggle three (and only three) IRQs
between about 15 devices, most of which are Intel controllers of various
things (USB, sound, vid). Yes, the Adaptec HA is set to 11 there.
I set the PSD to /PIC; Hardware Manager then says the SCSI is using IRQ
11, and "scanimage -L" no longer hangs, but operates like it should.
/PIC is not the optimum solution, though.
What is the disadvantage of using /PIC?
Post by Al Savage
I've tried to add "REMAP 22 to 11" in %boot%\OS2\BOOT\ACPI.cfg and
remvoing /PIC from PSD line, but Hardware Manager still says SCSI HA is
using 22.
Right now, it looks like I need to learn how to configure REMAP (if
possible) or obtain a SCSI HA with a driver that can use all the IRQs
that ACPI can. I've used Adaptec 29xx HAs for over 15 years, but time
marches on, and if I need to switch to another, I would.
As has been pointed out on the Yahoo! group, ACPI.CFG is no longer
implemented.

Perce
Harald Kamm
2013-02-09 14:35:38 UTC
Permalink
Post by Al Savage
Right now, it looks like I need to learn how to configure REMAP (if
possible) or obtain a SCSI HA with a driver that can use all the IRQs
that ACPI can. I've used Adaptec 29xx HAs for over 15 years, but time
marches on, and if I need to switch to another, I would.
Did you try the /VW switch? I still use 29xx HAs without any problem.

--
Al Savage
2013-02-09 05:51:29 UTC
Permalink
Post by Dave Yeo
Just a guess, an IRQ problem? Some drivers don't like high IRQs
Hah! It's right in the ACPI docs (psd_en.inf), under "Special Driver
Considerations":
Drivers that do not work with interrupt numbers higher than 15
SYS_HI.ADD
SYM_8XX.ADD
AIC7870.ADD
IPSRAID.ADD
--
Regards,
Al S.
Peter Brown
2013-02-09 16:05:10 UTC
Permalink
Hi Al
Post by Al Savage
Post by Dave Yeo
Just a guess, an IRQ problem? Some drivers don't like high IRQs
Hah! It's right in the ACPI docs (psd_en.inf), under "Special Driver
Drivers that do not work with interrupt numbers higher than 15
SYS_HI.ADD
SYM_8XX.ADD
AIC7870.ADD
IPSRAID.ADD
Check out the The ACPI.PSD command line section in the psd_en.inf file.

As Harald points out you should be able to use the /VW switch which does
not allow high IRQs but does allow multiple cpus.


Regards

Pete
Al Savage
2013-02-15 18:57:01 UTC
Permalink
On Sat, 9 Feb 2013 16:05:10 UTC, Peter Brown
Post by Peter Brown
As Harald points out you should be able to use the /VW switch which does
not allow high IRQs but does allow multiple cpus.
Following up: I am using the /VW switch.

While I believe that a better solution would be to repair what's broken,
the resources do not appear to exist to accomplish that (ie I don't have
the funds to ask someone knowledgeable to fix whatever is broken; likely
AIC7870.ADD).
--
Regards,
Al S.
Loading...