kern/71428: DMA does not work on VIA 82C586

Daan Goedkoop dgoedkoop at
Mon Sep 6 04:50:24 PDT 2004

>Number:         71428
>Category:       kern
>Synopsis:       DMA does not work on VIA 82C586
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 06 11:50:24 GMT 2004
>Originator:     Daan Goedkoop
>Release:        4.10-RELEASE (generic kernel; i386)
Unfortunately I do not have access to my box right now, so I can not give you the uname -a output, but I have secured the dmesg output. Please use that, thank you.
I think the problem is apparent from the dmesg output below, e.g. when I forget to disable DMA on my VIA 82C586, which is according to the Hardware Notes supported since at least FreeBSD 4.4, I constantly get DMA write timeout messages and during these timeouts any application that uses the harddisk freezes for a short while.
The problem occured with generic kernels of FreeBSD 4.8, 4.9, 4.10, 5.0, 5.1 and 5.2. It does not seem to be a problem with the harddisk or the controller, as I tried two harddisks from different manufacturers, and DMA works fine on at least Windows, Linux, NetBSD and OpenBSD.
After disabling DMA everything works fine, but as you can probably understand that doesn't really satisfy me.

Copyright (c) 1992-2004 The FreeBSD Project.
 Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
  The Regents of the University of California. All rights reserved.
 FreeBSD 4.10-RELEASE #0: Tue May 25 22:47:12 GMT 2004
     root at
 Timecounter "i8254"  frequency 1193182 Hz
 CPU: Pentium II/Pentium II Xeon/Celeron (350.80-MHz 686-class CPU)
   Origin = "GenuineIntel"  Id = 0x652  Stepping = 2
 real memory  = 134217728 (131072K bytes)
 avail memory = 125165568 (122232K bytes)
 Preloaded elf kernel "kernel" at 0xc0551000.
 Pentium Pro MTRR support enabled
 md0: Malloc disk
 Using $PIR table, 6 entries at 0xc00f85c0
 npx0: <math processor> on motherboard
 npx0: INT 16 interface
 pcib0: <Host to PCI bridge> on motherboard
 pci0: <PCI bus> on pcib0
 agp0: <VIA 82C691 (Apollo Pro) host to PCI bridge> mem 0xe0000000-0xe7ffffff
 at device 0.0 on pci0
 pcib1: <VIA 82C598MVP (Apollo MVP3) PCI-PCI (AGP) bridge> at device 1.0 on
 pci1: <PCI bus> on pcib1
 pci1: <SiS 6326 SVGA controller> at 0.0
 isab0: <VIA 82C586 PCI-ISA bridge> at device 7.0 on pci0
 isa0: <ISA bus> on isab0
 atapci0: <VIA 82C586 ATA33 controller> port 0xffa0-0xffaf at device 7.1 on
 ata0: at 0x1f0 irq 14 on atapci0
 ata1: at 0x170 irq 15 on atapci0
 uhci0: <VIA 83C572 USB controller> port 0xde00-0xde1f irq 10 at device 7.2
 on pci0
 usb0: <VIA 83C572 USB controller> on uhci0
 usb0: USB revision 1.0
 uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub0: 2 ports with 2 removable, self powered
 pci0: <unknown card> (vendor=0x1106, dev=0x3040) at 7.3
 vr0: <VIA VT6105 Rhine III 10/100BaseTX> port 0xdc00-0xdcff mem
 0xefffff00-0xefffffff irq 10 at device 8.0 on pci0
 vr0: Ethernet address: 00:40:f4:8c:63:fb
 miibus0: <MII bus> on vr0
 ukphy0: <Generic IEEE 802.3u media interface> on miibus0
 ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 pci0: <unknown card> (vendor=0x1057, dev=0x5600) at 10.0 irq 10
 orm0: <Option ROM> at iomem 0xc0000-0xc7fff on isa0
 pmtimer0 on isa0
 fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
 fdc0: FIFO enabled, 8 bytes threshold
 fd0: <1440-KB 3.5" drive> on fdc0 drive 0
 atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
 atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
 kbd0 at atkbd0
 psm0: <PS/2 Mouse> irq 12 on atkbdc0
 psm0: model IntelliMouse, device ID 3
 vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
 sc0: <System console> at flags 0x100 on isa0
 sc0: VGA <16 virtual consoles, flags=0x300>
 sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
 sio0: type 16550A
 sio1 at port 0x2f8-0x2ff irq 3 on isa0
 sio1: type 16550A
 ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
 ppc0: Generic chipset (ECP/PS2/NIBBLE) in COMPATIBLE mode
 ppc0: FIFO with 16/16/16 bytes threshold
 plip0: <PLIP network interface> on ppbus0
 lpt0: <Printer> on ppbus0
 lpt0: Interrupt-driven port
 ppi0: <Parallel I/O> on ppbus0
 ad0: 32253MB <Maxtor 6E040L0> [65531/16/63] at ata0-master UDMA33
 acd0: DVD-ROM <SAMSUNG DVD-ROM SD-616E> at ata1-master PIO4
 acd1: CD-RW <AOPEN CD-RW CRW5232 1.02 20030718> at ata1-slave PIO4
 Mounting root from ufs:/dev/ad0s2a
 ad0: WRITE command timeout tag=0 serv=0 - resetting
 ata0: resetting devices .. done
 ad0: WRITE command timeout tag=0 serv=0 - resetting
 ata0: resetting devices .. done
 ad0: WRITE command timeout tag=0 serv=0 - resetting
 ata0: resetting devices .. done
 ad0: WRITE command timeout tag=0 serv=0 - resetting
 ata0: resetting devices .. done
 pid 114 (ls), uid 0: exited on signal 12 (core dumped)
 ad0: WRITE command timeout tag=0 serv=0 - resetting
 ata0: resetting devices .. done
 pid 115 (ls), uid 0: exited on signal 12 (core dumped)
Enable ata_dma.
Workaround: disabling DMA
Real fix: N/A

More information about the freebsd-bugs mailing list