VIA VT8237 woes

Pete xd888cc7541309c3f at f4n.org
Sat Aug 28 09:25:52 PDT 2004


Hi,

I'm having serious trouble getting my onboard VIA VT8237
IDE-controller working with FreeBSD 4.10R as well as with -STABLE
(as far as I can tell, it's supported according to
http://www.freebsd.org/releases/4.10R/hardware-i386.html#AEN34).

The mobo is a EPOX EP-859A7i
(http://www.epox.nl/english/products/motherboard/8k9a7i.htm) with VIA
KT400A and VT8237. The controller appears to be incorrectly (?)
identified as "atapci0: <VIA Apollo ATA controller> port 0xac00-0xac0f
at device 15.0 on pci0" (full dmesg below).

The transfer mode is automatically set to WDMA2, which isn't exactly
optimal, but more importantly: it results in SILENT data corruption! A
chunk of data every gigabyte or so (sometimes more rarely, making it
difficult to test if it works or not) written to the disk is replaced
by seemingly random data. Setting the transfer mode to PIO4 makes the
problem go away.

In the archives there are some that report success with VT8237 and
4.10R, but it appears as if those don't refer to an onboard
controller. A possibly clarification is offered by Mikeal Hubsch,
regarding 5.2:
http://groups.google.com/groups?selm=20040102204932.B93774-100000
%40snaps.home&output=gplain.
As a dirty quick-fix, I tried changing the chipid in the 4.10 sources:
The controller was then identified as "atapci0: <VIA 8237 ATA133
controller> port 0xac00-0xac0f at device 15.0 on pci0", and the
default transfer mode was set to UDMA100, although the silent data
corruption persisted.

In july Ion-Mihai Tetcu said that "VIA8237 + Seagates + 
FreeBSD -CURRENT is a deadly combination"
(http://www.freebsd.org/cgi/getmsg.cgi?fetch=1918360+1921418+
/usr/local/www/db/text/2004/freebsd-current/20040711.freebsd-current).
Should I just accept this to be the case for 4.10 stable/release as
well?

I haven't been able to try it with another hard drive, but I verified
it with two identical computers (apart from amount of RAM). I have
also tried replacing the IDE-cable, same result.

For the record, I get roughly the same errors in OpenBSD 3.5 (running
on the second machine, with a Maxtor hard drive), the "solution" is to
not use DMA.

I'd appreciate any help to get this working with 4.x.

Thanks in advance!

Below is a dmesg with a STABLE-kernel, booted in verbose mode.


-------------- next part --------------
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-STABLE #0: Sat Aug 28 14:26:32 CEST 2004
    x at y:/usr/obj/usr/src/sys/GENERIC
Calibrating clock(s) ... TSC clock: 1503541456 Hz, i8254 clock: 1193287 Hz
CLK_USE_I8254_CALIBRATION not specified - using default frequency
Timecounter "i8254"  frequency 1193182 Hz
CLK_USE_TSC_CALIBRATION not specified - using old calibration method
CPU: AMD Athlon(tm) XP 1800+ (1503.42-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x6a0  Stepping = 0
  Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
  AMD Features=0xc0400000<AMIE,DSP,3DNow!>
Data TLB: 32 entries, fully associative
Instruction TLB: 16 entries, fully associative
L1 data cache: 64 kbytes, 64 bytes/line, 1 lines/tag, 2-way associative
L1 instruction cache: 64 kbytes, 64 bytes/line, 1 lines/tag, 2-way associative
L2 internal cache: 256 kbytes, 64 bytes/line, 1 lines/tag, 8-way associative
real memory  = 536805376 (524224K bytes)
Physical memory chunk(s):
0x000001000 - 0x00009efff, 647168 bytes (158 pages)
0x000586000 - 0x01ffe7fff, 530980864 bytes (129634 pages)
avail memory = 516796416 (504684K bytes)
bios32: Found BIOS32 Service Directory header at 0xc00fb610
bios32: Entry = 0xfba90 (c00fba90)  Rev = 0  Len = 1
pcibios: PCI BIOS entry at 0xbac0
pnpbios: Found PnP BIOS data at 0xc00fc510
pnpbios: Entry = f0000:c540  Rev = 1.0
Other BIOS signatures found:
ACPI: 000f7140
Preloaded elf kernel "kernel" at 0xc055f000.
Preloaded elf module "agp.ko" at 0xc055f09c.
Pentium Pro MTRR support enabled
Creating DISK md0
md0: Malloc disk
Math emulator present
pci_open(1):	mode 1 addr port (0x0cf8) is 0x80007904
pci_open(1a):	mode1res=0x80000000 (0x80000000)
pci_cfgcheck:	device 0 [class=060000] [hdr=00] is there (id=31891106)
Using $PIR table, 10 entries at 0xc00fdbd0
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
found->	vendor=0x1106, dev=0x3189, revid=0x80
	class=06-00-00, hdrtype=0x00, mfdev=0
	subordinatebus=0 	secondarybus=0
	map[10]: type 1, range 32, base e0000000, size 26
found->	vendor=0x1106, dev=0xb198, revid=0x00
	class=06-04-00, hdrtype=0x01, mfdev=0
	subordinatebus=1 	secondarybus=1
found->	vendor=0x4444, dev=0x0016, revid=0x01
	class=04-00-00, hdrtype=0x00, mfdev=0
	subordinatebus=0 	secondarybus=0
	intpin=a, irq=11
	map[10]: type 1, range 32, base e8000000, size 26
found->	vendor=0x1106, dev=0x3106, revid=0x86
	class=02-00-00, hdrtype=0x00, mfdev=0
	subordinatebus=0 	secondarybus=0
	intpin=a, irq=11
	map[10]: type 1, range 32, base 00009000, size  8
	map[14]: type 1, range 32, base ef000000, size  8
found->	vendor=0x1106, dev=0x0571, revid=0x06
	class=01-01-8a, hdrtype=0x00, mfdev=0
	subordinatebus=0 	secondarybus=0
	intpin=a, irq=255
	map[20]: type 1, range 32, base 0000ac00, size  4
found->	vendor=0x1106, dev=0x3038, revid=0x81
	class=0c-03-00, hdrtype=0x00, mfdev=1
	subordinatebus=0 	secondarybus=0
	intpin=a, irq=5
	map[20]: type 1, range 32, base 0000b000, size  5
found->	vendor=0x1106, dev=0x3038, revid=0x81
	class=0c-03-00, hdrtype=0x00, mfdev=1
	subordinatebus=0 	secondarybus=0
	intpin=a, irq=5
	map[20]: type 1, range 32, base 0000b400, size  5
found->	vendor=0x1106, dev=0x3038, revid=0x81
	class=0c-03-00, hdrtype=0x00, mfdev=1
	subordinatebus=0 	secondarybus=0
	intpin=b, irq=11
	map[20]: type 1, range 32, base 0000b800, size  5
found->	vendor=0x1106, dev=0x3038, revid=0x81
	class=0c-03-00, hdrtype=0x00, mfdev=1
	subordinatebus=0 	secondarybus=0
	intpin=b, irq=11
	map[20]: type 1, range 32, base 0000bc00, size  5
found->	vendor=0x1106, dev=0x3104, revid=0x86
	class=0c-03-20, hdrtype=0x00, mfdev=1
	subordinatebus=0 	secondarybus=0
	intpin=c, irq=11
	map[10]: type 1, range 32, base ef001000, size  8
found->	vendor=0x1106, dev=0x3227, revid=0x00
	class=06-01-00, hdrtype=0x00, mfdev=1
	subordinatebus=0 	secondarybus=0
found->	vendor=0x1106, dev=0x3059, revid=0x60
	class=04-01-00, hdrtype=0x00, mfdev=0
	subordinatebus=0 	secondarybus=0
	intpin=c, irq=11
	map[10]: type 1, range 32, base 0000c000, size  8
found->	vendor=0x1106, dev=0x3065, revid=0x78
	class=02-00-00, hdrtype=0x00, mfdev=0
	subordinatebus=0 	secondarybus=0
	intpin=a, irq=5
	map[10]: type 1, range 32, base 0000c400, size  8
	map[14]: type 1, range 32, base ef002000, size  8
pci0: <PCI bus> on pcib0
agp0: <VIA Generic host to PCI bridge> mem 0xe0000000-0xe3ffffff at device 0.0 on pci0
agp0: allocating GATT for aperture of size 245M
pcib1: <PCI to PCI bridge (vendor=1106 device=b198)> at device 1.0 on pci0
found->	vendor=0x10de, dev=0x0181, revid=0xa4
	class=03-00-00, hdrtype=0x00, mfdev=0
	subordinatebus=0 	secondarybus=0
	intpin=a, irq=5
	map[10]: type 1, range 32, base ec000000, size 24
	map[14]: type 1, range 32, base e4000000, size 26
pci1: <PCI bus> on pcib1
pci1: <NVidia model 0181 graphics accelerator> (vendor=0x10de, dev=0x0181) at 0.0 irq 5
pci0: <unknown card> (vendor=0x4444, dev=0x0016) at 10.0 irq 11
vr0: <VIA VT6105 Rhine III 10/100BaseTX> port 0x9000-0x90ff mem 0xef000000-0xef0000ff irq 11 at device 12.0 on pci0
vr0: Ethernet address: 00:0f:3d:xx:xx:xx
miibus0: <MII bus> on vr0
ukphy0: <Generic IEEE 802.3u media interface> on miibus0
ukphy0: OUI 0x004063, model 0x0034, rev. 4
ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
bpf: vr0 attached
atapci0: <VIA Apollo ATA controller> port 0xac00-0xac0f at device 15.0 on pci0
ata0: iobase=0x01f0 altiobase=0x03f6 bmaddr=0xac00
ata0: mask=03 ostat0=50 ostat2=00
ata0-master: ATAPI d0 00
ata0-slave: ATAPI 00 00
ata0: mask=03 stat0=50 stat1=00
ata0-master: ATA 01 a5
ata0: devices=01
ata0: at 0x1f0 irq 14 on atapci0
ata1: iobase=0x0170 altiobase=0x0376 bmaddr=0xac08
ata1: mask=03 ostat0=7f ostat2=50
ata1-master: ATAPI 7f 7f
ata1-slave: ATAPI 14 eb
ata1: mask=03 stat0=7f stat1=10
ata1-master: ATA 7f 7f
ata1: devices=08
ata1: at 0x170 irq 15 on atapci0
uhci0: <VIA 83C572 USB controller> port 0xb000-0xb01f irq 5 at device 16.0 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
uhci1: <VIA 83C572 USB controller> port 0xb400-0xb41f irq 5 at device 16.1 on pci0
	using shared irq5.
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2: <VIA 83C572 USB controller> port 0xb800-0xb81f irq 11 at device 16.2 on pci0
	using shared irq11.
usb2: <VIA 83C572 USB controller> on uhci2
usb2: USB revision 1.0
uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhci3: <VIA 83C572 USB controller> port 0xbc00-0xbc1f irq 11 at device 16.3 on pci0
usb3: <VIA 83C572 USB controller> on uhci3
usb3: USB revision 1.0
uhub3: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
pci0: <USB controller> (vendor=0x1106, dev=0x3104) at 16.4 irq 11
isab0: <PCI to ISA bridge (vendor=1106 device=3227)> at device 17.0 on pci0
isa0: <ISA bus> on isab0
pci0: <unknown card> (vendor=0x1106, dev=0x3059) at 17.5 irq 11
vr1: <VIA VT6102 Rhine II 10/100BaseTX> port 0xc400-0xc4ff mem 0xef002000-0xef0020ff irq 5 at device 18.0 on pci0
vr1: Ethernet address: 00:04:61:xx:xx:xx
miibus1: <MII bus> on vr1
ukphy1: <Generic IEEE 802.3u media interface> on miibus1
ukphy1: OUI 0x004063, model 0x0032, rev. 8
ukphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
bpf: vr1 attached
ex_isa_identify()
ata-: ata0 exists, using next available unit number
ata-: ata1 exists, using next available unit number
Trying Read_Port at 203
Trying Read_Port at 243
Trying Read_Port at 283
Trying Read_Port at 2c3
Trying Read_Port at 303
Trying Read_Port at 343
Trying Read_Port at 383
Trying Read_Port at 3c3
isa_probe_children: disabling PnP devices
isa_probe_children: probing non-PnP devices
orm0: <Option ROM> at iomem 0xc0000-0xcf7ff on isa0
pmtimer0 on isa0
fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
ata2 failed to probe at port 0x1f0 irq 14 on isa0
ata3 failed to probe at port 0x170 irq 15 on isa0
adv0 failed to probe on isa0
bt0: Failed Status Reg Test - fe
bt_isa_probe: Probe failed at 0x330
bt0: Failed Status Reg Test - ff
bt_isa_probe: Probe failed at 0x334
bt0: Failed Status Reg Test - ff
bt_isa_probe: Probe failed at 0x230
bt0: Failed Status Reg Test - ff
bt_isa_probe: Probe failed at 0x234
bt0: Failed Status Reg Test - ff
bt_isa_probe: Probe failed at 0x130
bt0: Failed Status Reg Test - ff
bt_isa_probe: Probe failed at 0x134
bt0 failed to probe at port 0x134-0x137 on isa0
aha0: status reg test failed fe
aha0: status reg test failed ff
aha0: status reg test failed ff
aha0: status reg test failed ff
aha0: status reg test failed ff
aha0: status reg test failed ff
aha0 failed to probe at port 0x134-0x137 on isa0
aic0 failed to probe at port 0x140-0x15f on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
atkbd: the current kbd controller command byte 0067
atkbd: keyboard ID 0x41ab (2)
kbd0 at atkbd0
kbd0: atkbd0, AT 101/102 (2), config:0x1, flags:0x3d0000
psm0: current command byte:0067
psm0: failed to reset the aux device.
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
fb0: vga0, vga, type:VGA (5), flags:0x7007f
fb0: port:0x3c0-0x3df, crtc:0x3d4, mem:0xa0000 0x20000
fb0: init mode:24, bios mode:3, current mode:24
fb0: window:0xc00b8000 size:32k gran:32k, buf:0 size:32k
VGA parameters upon power-up
50 18 10 00 00 00 03 00 02 67 5f 4f 50 82 54 80 
bf 1f 00 4f 0e 0f 00 00 07 80 9c 8e 8f 28 1f 96 
b9 a3 ff 00 01 02 03 04 05 14 07 38 39 3a 3b 3c 
3d 3e 3f 0c 00 0f 08 00 00 00 00 00 10 0e 00 ff 
VGA parameters in BIOS for mode 24
50 18 10 00 10 00 03 00 02 67 5f 4f 50 82 54 80 
bf 1f 00 4f 0d 0e 00 00 00 00 9c 8e 8f 28 1f 96 
b9 a3 ff 00 01 02 03 04 05 14 07 38 39 3a 3b 3c 
3d 3e 3f 0c 00 0f 08 00 00 00 00 00 10 0e 00 ff 
EGA/VGA parameters to be used for mode 24
50 18 10 00 10 00 03 00 02 67 5f 4f 50 82 54 80 
bf 1f 00 4f 0d 0e 00 00 00 00 9c 8e 8f 28 1f 96 
b9 a3 ff 00 01 02 03 04 05 14 07 38 39 3a 3b 3c 
3d 3e 3f 0c 00 0f 08 00 00 00 00 00 10 0e 00 ff 
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sc0: fb0, kbd0, terminal emulator: sc (syscons terminal)
pcic0 failed to probe at port 0x3e0 iomem 0xd0000 on isa0
pcic1: not probed (disabled)
sio0: irq maps: 0x1 0x11 0x1 0x1
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1: irq maps: 0x1 0x9 0x1 0x1
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
sio2: not probed (disabled)
sio3: not probed (disabled)
ppc0: parallel port found at 0x378
ppc0: using extended I/O port range
ppc0: SPP
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
plip0: <PLIP network interface> on ppbus0
bpf: lp0 attached
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
ed0: not probed (disabled)
fe0: not probed (disabled)
ie0: not probed (disabled)
lnc0: not probed (disabled)
cs0: not probed (disabled)
sn0: not probed (disabled)
isa_probe_children: probing PnP devices
BIOS Geometries:
 0:03fefe3f 0..1022=1023 cylinders, 0..254=255 heads, 1..63=63 sectors
 0 accounted for
Device configuration finished.
bpf: lo0 attached
bpf: ppp0 attached
new masks: bio 68c860, tty 63009a, net 6708ba
bpf: sl0 attached
bpf: faith0 attached
ad0: success setting WDMA2 on VIA chip
Creating DISK ad0
ar: FreeBSD check1 failed
ad0: <ST3120026A/8.54> ATA-6 disk at ata0-master
ad0: 114473MB (234441648 sectors), 232581 C, 16 H, 63 S, 512 B
ad0: 16 secs/int, 1 depth queue, WDMA2
ad0: piomode=4 dmamode=2 udmamode=5 cblid=1
ata1-slave: piomode=4 dmamode=2 udmamode=2 dmaflag=1
ata1-slave: success setting PIO4 on generic chip
acd0: <SAMSUNG CDRW/DVD SM-352B/T807> CD-RW drive at ata1 as slave
acd0: read 173KB/s (48534KB/s) write 172KB/s (9039KB/s), 2048KB buffer, PIO4
acd0: Reads: CD-R, CD-RW, CD-DA stream, DVD-ROM, DVD-R, DVD-RAM, packet
acd0: Writes: CD-R, CD-RW, test write, burnproof
acd0: Audio: play, 256 volume levels
acd0: Mechanism: ejectable tray, unlocked
acd0: Medium: no/blank disc
Mounting root from ufs:/dev/ad0s1a
ad0s1: type 0xa5, start 63, end = 234436544, size 234436482 : OK
start_init: trying /sbin/init
Linux ELF exec handler installed


More information about the freebsd-questions mailing list