Subject: panic: wdc_atapi_intr: bad state
To: None <current-users@netbsd.org>
From: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
List: current-users
Date: 10/15/2001 02:48:01
I have a Toshiba Portege 4000. When trying to mount the CDROM, the machine
explodes:

	# mount -t cd9660 /dev/cd0d /mnt
        pciide0:1:0: lost interrupt
                type: atapi tc_bcount: 32 tc_skip: 0
        pciide0:1:0: bus-master DMA error: missing interrupt, status=0x21
        cd0: transfer error, downgrading to Ultra-DMA mode 1
        cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 1 (using DMA data transfers)
        pciide0:1:0: lost interrupt
                type: atapi tc_bcount: 32 tc_skip: 0
        pciide0:1:0: bus-master DMA error: missing interrupt, status=0x21
        pciide0:1:0: bad state 0 in wdc_atapi_intr
        panic: wdc_atapi_intr: bad state

        Stopped at    0xx024e108: leave
        db> t
        cpu_Debugger()
        panic()
        wd_atapi_intr()
        wdctimeout()
        softclock()
        hardclock()
        clockintr()
        Xintr0()
        --- interrupt ---
        idle()
        bpendtsleep()
        apm_thread()
        db> 

The same things happens on 1.5.1, 1.5.2 and the 20010827 snapshot from
ftp.netbsd.org, the traceback above is from the netbd-1-5 branch.

Below is a (slightly truncated at the start) dmesg output of the
machine. If someone knows any help, I'll be happy to try patches etc.


 - Hubert



LPHA (NOON) #5: Mon Oct 15 03:46:32 CEST 2001
    feyrer@noon:/usr/cvs/src-1.5/sys/arch/i386/compile/NOON
cpu0: Intel Pentium III (Coppermine) (686-class), 747.80 MHz
total memory = 239 MB
avail memory = 109 MB
using 11424 buffers containing 119 MB of memory
BIOS32 rev. 0 found at 0xf9ab1
PCI BIOS rev. 2.1 found at 0xfe5ae
pcibios: config mechanism [1][x], special cycles [x][x], last bus 5
PCI IRQ Routing Table rev. 1.0 found at 0xf01d0, size 176 bytes (9 entries)
PCI Interrupt Router at 000:07:0 (Acer Labs M1543 PCI-ISA Bridge)
------------------------------------------
  device vendor product pin PIRQ IRQ stage
------------------------------------------
000:06:0 0x10b9 0x5451   A  0x07  11  0    already assigned
000:10:0 0x8086 0x1229   A  0x03  11  0    already assigned
000:16:0 0x104c 0xac50   A  0x02  11  0    fixed up
000:17:0 0x1179 0x060a   A  0x00  11  0    already assigned
000:17:1 0x1179 0x060a   B  0x01  11  0    already assigned
000:18:0 0x1179 0x0805   A  0x02  11  0    already assigned
001:00:0 0x1023 0x8820   A  0x02  11  0    already assigned
------------------------------------------
PCI bridge 0: primary 0, secondary 1, subordinate 1
PCI bridge 1: primary 0, secondary 2, subordinate 2
PCI bridge 2: primary 0, secondary 3, subordinate 3
PCI bridge 3: primary 0, secondary 4, subordinate 4
PCI bus #4 is the last bus
[System BIOS Setting]-----------------------
  device vendor product
  register space address    size
--------------------------------------------
000:00:0 0x10b9 0x1644 
	10h mem  0xf0000000 0x04000000
		[OK]
000:01:0 0x10b9 0x5247 
		[OK]
000:02:0 0x10b9 0x5237 
	10h mem  0xf7eff000 0x00001000
		[OK]
000:04:0 0x10b9 0x5229 
	20h port 0x0000eff0 0x00000010
		[OK]
000:06:0 0x10b9 0x5451 
	10h port 0x0000ed00 0x00000100
	14h mem  0xf7efe000 0x00001000
		[OK]
000:07:0 0x10b9 0x1533 
		[OK]
000:08:0 0x10b9 0x7101 
		[OK]
000:10:0 0x8086 0x1229 
	10h mem  0xf7efd000 0x00001000
	14h port 0x0000eb40 0x00000040
	18h mem  0xf7d00000 0x00100000
		[OK]
000:16:0 0x104c 0xac50 
	10h mem  0x00000000 0x00001000
		[NG]
000:17:0 0x1179 0x060a 
	10h mem  0x00000000 0x00001000
		[NG]
000:17:1 0x1179 0x060a 
	10h mem  0x00000000 0x00001000
		[NG]
000:18:0 0x1179 0x0805 
	10h mem  0xf7cffe00 0x00000200
		[OK]
001:00:0 0x1023 0x8820 
	10h mem  0xfc000000 0x02000000
	14h mem  0xfbc00000 0x00400000
	18h mem  0xf8000000 0x02000000
	1ch mem  0xf7ff8000 0x00008000
		[OK]
--------------------------[  3 devices bogus]
 Physical memory end: 0x0ef5d000
 PCI memory mapped I/O space start: 0x0f000000
[PCIBIOS fixup stage]-----------------------
  device vendor product
  register space address    size
--------------------------------------------
000:00:0 0x10b9 0x1644 
	10h mem  0xf0000000 0x04000000
		[OK]
000:01:0 0x10b9 0x5247 
		[OK]
000:02:0 0x10b9 0x5237 
	10h mem  0xf7eff000 0x00001000
		[OK]
000:04:0 0x10b9 0x5229 
	20h port 0x0000eff0 0x00000010
		[OK]
000:06:0 0x10b9 0x5451 
	10h port 0x0000ed00 0x00000100
	14h mem  0xf7efe000 0x00001000
		[OK]
000:07:0 0x10b9 0x1533 
		[OK]
000:08:0 0x10b9 0x7101 
		[OK]
000:10:0 0x8086 0x1229 
	10h mem  0xf7efd000 0x00001000
	14h port 0x0000eb40 0x00000040
	18h mem  0xf7d00000 0x00100000
		[OK]
000:16:0 0x104c 0xac50 
	10h mem  0x0f000000 0x00001000
		[OK]
000:17:0 0x1179 0x060a 
	10h mem  0x0f001000 0x00001000
		[OK]
000:17:1 0x1179 0x060a 
	10h mem  0x0f002000 0x00001000
		[OK]
000:18:0 0x1179 0x0805 
	10h mem  0xf7cffe00 0x00000200
		[OK]
--------------------------[  0 devices bogus]
mainbus0 (root)
pnpbios0 at mainbus0: nodes 14, max len 246
pnpbios0: node index mismatch (static): requested 0, got 1
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 0 function 0
pchb0: Acer Labs product 0x1644 (rev. 0x01)
ppb0 at pci0 dev 1 function 0: Acer Labs product 0x5247 (rev. 0x00)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
vga1 at pci1 dev 0 function 0: Trident Microsystems product 0x8820 (rev. 0x82)
wsdisplay0 at vga1: console (80x25, vt100 emulation)
ohci0 at pci0 dev 2 function 0: Acer Labs M5237 USB Host Controller (rev. 0x03)
ohci0: interrupting at irq 11
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: Acer Labs OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 4 ports with 4 removable, self powered
pciide0 at pci0 dev 4 function 0: Acer Labs M5229 UDMA IDE Controller (rev. 0xc3)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
wd0 at pciide0 channel 0 drive 0: <TOSHIBA MK3017GAP>
wd0: drive supports 16-sector pio transfers, lba addressing
wd0: 28615 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 58605120 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5
pciide0: primary channel interrupting at irq 14
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (using DMA data transfers)
pciide0: secondary channel wired to compatibility mode
atapibus0 at pciide0 channel 1
cd0 at atapibus0 drive 0: <CD-224E-BA, , 7.7C> type 5 cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2
pciide0: secondary channel interrupting at irq 15
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (using DMA data transfers)
Acer Labs product 0x5451 (audio multimedia, revision 0x01) at pci0 dev 6 function 0 not configured
pcib0 at pci0 dev 7 function 0
pcib0: Acer Labs M1543 PCI-ISA Bridge (rev. 0x00)
Acer Labs M7101 Power Management Controller (miscellaneous bridge) at pci0 dev 8 function 0 not configured
fxp0 at pci0 dev 10 function 0: Intel i82557 Ethernet, rev 8
fxp0: interrupting at irq 11
fxp0: Ethernet address 00:00:39:40:40:9a, 10/100 Mb/s
inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 4
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
cbb0 at pci0 dev 16 function 0: Texas Instruments product 0xac50 (rev. 0x01)
cbb1 at pci0 dev 17 function 0: Toshiba America Info Systems ToPIC95B CardBus-PCI Bridge (rev. 0x07)
cbb2 at pci0 dev 17 function 1: Toshiba America Info Systems ToPIC95B CardBus-PCI Bridge (rev. 0x07)
Toshiba America Info Systems product 0x0805 (miscellaneous system, revision 0x03) at pci0 dev 18 function 0 not configured
isa0 at pcib0
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
isapnp0: no ISA Plug 'n Play devices found
cbb0: interrupting at irq 11
cbb0: cacheline 0x8 lattimer 0x20
cbb0: bhlc 0x24008 lscp 0x20020200
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 2 device 0 cacheline 0x8, lattimer 0x20
pcmcia0 at cardslot0
cbb1: interrupting at irq 11
cbb1: cacheline 0x0 lattimer 0x0
cbb1: bhlc 0x824000 lscp 0x30300
cardslot1 at cbb1 slot 1 flags 0
cardbus1 at cardslot1: bus 3 device 0 cacheline 0x0, lattimer 0x0
pcmcia1 at cardslot1
cbb2: interrupting at irq 11
cbb2: cacheline 0x0 lattimer 0x0
cbb2: bhlc 0x824000 lscp 0x40400
cardslot2 at cbb2 slot 2 flags 0
cardbus2 at cardslot2: bus 4 device 0 cacheline 0x0, lattimer 0x0
pcmcia2 at cardslot2
apm0 at mainbus0: Power Management spec V1.2
biomask effd netmask effd ttymask ffff
IPsec: Initialized Security Association Processing.
pcmcia0: CIS version PC Card Standard 5.0
pcmcia0: CIS info: TOSHIBA, Wireless LAN Card, Version 01.01, 
pcmcia0: Manufacturer code 0x156, product 0x2
pcmcia0: function 0: network adapter, ccr addr 3e0 mask 1
pcmcia0: function 0, config table entry 1: I/O card; irq mask ffff; iomask 6, iospace 0-3f; io16 irqpulse irqlevel
wi0 at pcmcia0 function 0
wi0: address 00:02:2d:24:45:63
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0

-- 
Want to get a clue on IPv6 but don't know where to start? Try this:
* Basics -> http://www.onlamp.com/pub/a/onlamp/2001/05/24/ipv6_tutorial.html
* Setup  -> http://www.onlamp.com/pub/a/onlamp/2001/06/01/ipv6_tutorial.html 
Of course with your #1 IPv6 ready operating system -> http://www.NetBSD.org/