Subject: DMA for DVD drive??
To: None <netbsd-help@NetBSD.org>
From: Roman Kennke <roman@ontographics.com>
List: netbsd-help
Date: 02/01/2005 14:47:51
Hi list,

I am experiencing problems with my DVD drive and NetBSD 2.0. When I read a
DVD, after a while I the drive stops and I get the following messages on
the log and console:

aceride0:1:0: lost interrupt
        type: atapi tc_bcount: 65536 tc_skip: 0
aceride0:1:0: bus-master DMA error: missing interrupt, status=0x21
cd0: transfer error, downgrading to Ultra-DMA mode 1
cd0(aceride0:1:0): using PIO mode 4, Ultra-DMA mode 1 (using DMA data
transfers)cd0(aceride0:1:0): Sense Error Code 0x76 at block no. 13070336
(decimal)
aceride0:1:0: lost interrupt
        type: atapi tc_bcount: 65536 tc_skip: 0
aceride0:1:0: bus-master DMA error: missing interrupt, status=0x21
cd0: transfer error, downgrading to DMA mode 2
cd0(aceride0:1:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
aceride0:1:0: lost interrupt
        type: atapi tc_bcount: 65536 tc_skip: 0
aceride0:1:0: bus-master DMA error: missing interrupt, status=0x21
cd0: transfer error, downgrading to PIO mode 4
cd0(aceride0:1:0): using PIO mode 4

I guess that means that my drive/chipset is not properly supported by
NetBSD.? Or is it probably a configuration error or something like that.
This is no big problem, but it prevents me from viewing DVDs and reading
and burning from the drive is extremly slow then...

here comes my dmesg output. Maybe I should add that I am running a custom
kernel with APM disabled and ACPI enabled (my machine doesn't run without
that configuration), but I also had the problems with GENERIC and
GENERIC_LAPTOP.

NetBSD 2.0 (MYKERNEL) #0: Thu Jan 27 14:36:52 CET 2005
	root@:/usr/obj/sys/arch/i386/compile/MYKERNEL
total memory = 734 MB
avail memory = 712 MB
BIOS32 rev. 0 found at 0xfd740
PCI BIOS rev. 2.1 found at 0xfd85e
pcibios: config mechanism [1][x], special cycles [x][x], last bus 1
PCI IRQ Routing Table rev. 1.0 found at 0xfdef0, size 240 bytes (13 entries)
PCI Interrupt Router at 000:07:0 (Acer Labs M1543 PCI-ISA Bridge compatible)
------------------------------------------
  device vendor product pin PIRQ IRQ stage
------------------------------------------
000:03:0 0x10b9 0x5457   A  0x06  11  0    already assigned
000:08:0 0x10b9 0x5451   A  0x07  11  0    already assigned
000:09:0 0x10ec 0x8139   A  0x01  11  0    already assigned
000:10:0 0x1106 0x3044   A  0x02   5  0    already assigned
000:11:0 0x1524 0x1420   A  0x00  11  0    already assigned
000:11:1 0x1524 0x1420   B  0x01  11  0    already assigned
000:15:0 0x10b9 0x5237   A  0x04  10  0    already assigned
001:05:0 0x1002 0x4336   A  0x02   5  0    already assigned
------------------------------------------
PCI fixup examining 1002:cab0
PCI fixup examining 1002:700f
PCI fixup examining 1002:4336
PCI bridge 0: primary 0, secondary 1, subordinate 1
PCI fixup examining 10b9:5237
PCI fixup examining 10b9:5457
PCI fixup examining 10b9:5229
PCI fixup examining 10b9:7101
PCI fixup examining 10b9:1533
PCI fixup examining 10b9:5451
PCI fixup examining 10ec:8139
PCI fixup examining 1106:3044
PCI fixup examining 1524:1420
PCI bridge 1: primary 0, secondary 2, subordinate 2
PCI fixup examining 1524:1420
PCI bridge 2: primary 0, secondary 3, subordinate 3
PCI fixup examining 10b9:5237
PCI bus #3 is the last bus
[System BIOS Setting]-----------------------
  device vendor product
  register space address    size
--------------------------------------------
000:00:0 0x1002 0xcab0
	10h mem  0xf4000000 0x04000000
	14h mem  0xf0800000 0x00001000
	18h port 0x0000a010 0x00000004
		[OK]
000:01:0 0x1002 0x700f
		[OK]
000:02:0 0x10b9 0x5237
	10h mem  0xf0400000 0x00001000
		[OK]
000:03:0 0x10b9 0x5457
	10h mem  0xf0401000 0x00001000
	14h port 0x00008400 0x00000100
		[OK]
000:04:0 0x10b9 0x5229
	20h port 0x0000a000 0x00000010
		[OK]
000:06:0 0x10b9 0x7101
		[OK]
000:07:0 0x10b9 0x1533
		[OK]
000:08:0 0x10b9 0x5451
	10h port 0x00008800 0x00000100
	14h mem  0xf0402000 0x00001000
		[OK]
000:09:0 0x10ec 0x8139
	10h port 0x00008c00 0x00000100
	14h mem  0xf0406800 0x00000100
		[OK]
000:10:0 0x1106 0x3044
	10h mem  0xf0406000 0x00000800
	14h port 0x00008080 0x00000080
		[OK]
000:11:0 0x1524 0x1420
	10h mem  0x00000000 0x00001000
		[NG]
000:11:1 0x1524 0x1420
	10h mem  0x00000000 0x00001000
		[NG]
000:15:0 0x10b9 0x5237
	10h mem  0xf0405000 0x00001000
		[OK]
001:05:0 0x1002 0x4336
	10h mem  0xf8000000 0x04000000
	14h port 0x0000b000 0x00000100
	18h mem  0xf0500000 0x00010000
		[OK]
--------------------------[  2 devices bogus]
 Physical memory end: 0x2deec000
 PCI memory mapped I/O space start: 0x2df00000
[PCIBIOS fixup stage]-----------------------
  device vendor product
  register space address    size
--------------------------------------------
000:00:0 0x1002 0xcab0
	10h mem  0xf4000000 0x04000000
	14h mem  0xf0800000 0x00001000
	18h port 0x0000a010 0x00000004
		[OK]
000:01:0 0x1002 0x700f
		[OK]
000:02:0 0x10b9 0x5237
	10h mem  0xf0400000 0x00001000
		[OK]
000:03:0 0x10b9 0x5457
	10h mem  0xf0401000 0x00001000
	14h port 0x00008400 0x00000100
		[OK]
000:04:0 0x10b9 0x5229
	20h port 0x0000a000 0x00000010
		[OK]
000:06:0 0x10b9 0x7101
		[OK]
000:07:0 0x10b9 0x1533
		[OK]
000:08:0 0x10b9 0x5451
	10h port 0x00008800 0x00000100
	14h mem  0xf0402000 0x00001000
		[OK]
000:09:0 0x10ec 0x8139
	10h port 0x00008c00 0x00000100
	14h mem  0xf0406800 0x00000100
		[OK]
000:10:0 0x1106 0x3044
	10h mem  0xf0406000 0x00000800
	14h port 0x00008080 0x00000080
		[OK]
000:11:0 0x1524 0x1420
	10h mem  0x2df00000 0x00001000
		[OK]
000:11:1 0x1524 0x1420
	10h mem  0x2df01000 0x00001000
		[OK]
000:15:0 0x10b9 0x5237
	10h mem  0xf0405000 0x00001000
		[OK]
001:05:0 0x1002 0x4336
	10h mem  0xf8000000 0x04000000
	14h port 0x0000b000 0x00000100
	18h mem  0xf0500000 0x00010000
		[OK]
--------------------------[  0 devices bogus]
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: AMD Athlon (686-class), 1524.05 MHz, id 0x680
cpu0: features c3cbf9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR>
cpu0: features c3cbf9ff<PGE,MCA,CMOV,PAT,PSE36,MPC,MMXX,MMX>
cpu0: features c3cbf9ff<FXSR,SSE,3DNOW2,3DNOW>
cpu0: I-cache 64 KB 64B/line 2-way, D-cache 64 KB 64B/line 2-way
cpu0: L2 cache 256 KB 64B/line 16-way
cpu0: ITLB 16 4 KB entries fully associative, 8 4 MB entries fully
associative
cpu0: DTLB 32 4 KB entries fully associative, 8 4 MB entries 4-way
cpu0: 8 page colors
acpi0 at mainbus0
acpi0: using Intel ACPI CA subsystem version 20040211
acpi0: X/RSDT: OemId <PTLTD ,  RSDT  ,06040000>, AslId < LTP,00000000>
acpi0: SCI interrupting at int 9
acpi0: fixed-feature power button present
ACPI Object Type 'Processor' (0x0c) at acpi0 not configured
acpilid0 at acpi0 (PNP0C0D): ACPI Lid Switch
acpibut0 at acpi0 (PNP0C0C): ACPI Power Button
PNP0A03 at acpi0 not configured
PNP0C0F at acpi0 not configured
PNP0C0F at acpi0 not configured
PNP0C0F at acpi0 not configured
PNP0C0F at acpi0 not configured
PNP0C0F at acpi0 not configured
PNP0C0F at acpi0 not configured
PNP0C0F at acpi0 not configured
PNP0C0F at acpi0 not configured
PNP0200 at acpi0 not configured
PNP0000 at acpi0 not configured
PNP0100 at acpi0 not configured
PNP0B00 at acpi0 not configured
npx1 at acpi0 (PNP0C04)
npx1: io 0xf0-0xfe irq 13
npx1: using exception 16
PNP0800 at acpi0 not configured
pckbc1 at acpi0 (PNP0303): kbd port
pckbc1: io 0x60,0x64 irq 1
pckbc2 at acpi0 (PNP0F13): aux port
pckbc2: irq 12
PNP0C02 at acpi0 not configured
PNP0C01 at acpi0 not configured
fdc1 at acpi0 (PNP0700)
fdc1: io 0x3f0-0x3f5,0x3f7 irq 6 drq 2
lpt3 at acpi0 (PNP0401)
lpt3: io 0x378-0x37f,0x778-0x77f irq 7 drq 0
com3 at acpi0 (PNP0501)
com3: io 0x3f8-0x3ff irq 4
com3: ns16550a, working fifo
acpiec0 at acpi0 (PNP0C09): ACPI Embedded Controller
acpiec0: io 0x62,0x66
acpibat0 at acpi0 (PNP0C0A-1): ACPI Battery (Control Method)
acpiacad0 at acpi0 (ACPI0003): ACPI AC Adapter
acpitz0 at acpi0: ACPI Thermal Zone
acpitz0: unable to get polling interval; using default of 30.0s
pckbd0 at pckbc1 (kbd slot)
pckbc1: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc1 (aux slot)
pckbc1: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: ATI Technologies product 0xcab0 (rev. 0x13)
agp at pchb0 not configured
ppb0 at pci0 dev 1 function 0: ATI Technologies product 0x700f (rev. 0x01)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
vga1 at pci1 dev 5 function 0: ATI Technologies Radeon IGP 320M (rev. 0x00)
wsdisplay0 at vga1 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
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: 2 ports with 2 removable, self powered
Acer Labs product 0x5457 (modem communications) at pci0 dev 3 function 0
not configured
aceride0 at pci0 dev 4 function 0
aceride0: Acer Labs M5229 UDMA IDE Controller (rev. 0xc4)
aceride0: bus-master DMA support present
aceride0: primary channel configured to compatibility mode
aceride0: primary channel interrupting at irq 14
atabus0 at aceride0 channel 0
aceride0: secondary channel configured to compatibility mode
aceride0: secondary channel interrupting at irq 15
atabus1 at aceride0 channel 1
Acer Labs M7101 Power Management Controller (miscellaneous bridge) at pci0
dev 6 function 0 not configured
pcib0 at pci0 dev 7 function 0
pcib0: Acer Labs M1543 PCI-ISA Bridge (rev. 0x00)
autri0 at pci0 dev 8 function 0: Acer Labs M5451 AC-Link Controller Audio
Device (rev. 0x02)
autri0: interrupting at irq 11
autri0: ac97: Avance Logic ALC202 codec; headphone, 20 bit DAC, 18 bit
ADC, Realtek 3D
audio0 at autri0: full duplex, mmap, independent
midi0 at autri0: 4DWAVE MIDI UART
rtk0 at pci0 dev 9 function 0: Realtek 8139 10/100BaseTX
rtk0: interrupting at irq 11
rtk0: Ethernet address 00:02:3f:af:14:fd
ukphy0 at rtk0 phy 7: Generic IEEE 802.3u media interface
ukphy0: OUI 0x000000, model 0x0000, rev. 0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
VIA Technologies VT3606 OHCI IEEE 1394 Controller (Firewire serial bus,
interface 0x10, revision 0x46) at pci0 dev 10 function 0 not configured
cbb0 at pci0 dev 11 function 0: ENE Technology, Inc. CB1420 Cardbus
Controller (rev. 0x01)
cbb1 at pci0 dev 11 function 1: ENE Technology, Inc. CB1420 Cardbus
Controller (rev. 0x01)
ohci1 at pci0 dev 15 function 0: Acer Labs M5237 USB Host Controller (rev.
0x03)
ohci1: interrupting at irq 10
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
isa0 at pcib0
pcppi0 at isa0 port 0x61
midi1 at pcppi0: PC speaker
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
isapnp0: no ISA Plug 'n Play devices found
cbb0: interrupting at irq 11
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 2 device 0
pcmcia0 at cardslot0
cbb1: interrupting at irq 11
cardslot1 at cbb1 slot 1 flags 0
cardbus1 at cardslot1: bus 3 device 0
pcmcia1 at cardslot1
fd0 at fdc1 drive 0: density unknown
Kernelized RAIDframe activated
wd0 at atabus0 drive 0: <FUJITSU MHR2030AT>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 28615 MB, 58140 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 (Ultra/100)
wd0(aceride0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using
DMA data transfers)
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <TOSHIBA DVD-ROM SD-R2212, 828S715039, 1013>
cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd0(aceride0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using
DMA data transfers)
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)
set{u,g}id pid 756 (gnome-pty-helper) was invoked by uid 1000 ppid 763
(gnome-terminal) with fd 2 closed
aceride0:1:0: lost interrupt
	type: atapi tc_bcount: 65536 tc_skip: 0
aceride0:1:0: bus-master DMA error: missing interrupt, status=0x21
cd0: transfer error, downgrading to Ultra-DMA mode 1
cd0(aceride0:1:0): using PIO mode 4, Ultra-DMA mode 1 (using DMA data
transfers)
cd0(aceride0:1:0): Sense Error Code 0x76 at block no. 13070336 (decimal)
aceride0:1:0: lost interrupt
	type: atapi tc_bcount: 65536 tc_skip: 0
aceride0:1:0: bus-master DMA error: missing interrupt, status=0x21
cd0: transfer error, downgrading to DMA mode 2
cd0(aceride0:1:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
aceride0:1:0: lost interrupt
	type: atapi tc_bcount: 65536 tc_skip: 0
aceride0:1:0: bus-master DMA error: missing interrupt, status=0x21
cd0: transfer error, downgrading to PIO mode 4
cd0(aceride0:1:0): using PIO mode 4
set{u,g}id pid 352 (gnome-pty-helper) was invoked by uid 1000 ppid 792
(gnome-terminal) with fd 2 closed

/Roman