Subject: Re: panic: wdc_atapi_intr: bad state
To: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
From: Greg Troxel <gdt@fnord.ir.bbn.com>
List: current-users
Date: 11/13/2001 15:19:48
I'm running netbsd-1-5 from cvs update yesterday (1.5.3_ALPHA) on a
new box (1200 MHz Athlon, Asus A7A266 (alimagik1 chipset)).
I am having a similar problem with a cdrom, except that my machine is
not panicing.

The 1.5.2 multi-arch install cd booted, and lost reading the sets.
ftp install went fine.
Then, when running (just fine on two disks on primary ide), the CD
loses (ten-finger copy):

  # dd if=/dev/rcd0d of=/dev/null bs=32k count=20
  pciide0:1:0: lost interrupt
	  type: atapi tc_bcount: 32768 tc_skip: 0
  pciide0:1:0: bus-master DMA error: missing interrupt, status=0x21
  pciide0:1:0: device timeout c_bcount=32768, c_skip=0
  cd0: transfer error, downgrading to PIO mode 4
  cd0(pciide0:1:0): using PIO mode 4
  dd: /dev/rcd0d: Input/output error
  15+0 records in
  15+0 records out
  491520 bytes transferred in 30 secs (16384 bytes/sec)

I tried it again with

cd*	at atapibus? drive ? flags 0x00f0

and reading from the CD usually loses; see info at end of this dmesg.

I booted FreeBSD 4.2 from CD, and went into rescue mode with disk 2.
It also could not read the CD when running FreeBSD, although the BIOS
reads the CD fine to boot from.

Another random question: does the
  Acer Labs M5229 UDMA IDE Controller
shown below handle UDMA mode 5?  The driver seems to set the
capabilities to mode 2 for this chipset, and I can't see why.

I found a few PRs with similar trouble; it seems there is something
subtle going on that hasn't been figured out.

Any suggestions, other than telling me I should have bought an AMD 760
chipset machine with SCSI instead?

	Greg Troxel <gdt@ir.bbn.com>


Here's my whole dmesg:

NetBSD 1.5.3_ALPHA ([redacted]) #2: Tue Nov 13 14:07:00 EST 2001
    gdt@[redacted].ir.bbn.com:/home/gdt/NETBSD/netbsd-1-5/src/sys/arch/i386/compile/[redacted]
cpu0: AMD Athlon Model 4 (Thunderbird) (686-class), 1208.91 MHz
total memory = 511 MB
avail memory = 470 MB
using 6573 buffers containing 26292 KB of memory
BIOS32 rev. 0 found at 0xf0f70
mainbus0 (root)
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 0x1647 (rev. 0x04)
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: ATI Technologies Rage XL AGP 2x (rev. 0x27)
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 9
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. 0xc4)
pciide0: bus-master DMA support present
pciide0: primary channel configured to compatibility mode
wd0 at pciide0 channel 0 drive 0: <ST340016A>
wd0: drive supports 16-sector pio transfers, lba addressing
wd0: 38166 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 78165360 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5
wd1 at pciide0 channel 0 drive 1: <ST340016A>
wd1: drive supports 16-sector pio transfers, lba addressing
wd1: 38166 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 78165360 sectors
wd1: 32-bit data port
wd1: 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)
wd1(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 2 (using DMA data transfers)
pciide0: secondary channel configured to compatibility mode
atapibus0 at pciide0 channel 1
cd0 at atapibus0 drive 0: <SONY CD-RW CRX1611, , TYS3> type 5 cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2
pciide0: secondary channel interrupting at irq 15
cd0(pciide0:1:0): using PIO mode 4
ohci1 at pci0 dev 6 function 0: Acer Labs M5237 USB Host Controller (rev. 0x03)
ohci1: interrupting at irq 9
ohci1: OHCI version 1.0, legacy support
usb1 at ohci1: USB revision 1.0
uhub1 at usb1
uhub1: Acer Labs OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
pcib0 at pci0 dev 7 function 0
pcib0: Acer Labs M1543 PCI-ISA Bridge (rev. 0x00)
ppb1 at pci0 dev 10 function 0: Digital Equipment DECchip 21152 PCI-PCI Bridge (rev. 0x03)
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled
de0 at pci2 dev 4 function 0
de0: interrupting at irq 10
de0: 21143 [10-100Mb/s] pass 4.1
de0: address 00:80:c8:b9:59:0d
de1 at pci2 dev 5 function 0
de1: interrupting at irq 5
de1: 21143 [10-100Mb/s] pass 4.1
de1: address 00:80:c8:b9:59:0e
de2 at pci2 dev 6 function 0
de2: interrupting at irq 9
de2: 21143 [10-100Mb/s] pass 4.1
de2: address 00:80:c8:b9:59:0f
de3 at pci2 dev 7 function 0
de3: interrupting at irq 11
de3: 21143 [10-100Mb/s] pass 4.1
de3: address 00:80:c8:b9:59:10
Acer Labs M7101 Power Management Controller (miscellaneous bridge) at pci0 dev 17 function 0 not configured
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
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
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
lpt0 at isa0 port 0x378-0x37b irq 7
pcppi0 at isa0 port 0x61
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
isapnp0: no ISA Plug 'n Play devices found
biomask e345 netmask ef65 ttymask ffe7
Kernelized RAIDframe activated
IPsec: Initialized Security Association Processing.
warning: double match for boot device (wd0, wd1)
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
de0: enabling 100baseTX port
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
de1: autosense failed: cable problem?
de2: autosense failed: cable problem?
de3: autosense failed: cable problem?
wdc_atapi_intr: unknown phase 0xb
cd0(pciide0:1:0): non-media hardware failure
wdc_atapi_intr: warning: reading only 0 of 2048 bytes
wdc_atapi_intr: unknown phase 0xb
cd0(pciide0:1:0): non-media hardware failure



        Greg Troxel <gdt@ir.bbn.com>