Subject: kern/6488: pcmcia aic0 (APA-1640/B SCSI Host Adapter) no longer works with current
To: None <gnats-bugs@gnats.netbsd.org>
From: None <frueauf@ira.uka.de>
List: netbsd-bugs
Date: 11/23/1998 21:21:30
>Number:         6488
>Category:       kern
>Synopsis:       pcmcia aic0 (APA-1640/B SCSI Host Adapter) no longer works with current
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 23 12:35:00 1998
>Last-Modified:
>Originator:     Thorsten Frueauf
>Organization:
private
	
>Release:        <NetBSD-current source date> NetBSD-current 22.11.1998
>Environment:
	
This is a Toshiba Tecra 500CDT laptop (i386) with 3COM 589 pcmcia ethernet card
and Adaptec APA-1460 SCSI Host Adapter with an IBM DCAS-34330 attached
to it. The dmesg normally looks like:

NetBSD 1.3H (CYBERLAP) #3: Tue Nov 17 22:24:03 MET 1998
    frueauf@cyberlap:/usr/src/sys/arch/i386/compile/CYBERLAP
cpu0: family 5 model 2 step c
cpu0: Intel Pentium (P54C) (586-class)
real mem  = 50069504
avail mem = 44695552
using 636 buffers containing 2605056 bytes of memory
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o enabled, memory enabled
pchb0 at pci0 dev 0 function 0
pchb0: Toshiba Info Systems (2nd PCI Vendor ID) product 0x0601 (rev. 0x11)
Chips and Technologies 65550 (VGA display, revision 0x05) at pci0 dev 4 function 0 not configured
isa0 at mainbus0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
lpt0 at isa0 port 0x378-0x37b irq 7
wdc0 at isa0 port 0x1f0-0x1f7 irq 14
wd0 at wdc0 channel 0 drive 0: <TOSHIBA MK2101MAN>
wd0: drive supports 16-sector pio transfers, lba addressing
wd0: 2067MB, 4200 cyl, 16 head, 63 sec, 512 bytes/sect x 4233600 sectors
wd0: 32-bits data port
wd0: drive supports PIO mode 4, DMA mode 2
wdc1 at isa0 port 0x170-0x177 irq 15
atapibus0 at wdc1 channel 0
cd0 at atapibus0 drive 0: <TOSHIBA CD-ROM XM-1402B, 7510115238, 0186> type 5 cdrom removable
cd0: drive supports PIO mode 3
sb0 at isa0 port 0x220-0x237 irq 5 drq 1: dsp v3.02
audio0 at sb0
opl at sb0 not configured
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
sysbeep0 at pcppi0
npx0 at isa0 port 0xf0-0xff: using exception 16
vt0 at isa0 port 0x60-0x6f irq 1
vt0: generic, 80 col, color, 8 scr, mf2-kbd, [R3.32]
pms0 at vt0 irq 12
vt0: console
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
pcic0 at isa0 port 0x3e0-0x3e1 iomem 0xd0000-0xd3fff: using irq 3
pcic0: controller 0 (Intel 82365SL Revision 1) has sockets A and B
pcmcia0 at pcic0 controller 0 socket 0
pcmcia0: CIS version PCMCIA 2.0 or 2.1
pcmcia0: CIS info: 3Com Corporation, 3C589, TP/BNC LAN Card Ver. 2a, 000002
pcmcia0: Manufacturer code 0x101, product 0x589
pcmcia0: function 0: network adapter, ccr addr 10000 mask 3
pcmcia0: function 0, config table entry 1: I/O card; irq mask ffff; iomask 4, iospace 0-f; rdybsy_active wp_active bvd_active io8 io16 irqlevel
pcmcia0: function 0, config table entry 3: I/O card; irq mask ffff; iomask 4, iospace 0-f; rdybsy_active wp_active bvd_active io8 io16 irqlevel
ep0 at pcmcia0 function 0 port 0x330-0x33f: 3Com 3c589 10Mbps Ethernet
ep0: address 00:60:97:40:bc:a7, 8KB byte-wide FIFO, 5:3 Rx:Tx split
ep0: 10baseT, 10base5, 10base2 (default 10baseT)
pcmcia1 at pcic0 controller 0 socket 1
pcmcia1: CIS version PCMCIA 2.0 or 2.1
pcmcia1: CIS info: Adaptec, Inc., APA-1460 SCSI Host Adapter, Version 0.01
pcmcia1: Manufacturer code 0x12f, product 0x2
pcmcia1: function 0: unspecified, ccr addr 2000 mask 1
pcmcia1: function 0, config table entry 9: I/O card; irq mask 1e00; iomask a, iospace 340-35f; rdybsy_active wp_active bvd_active io16 irqlevel
pcmcia1: function 0, config table entry 8: I/O card; irq mask 1e00; iomask a, iospace 140-15f; rdybsy_active wp_active bvd_active io16 irqlevel
aic0 at pcmcia1 function 0 port 0x340-0x35f: Adaptec APA-1460/B SCSI Host Adapter
scsibus0 at aic0: 8 targets
sd0 at scsibus0 targ 0 lun 0: <IBM, DCAS-34330, S65A> SCSI2 0/direct fixed
sd0: 4134MB, 8205 cyl, 6 head, 171 sec, 512 bytes/sect x 8467200 sectors
pcmcia1: card irq 9
apm0 at mainbus0: Power Management spec V1.1
apm0: battery life expectancy: 96%
apm0: A/C state: on
apm0: battery charge state: high charging
apm0: estimated 1h 28m
biomask c240 netmask c240 ttymask d2ca
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs

 Aperture driver for XFree86 version 1.6
pcmcia0: card irq 11

>Description:
	
When booting a current kernel (build from src supped at 22.11.1998)
on my laptop with just the Adaptec pcmcia card inserted, but no
disk attached to it, it works like normal.

But at home, where I have a IBM DCAS-34330 4GB scsi disk attached,
the kernel hangs after telling the biomask - the scsi drive LED
remains on:

[...]
	[ did not write down everything before that ]

aic0 at pcmcia1 function 0 port 0x340-0x35f: Adaptec APA-1460/B SCSI Host Adapter
scsibus0 at aic0: 8 targets
pcmcia1: card irq 9

	[ Note that the normal bootup shows this "pcmcia1: card irq 9"
	  after the disk probe ]

sd0 at scsibus0 targ 0 lun 0: <IBM, DCAS-34330, S65A> SCSI2 0/direct fixed
sd0: 4134MB, 8205 cyl, 6 head, 171 sec, 512 bytes/sect x 8467200 sectors
apm0 at mainbus0: Power Management spec V1.1
apm0: battery life expectancy: 96%
apm0: A/C state: on
apm0: battery charge state: high charging
apm0: estimated 1h 28m
biomask c040 netmask c040 ttymask d0ca

	[ Note that this biomask differs from normal boot too! Normaly its
	  biomask c240 netmask c240 ttymask d2ca ]

stray interrupt 9
pcmcia1: card irq9

And now the machine just hangs - the LED from the disk is still on.
If I try a reboot via CTRL-ALT-DEL the LED keeps being on and the
bootup hangs at the same part, but this time constanly printing:

probe(aic0:0:0): timed out
probe(aic0:0:0): timed out AGAIN

A kernel build from src supped 17.11.1998 works ok, so something
in between must have broke this.

>How-To-Repeat:
	

Boot a current kernel on a Toshiba Tecra 500CDT laptop (i386) with
an Adaptec APA-1460 PCMCIA SCSI Host Adapter and a scsi disk
attached and watch it hanging.

>Fix:
	
Wish I would know, sorry :-(
>Audit-Trail:
>Unformatted:
pcmcia aic0 (APA-1640/B SCSI Host Adapter) no longer works with current