# PCI Sata (VIA VT6421A) on FreeBSD 8.0



## jailed (Jan 21, 2010)

Hello all,

I have bought a PCI Sata Controller Card yesterday.

My system:
Cpu: Intel P3, 864 mhz
Ram: 64 MB SDRam
Sata Controller: VIA VT6421A (1 x E-Sata, 2 x Sata; Raid)
Sata Harddisk: 320 GB Seagate (Originally sata-2 but set to sata-1 with jumper)
System: ACPI Disabled FreeBSD 8.0-P2

When I first plugged the card and harddisk, I formatted harddisk on sysinstall (with failures). Then I could transfer some files over network at 10MB/s. After that, i tried to copy this files from one slice to other on the harddisk. It started to give dma errors. I tried both the card and the harddisk on another machine which as FreeBSD 7.2 and still the same problems.

I tried "hw.intr_storm_threshold=20000" on /boot/loader.conf but not worked.

I do not want to do raid. I do only want use 1 sata harddisk without problem. This is an old computer which i use for automatic backups. Waiting for you help. Thank you all.


```
backup# dmesg
Copyright (c) 1992-2009 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 is a registered trademark of The FreeBSD Foundation.             
FreeBSD 8.0-RELEASE-p2 #0: Tue Jan  5 16:02:27 UTC 2010                  
    root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC       
Timecounter "i8254" frequency 1193182 Hz quality 0                       
CPU: Intel Pentium III (864.47-MHz 686-class CPU)                        
  Origin = "GenuineIntel"  Id = 0x68a  Stepping = 10                     
  Features=0x383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
real memory  = 67108864 (64 MB)                                                                      
avail memory = 50786304 (48 MB)                                                                      
kbd1 at kbdmux0                                                                                      
pcib0: <Host to PCI bridge> pcibus 0 on motherboard                                                  
pir0: <PCI Interrupt Routing Table: 6 Entries> on motherboard                                        
pci0: <PCI bus> on pcib0                                                                             
agp0: <VIA 82C691 (Apollo Pro) host to PCI bridge> on hostb0                                         
agp0: aperture size is 256M                                                                          
pcib1: <PCI-PCI bridge> at device 1.0 on pci0                                                        
pci1: <PCI bus> on pcib1                                                                             
vgapci0: <VGA-compatible display> mem 0xdfe80000-0xdfefffff,0xd0000000-0xd7ffffff irq 11 at device 0.0 on pci1
isab0: <PCI-ISA bridge> at device 7.0 on pci0                                                                 
isa0: <ISA bus> on isab0                                                                                      
atapci0: <VIA 82C686B UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 7.1 on pci0
ata0: <ATA channel 0> on atapci0                                                                                      
ata0: [ITHREAD]                                                                                                       
ata1: <ATA channel 1> on atapci0                                                                                      
ata1: [ITHREAD]                                                                                                       
uhci0: <VIA 83C572 USB controller> port 0xc000-0xc01f irq 12 at device 7.2 on pci0                                    
uhci0: [ITHREAD]                                                                                                      
uhci0: LegSup = 0xa000                                                                                                
usbus0: <VIA 83C572 USB controller> on uhci0                                                                          
uhci1: <VIA 83C572 USB controller> port 0xc400-0xc41f irq 12 at device 7.3 on pci0                                    
uhci1: [ITHREAD]                                                                                                      
uhci1: LegSup = 0xa000                                                                                                
usbus1: <VIA 83C572 USB controller> on uhci1                                                                          
pci0: <serial bus, SMBus> at device 7.4 (no driver attached)                                                          
sis0: <NatSemi DP8381[56] 10/100BaseTX> port 0xbc00-0xbcff mem 0xdffef000-0xdffeffff irq 9 at device 9.0 on pci0      
sis0: Silicon Revision: DP83815D                                                                                      
miibus0: <MII bus> on sis0                                                                                            
nsphyter0: <DP83815 10/100 media interface> PHY 0 on miibus0                                                          
nsphyter0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
sis0: Ethernet address: 00:40:f4:6b:fc:bc
sis0: [ITHREAD]
atapci1: <VIA 6421 SATA150 controller> port 0xdc00-0xdc0f,0xd800-0xd80f,0xd400-0xd40f,0xd000-0xd00f,0xcc00-0xcc1f,0xc800-0xc8ff irq 10 at device 10.0 on pci0
atapci1: [ITHREAD]
ata2: <ATA channel 0> on atapci1
ata2: [ITHREAD]
ata3: <ATA channel 1> on atapci1
ata3: [ITHREAD]
ata4: <ATA channel 2> on atapci1
ata4: [ITHREAD]
pci0: <multimedia, audio> at device 12.0 (no driver attached)
cpu0 on motherboard
pmtimer0 on isa0
unknown: <PNP0c01> can't assign resources (memory)
atrtc0: <AT realtime clock> at port 0x70-0x71 irq 8 pnpid PNP0b00 on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 irq 1 pnpid PNP0303 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
orm0: <ISA Option ROM> at iomem 0xc0000-0xc7fff pnpid ORM0000 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
fdc0: Faking up FDCTL
```


----------



## jailed (Jan 21, 2010)

```
ppc0: parallel port not found.                                                                                                                 
unknown: <PNP0c01> can't assign resources (memory)                                                                                             
driver bug: Unable to set devclass (devname: (null))                                                                                           
Timecounter "TSC" frequency 864466472 Hz quality 800                                                                                           
Timecounters tick every 1.000 msec                                                                                                             
usbus0: 12Mbps Full Speed USB v1.0                                                                                                             
usbus1: 12Mbps Full Speed USB v1.0                                                                                                             
ad0: 3079MB <QUANTUM FIREBALL EX3.2A A0A.0400> at ata0-master UDMA33                                                                           
ugen0.1: <VIA> at usbus0                                                                                                                       
uhub0: <VIA UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0                                                                         
ugen1.1: <VIA> at usbus1                                                                                                                       
uhub1: <VIA UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1                                                                         
ad6: 305245MB <Seagate ST3320620AS 3.AAK> at ata3-master SATA150                                                                               
uhub0: 2 ports with 2 removable, self powered                                                                                                  
uhub1: 2 ports with 2 removable, self powered
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=312729488
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=312729488
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
ad6: FAILURE - READ_DMA48 timed out LBA=312729488
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=312729488
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=312729488
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
interrupt storm detected on "irq10:"; throttling interrupt source
ad6: FAILURE - READ_DMA48 timed out LBA=312729488
ad6: FAILURE - device detached
Trying to mount root from ufs:/dev/ad0s1a
sis0: Applying short cable fix (reg=ef)
ipfw2 (+ipv6) initialized, divert loadable, nat loadable, rule-based forwarding disabled, default to deny, logging disabled
```



```
backup# vmstat -i
interrupt                          total       rate
irq0: clk                        1026705        999
irq8: rtc                         131410        127
irq9: sis0                           811          0
irq10: atapci1                     20367         19
irq14: ata0                         1446          1
Total                            1180739       1149
```


```
backup# pciconf -lv
hostb0@pci0:0:0:0:      class=0x060000 card=0x00000000 chip=0x06911106 rev=0xc4 hdr=0x00
    vendor     = 'VIA Technologies Inc'                                                 
    device     = 'VT82C691/693A/694X Apollo Pro/133/133A System Controller'             
    class      = bridge                                                                 
    subclass   = HOST-PCI                                                               
pcib1@pci0:0:1:0:       class=0x060400 card=0x00000000 chip=0x85981106 rev=0x00 hdr=0x01
    vendor     = 'VIA Technologies Inc'                                                 
    device     = 'VT82C598MVP/694x Apollo MVP3/Pro133x PCI to AGP Bridge'               
    class      = bridge                                                                 
    subclass   = PCI-PCI                                                                
isab0@pci0:0:7:0:       class=0x060100 card=0x06861106 chip=0x06861106 rev=0x40 hdr=0x00
    vendor     = 'VIA Technologies Inc'                                                 
    device     = 'VT82C686/A/B "Super South" PCI to ISA Bridge'                         
    class      = bridge                                                                 
    subclass   = PCI-ISA
atapci0@pci0:0:7:1:     class=0x01018a card=0x00000000 chip=0x05711106 rev=0x06 hdr=0x00
    vendor     = 'VIA Technologies Inc'
    device     = 'Bus Master IDE Controller (VT82C686B/VT823x/A/C)'
    class      = mass storage
    subclass   = ATA
uhci0@pci0:0:7:2:       class=0x0c0300 card=0x12340925 chip=0x30381106 rev=0x16 hdr=0x00
    vendor     = 'VIA Technologies Inc'
    device     = 'VT82xxxxx UHCI USB 1.1 Controller (All VIA Chipsets)'
    class      = serial bus
    subclass   = USB
uhci1@pci0:0:7:3:       class=0x0c0300 card=0x12340925 chip=0x30381106 rev=0x16 hdr=0x00
    vendor     = 'VIA Technologies Inc'
    device     = 'VT82xxxxx UHCI USB 1.1 Controller (All VIA Chipsets)'
    class      = serial bus
    subclass   = USB
none0@pci0:0:7:4:       class=0x0c0500 card=0x00000000 chip=0x30571106 rev=0x40 hdr=0x00
    vendor     = 'VIA Technologies Inc'
    device     = 'ACPI Power Management Controller (VT82C686A/B)'
    class      = serial bus
    subclass   = SMBus
sis0@pci0:0:9:0:        class=0x020000 card=0xf3311385 chip=0x0020100b rev=0x00 hdr=0x00
    vendor     = 'National Semiconductors'
    device     = 'DP83815/16 Fast Ethernet Adapter (MacPhyter/MacPhyter-II)'
    class      = network
    subclass   = ethernet
atapci1@pci0:0:10:0:    class=0x010400 card=0x32491106 chip=0x32491106 rev=0x50 hdr=0x00
    vendor     = 'VIA Technologies Inc'
    device     = 'VIA VT6421 RAID Controller - Windows XP 32.bit (VT6421)'
    class      = mass storage
    subclass   = RAID
none1@pci0:0:12:0:      class=0x040100 card=0x20601458 chip=0x58801274 rev=0x02 hdr=0x00
    vendor     = 'Creative (Was: Ensoniq)'
    device     = 'Soundblaster (5880x)'
    class      = multimedia
    subclass   = audio
vgapci0@pci0:1:0:0:     class=0x030000 card=0x8a225333 chip=0x8a225333 rev=0x02 hdr=0x00
    vendor     = 'S3 Graphics Co., Ltd'
    device     = '86C394/5/6/7/8 Savage4 LT/GT/Pro-M/Pro/Xtreme'
    class      = display
    subclass   = VGA
```


```
backup# ls -al /dev/ad*
crw-r-----  1 root  operator    0,  63 Jan 21 16:23 /dev/ad0
crw-r-----  1 root  operator    0,  64 Jan 21 16:23 /dev/ad0s1
crw-r-----  1 root  operator    0,  65 Jan 21 16:23 /dev/ad0s1a
crw-r-----  1 root  operator    0,  66 Jan 21 16:23 /dev/ad0s1b
crw-r-----  1 root  operator    0,  67 Jan 21 16:23 /dev/ad0s1d
crw-r-----  1 root  operator    0,  68 Jan 21 16:23 /dev/ad0s1e
crw-r-----  1 root  operator    0,  69 Jan 21 16:23 /dev/ad0s1f
crw-r-----  1 root  operator    0,  75 Jan 21 16:23 /dev/ad6
crw-r-----  1 root  operator    0,  76 Jan 21 16:23 /dev/ad6s1
crw-r-----  1 root  operator    0,  79 Jan 21 16:23 /dev/ad6s1d
crw-r-----  1 root  operator    0,  77 Jan 21 16:23 /dev/ad6s2
crw-r-----  1 root  operator    0,  81 Jan 21 16:23 /dev/ad6s2d
```


----------



## jailed (Jan 21, 2010)

I forgot to say,

I also tried a 16 GB Sata SSD and it's the same. The solid state drive is:

```
ad4: 15272MB <SAMSUNG MMBRE16GSMPP-MVA VAM1101Q> at ata2-master SATA150
```

Also, when system fault because of this errors; when i try "fsck -y", i think it's working on all the inodes and after that the drive detached.


----------



## mav@ (Jan 21, 2010)

DMA timeouts together with interrupt storms could be result of the bug, already fixed in 7/8-STABLE after 8.0 release. That bug was in error handling code, so these errors are probably hiding other real errors. If drives replacement didn't help your, try also to replace cables.


----------



## jailed (Jan 21, 2010)

mav,

Thank you for you reply. I tried with 5 different data cable and 3 power cable. I also tried to connect the PCI card to different slots. It's the same. Thank you.


----------



## mav@ (Jan 21, 2010)

Try to install recent 8-STABLE snapshot. May be it helps or shows the real problem.


----------



## michaelrmgreen (Jan 23, 2010)

The Via VT6421 chipset is well known for a variety of problems. The interupt problems often reported can sometimes be fixed by freeing up interupts by disabling motherboard hardware for example serials ports. The other option which MAY help is moving the card to a different PCI slot. 

Hope this is of some use. Let us know how you get on.


----------



## jailed (Jan 25, 2010)

Hello,

Thank you for your interest mav and michaelrmgreen.

I fetched the recent src tree of 8.0 and compiled kernel. I think it's the stable right? uname -r still shows 8.0-RELEASE-p2 but it's compiled kernel. If it's not mean stable please refer me about this.

I downloaded the last 8-STABLE snapshot iso cd but it didn't boot. So i updated the source and compiled it. If the 8.0 source is not stable please tell me about this.

After i compiled from updated source code, it didn't help me. It's the same.

I tried all the pci slots. I disabled serial & parallel ports. I tried with so many sata cables. I tried with 3 different power supplies to be sure about stable voltage. It's all the same.

I limited the bandwidth on network; tried to transfer files at about 128kb/s. Still got errors.

Thank you for your helps.


----------



## mav@ (Jan 25, 2010)

Releases are just a way points of STABLE branches. 8.0-RELEASE is 8-STABLE of 4 moth ago.


----------



## jailed (Jan 25, 2010)

mav@ said:
			
		

> Releases are just a way points of STABLE branches. 8.0-RELEASE is 8-STABLE of 4 moth ago.



Yes. I was already using 8.0-RELEASE-p2. It's patched with freebsd-update utility. After that, you asked me to upgrade to 8-STABLE. So, i updated the source tree (/usr/src) with csup (configured as release tag RELENG_8_0)

```
*default release=cvs tag=RELENG_8_0
```

After I updated the source, i compiled and installed kernel and world. I thought that it means stable. Am I wrong?

If I'm wrong about fetching the source and compiling the kernel means current stable, please tell me about how to update my system to stable?

Thanks.


----------



## DutchDaemon (Jan 25, 2010)

If you want STABLE, you need tag=RELENG_8. If you use tag=RELENG_8_0 you will basically have the same as 8.0-RELEASE plus patch levels.

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvs-tags.html


----------



## jailed (Jan 25, 2010)

DutchDaemon,

Thank you very much for correcting me. I will start updating it now.


----------



## jailed (Jan 26, 2010)

I have compiled 8-STABLE successfully. Now, interrupt storms had gone. But i still see READ and WRITE DMA errors. How can i fix this? After this errors, device detached and system automatically reboots.


----------



## mav@ (Jan 26, 2010)

As first, show these error messages.


----------



## jailed (Jan 26, 2010)

After fsck -y

```
ad4: WARNING - READ_DMA UDMA ICRC error (retrying request) LBA=376639
ad4: WARNING - READ_DMA UDMA ICRC error (retrying request) LBA=376639
ad4: TIMEOUT - READ_DMA retrying (1 retry left) LBA=1129343
ad4: WARNING - READ_DMA UDMA ICRC error (retrying request) LBA=3763775
ad4: WARNING - READ_DMA UDMA ICRC error (retrying request) LBA=12043551
ad4: WARNING - READ_DMA UDMA ICRC error (retrying request) LBA=12043551
ad4: FAILURE - READ_DMA status=51<READY,DSC,ERROR> error=84<ICRC,ABORTED> LBA=12043551
ad4: FAILURE - device detached
```

After mount

```
WARNING: /backup/a1 was not properly dismounted
/backup/a1: mount pending error: blocks 28992 files 0
```

Then i do fsck -y on another machine and connected the clean drive again. Mounter with this error:

```
ad4: WARNING - READ_DMA UDMA ICRC error (retrying request) LBA=63
ad4: TIMEOUT - WRITE_DMA retrying (1 retry left) LBA=191
```


----------



## jailed (Jan 26, 2010)

Then try to "rm -rf" the files in the slice and get:


```
ad4: 305245MB <Seagate ST3320620AS 3.AAK> at ata2-master UDMA100 SATA 1.5Gb/s
ad4: WARNING - READ_DMA UDMA ICRC error (retrying request) LBA=63
ad4: TIMEOUT - WRITE_DMA retrying (1 retry left) LBA=191
ad4: FAILURE - device detached
g_vfs_done():ad4s1d[READ(offset=103668416512, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=104606269440, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=104607531008, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=103257636864, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=103283081216, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=103757627392, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=103841775616, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=104606056448, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=103757266944, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=103251116032, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=104606040064, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=106115186688, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=103251148800, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=103757250560, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=104606236672, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=104607678464, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=118891118592, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=118891200512, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=103668482048, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=120818040832, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105209970688, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105210052608, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105023619072, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
handle_workitem_freefile: got error 6 while accessing filesystem
g_vfs_done():ad4s1d[READ(offset=107714969600, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=107715051520, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105057468416, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
handle_workitem_freefile: got error 6 while accessing filesystem
g_vfs_done():ad4s1d[READ(offset=109641891840, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=109641973760, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105057402880, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
handle_workitem_freefile: got error 6 while accessing filesystem
g_vfs_done():ad4s1d[READ(offset=112724967424, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=112725049344, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105057419264, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
handle_workitem_freefile: got error 6 while accessing filesystem
g_vfs_done():ad4s1d[READ(offset=114651889664, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=114651971584, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105057435648, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
handle_workitem_freefile: got error 6 while accessing filesystem
g_vfs_done():ad4s1d[READ(offset=117734965248, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=117735047168, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105057452032, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
handle_workitem_freefile: got error 6 while accessing filesystem
g_vfs_done():ad4s1d[READ(offset=119661887488, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=119661969408, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105057484800, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105210052608, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105210052608, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105210052608, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105210052608, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105210052608, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105210052608, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105210052608, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105210052608, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105210052608, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105210052608, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105210052608, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105210052608, length=16384)]error = 6
g_vfs_done():ad4s1d[READ(offset=105017360384, length=16384)]error = 6
handle_workitem_freefile: got error 6 while accessing filesystem
Device ad4s1d went missing before all of the data could be written to it; expect data loss.
```


----------



## mav@ (Jan 26, 2010)

Drive screams about data corruptions during transfer.  Try to put SATA150 limit jumper onto the drive. If it doesn't help and if you have already tried several data cables - I don't see what else we can do about it.


----------



## jailed (Jan 26, 2010)

Thank you mav@,

I have already put SATA150 jumper onto the drive and tried with over 5 different absolutely brand new data cables.

I'm limiting network transfer speed on firewall to about 100kb/s but it's the same. After some time, errors arrive.

Is it possible to limit the speed etc. on kernel level?

Thank you for your all help.


----------



## jb_fvwm2 (Jan 26, 2010)

*Make the card/disk usable...*


```
rsync -vaH --delete-delay --partial --stats --numeric-ids --inplace --archive --compress --hard-links --one-file-system  --bwlimit=1000 . /[target] && yell
```
That command all on one line.
Run once per filesystem.
for instance, if /usr is a seperate
filesystem, and you run the command
from /usr,
and you have installed /yell/ first,
You *may* have a perfect backup going
while you browse, email etc merrily
along in another tty...
The command (rsync with bwlimit) fixed
a similar issue here.  The sending disk
sends at "9000" but the sata disk 
receives at "1000" throttled by rsync.


```
#/usr# rsync  [...]  . /backupdisk/usr && yell
```

You have to be VERY_VERY careful to
complete the [target] part of the
command to match the source from which
you run it...

BTW that all assumes one machine. You may
have to preprocess data *to* the machine 
(some other, ide disk? )
before the to-sata rsync...
the rsync


----------



## mav@ (Jan 26, 2010)

As last resort, try to add line
ch->dma.max_iosize = 32768;
into ata_via_ch_attach() function of ata-via.c, just after line
ata_pci_dmainit(dev);


----------



## jailed (Jan 26, 2010)

Thank you for your help.

I think the solution is not with transfer speed. Yes rsync set transfer speed limit but, i'm already limiting it on network level. I set the bandwidth of the backup machine even to 512Kbit/s ~ 64 KB/s max. and it's the same. It transfers about 200 mb, and then suddenly device detached and system reboots in 15 seconds.

Thank you all for your help. I think it's not possible to solve my problem on this situation. There's no need to steal your time more.

Thank you,
have a good day.


----------



## jailed (Jan 26, 2010)

mav@ said:
			
		

> As last resort, try to add line
> ch->dma.max_iosize = 32768;
> into ata_via_ch_attach() function of ata-via.c, just after line
> ata_pci_dmainit(dev);



Sorry, i have just seen your message.

I edited /usr/src/sys/ata/chipsets/ata-via.c
and added this line as you said. Is there a fast solution to compile this module without compiling all the kernel?

And, 32768 the size is in bytes?

Thank you again.


----------



## mav@ (Jan 26, 2010)

GENERIC kernel includes this driver linked statically. So you have to rebuild kernel.

Yes, it is in bytes. Some controllers have issues with large transfers, so you may try to limit it. On my tests this controller was working fine without it.


----------



## jailed (Jan 26, 2010)

mav@,

I tried your last suggest. But it didn't help.

I thank you very much for spending time for my issue.

I think I bought the worst controller ever 

Thank you again.

Sincerely yours.


----------



## jailed (Feb 5, 2010)

We couldn't solve this problem, but I want to add something.

As I said in my first message, this card has 1 eSata, 2 Sata and 1 IDE ports.

I discovered something.

I updated system to 8-STABLE. Interrupt errors had gone. It's ok.

My sata hdd still have read & write dma errors.

About 2 days ago, i want to try an IDE hdd with the card. When my system was still 8.0-RELEASE system gave the same interrupt and read & write dma errors with both this IDE and other SATA hdds.

But after updated to stable, this ide works well. The IDE is 40 GB. I could transfer even about 10 GB to the disk, which was impossible with the SATA.

This ide hdd has some bad sectors. It's very old hdd. I only get some read & write errors about this bad sectors. Except this natural errors, I didn't get any error related to controller.

To summarize, now some IDE disks I connect to this sata controller card works well after updated to STABLE. They are 20GB - 40 GB in size. I did fdisk and formatting without any problem. I can format this hdds, fsck them without any problem.

However, I got still errors with my SATA hdd.

I have 2 SATA drive.

One is 320 GB Seagate HDD. Other is 16 GB Samsung SSD (solid state drive)

This card saw my SSD but don't see the slices. I can't mount them. System only detects the solid state drive but mounting or fdisk, formatting is not possible.

It see my SATA hdd but I can't format or fsck it.

I'm formatting the hdd in another machine (onboard sata controller and FreeBSD 7.2-p6)

After I formatted the disk under FreeBSD 7.2 machine, i connect it to this sata controller. I can mount it. Transfer some files (about 200-300mb) and after that errors came.

I know that there is no update about ufs from 7.2 to 8.0 as I read the release notes.

The last thing, I compiled the kernel as mav@ said (32kb/s iosize) But I still transfer over this speed limit.


----------



## mav@ (Feb 5, 2010)

32KB there is not a a speed, but a transaction size limit. It limits speed only indirectly. There is no way to limit speed below 150MB/s on SATA.


----------



## jailed (Feb 5, 2010)

I thought it so. I thought it's transfer speed or transaction. I'm limiting transfer speed on network level. 

Not seeing the slices of 16 GB SSD is maybe about it's SSD. Controller may not support it.

I'm not sure but the problems with 320 GB SATA hdd may be because of it's large size? LBA or something else? I have no other sata hdd lower than 320 GB so I cannot test it.

I'm hopeless about this card. I'm just sharing what I see.

It's IDE socket works perfect with 20-40 GB hdds. But SATA is not working well.

Thank you again.


----------



## jb_fvwm2 (Feb 5, 2010)

can you kldload geom_mbr, geom_label, and
geom_bsd to fix the sata issue, and if it
does (creates more /dev devices)  you can
put those in /boot/loader.conf.


----------



## rongsongshen (Feb 6, 2010)

Have you tried to use more shorter sata cable? maybe the problem caused by driven capability of controller.


----------



## jailed (Feb 11, 2010)

@jb_fvwm2, after I set the modules on /boot/loader.conf it's still same.


```
ad4: 305245MB <Seagate ST3320620AS 3.AAK> at ata2-master UDMA100 SATA 1.5Gb/s
ad4: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=312474960
ad4: FAILURE - READ_DMA48 status=51<READY,DSC,ERROR> error=10<NID_NOT_FOUND> LBA=312474960
WARNING: ad4s1 expected rawoffset 0, found 63
WARNING: ad4s2 expected rawoffset 0, found 312474960
ad4: WARNING - READ_DMA48 UDMA ICRC error (retrying request) LBA=312474960
ad4: FAILURE - READ_DMA48 status=51<READY,DSC,ERROR> error=10<NID_NOT_FOUND> LBA=312474960
WARNING: ad4s1d expected rawoffset 0, found 63
WARNING: ad4s2d expected rawoffset 0, found 312474960
ad4: WARNING - READ_DMA UDMA ICRC error (retrying request) LBA=191
ad4: WARNING - READ_DMA48 UDMA ICRC error (retrying request) LBA=312474960
ad4: FAILURE - READ_DMA48 status=51<READY,DSC,ERROR> error=10<NID_NOT_FOUND> LBA=312474960
ad4: WARNING - READ_DMA UDMA ICRC error (retrying request) LBA=12043615
ad4: WARNING - READ_DMA UDMA ICRC error (retrying request) LBA=12043615
ad4: FAILURE - READ_DMA status=51<READY,DSC,ERROR> error=84<ICRC,ABORTED> LBA=12043615
ad4: FAILURE - device detached
```

@rongsongshen,

All the cables I have (about 5-10 brand new cables) are about 50-52 CM (20 inches).

Are the cables at this long, short or long? I haven't got any shorter one but if it'd solve my problem, I can buy a shorter one. How much in size do you suggest?


----------



## jailed (Feb 21, 2010)

Hello again,

I have installed Linux onto this server. Linux too gives errors, however it automatically mounts the drive after it disconnects. I limited network to 1mbit/s to be a little more stable while transferring files.

Using linux will be a temporary solution for me until building a new server with different and brand new hardware.

This output belongs to Linux. I copied this because maybe it can give someone an idea in the future.

```
# tail -n 20 /var/log/messages
Feb 21 10:31:39 backup kernel: ata1.00: configured for UDMA/33
Feb 21 10:31:39 backup kernel: ata1: EH complete
Feb 21 10:31:39 backup kernel: sd 2:0:0:0: [sda] 625142448 512-byte hardware sectors: (320 GB/298 GiB)
Feb 21 10:31:39 backup kernel: sd 2:0:0:0: [sda] Write Protect is off
Feb 21 10:31:39 backup kernel: sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Feb 21 10:55:04 backup kernel: ata1: hard resetting link
Feb 21 10:55:04 backup kernel: ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
Feb 21 10:55:04 backup kernel: ata1.00: configured for UDMA/33
Feb 21 10:55:04 backup kernel: ata1: EH complete
Feb 21 10:55:04 backup kernel: sd 2:0:0:0: [sda] 625142448 512-byte hardware sectors: (320 GB/298 GiB)
Feb 21 10:55:04 backup kernel: sd 2:0:0:0: [sda] Write Protect is off
Feb 21 10:55:04 backup kernel: sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Feb 21 11:01:40 backup kernel: ata1: hard resetting link
Feb 21 11:01:40 backup kernel: ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
Feb 21 11:01:40 backup kernel: ata1.00: configured for UDMA/33
Feb 21 11:01:40 backup kernel: ata1: EH complete
Feb 21 11:01:40 backup kernel: sd 2:0:0:0: [sda] 625142448 512-byte hardware sectors: (320 GB/298 GiB)
Feb 21 11:01:40 backup kernel: sd 2:0:0:0: [sda] Write Protect is off
Feb 21 11:01:40 backup kernel: sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
```

Conclusion,
I don't suggest VIA VT6421A cards to anybody. If you want to use this card in a production server (e.g: www or database server), I think it's a mistake. If you have bought it before and would like to use for a storage solution like me (e.g. a backup server), and if you've followed the steps in FreeBSD and it doesn't work; then try it with a Linux distribution too. I'm using it with errors in Linux temporarily until buying a new server.

I thank you all for you support. I'm marking this thread as solved.

Have a good day...


----------



## cbowlby (Mar 2, 2010)

Hi Guys, 

 I'm not so certain this is an issue with simply the VIA sata controller, possibly more with the drive itself, tho I have not yet had a chance to confirm that. The reason I think this is because I am running into the exact same problem on an Intel based controller:


```
atapci1: <Intel ICH9 SATA300 controller> port 0x3428-0x342f,0x3434-0x3437,0x3420-0x3427,0x3430-0x3433,0x3020-0x303f mem 0xe3221000-0xe32217ff irq 21 at device 31.2 on pci0
atapci1: [ITHREAD]
atapci1: AHCI called from vendor specific driver
atapci1: AHCI v1.20 controller with 6 3Gbps ports, PM supported
...
ad6: 476940MB <Seagate ST3500320AS SD15> at ata3-master SATA150
ad8: 476940MB <Seagate ST3500418AS CC38> at ata4-master SATA300
GEOM: ad6s1: geometry does not match label (255h,63s != 16h,63s).
ad14: 476940MB <Seagate ST3500320AS SD15> at ata7-master SATA150
ad16: 476940MB <Seagate ST3500320AS SD15> at ata8-master SATA150
```


```
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
ad6: TIMEOUT - READ_DMA48 retrying (1 retry left) LBA=386980703
ad6: TIMEOUT - READ_DMA48 retrying (0 retries left) LBA=386980703
ad6: FAILURE - READ_DMA48 timed out LBA=386980703
g_vfs_done():ad6s1h[READ(offset=30630363136, length=16384)]error = 5
```

Sorry for the excess in read failures. I was moving data off to a RAID enabled drive set when I trigger this issue, however I have seen it crop up 2 times in the nightly security output.

I did a quick reboot, swapped cables, and as you can see ad6 is already limited at 150. I have new drives on hand and will be swapping this one out if I can get the disk mirrored before it fails on me. As it is a seagate I can run a test suite on the drive itself when I have a moment and confirm if it was the disk itself, or if there maybe something else going on.


----------



## cbowlby (Mar 2, 2010)

Forgot to mention it's with RELENG_8_0


----------



## jailed (Mar 2, 2010)

@cbowlby

This output belongs to another server I have, with *onboard* sata support with VIA 6420 chipset. Operating system is [CMD=""]FreeBSD 7.2-RELEASE-p7[/CMD]


```
atapci0: <VIA 6420 SATA150 controller> port 0xd400-0xd407,0xd000-0xd003,0xcc00-0xcc07,0xc800-0xc803,0xc400-0xc40f,0xc000-0xc0ff irq 20 at device 15.0 on pci0
```

This system runs the same harddisk without *any* error.

VIA VT 6421 PCI Card on Freebsd 8-Stable 2010-02, gives so many read/write errors with the same harddisk, which runs without problem on the first one.

My onboard sata controller see my solid state drive. I can use it without problem.

PCI card only shows there's a drive. But can't see slices, so can't mount it or fdisk/format it.

I have ordered a SIL3512 from ebay. Waiting for it.

There's an issue too. System shows this card. If I shutdown the system and restart it, it doesn't see this pci card. I must switch off the power supply and cut the electricity, and open it again; then pci card appears. I think that it's about the via card. Because, I removed this sata card and put an secondary ethernet card to it's place and on the same way (shutdown then start) system see the ethernet card.

I also tried to remove the agp vga card and put a pci vga card. And it's the same. So I think it's not about irq things.

I'm not a hardware expert. But I have tried everything.


----------



## dhlfrs (Apr 7, 2010)

Very useful thread. 

I've been pulling my hair with a VIA6421 SATA controller as well. No matter what, it just spit outs interrupt storms and read/write timeouts, and it does so with all the four hard disks I've tested on it. When looking around and noticing the problems people are having with this controller, it seems like the best solution is to buy a new one...


----------



## Wasp (May 3, 2010)

I run into the same problem yesterday with SATA. Already had these problems with same card and IDE on anther computer but it just threw interrupt storms and did not freeze the whole system until hardware reset.

@*Jailed*: Did you just tried the other of the two SATA-Ports?

When I connect only one(!) SATA drive to the card on the first(!) port it runs well. (Think I read this tip somewhere else.) But I just testing for a day and two SATA drives at the card runs well too from time to time for a while.

But I do not think it is the chips fault at all. I have the same chip on another card of another manufacturer with just one SATA port and had never a single problem with it. Seems to me that the malady is the shared eSATA/SATA port on one channel. Sounds more like a bad implementation of the chip by the card manufacturer.

I also noticed that the PCI connector of the "bad" card is shorter then the one of the "good" (but also cheap) card. While the "good" one uses the whole PCI slot, the "bad" one does not. But does not have to mean anything -- just noticed it.

@*Jailed*: Your SiL3512 chip/card runs well? Heard of hardware bugs and incompatibilities with some drive manufactures for other SiL chips.



			
				jailed said:
			
		

> We couldn't solve this problem (..)


Wondering that the topic says "SOLVED". ]Wasp[/b]

_PS: Running SATA drives on FreeBSD 6.2 stable and was running the card with IDE connected on FreeBSD 7.2 stable._


----------



## DutchDaemon (May 3, 2010)

Wonder no longer ...



			
				jailed said:
			
		

> I thank you all for you support. I'm marking this thread as solved


----------



## jailed (May 12, 2010)

WASP,

Sorry, I have just seen your reply.

First of all, my problem wih this chip is not solved. But I marked the thread as solved because I found another solution to deal with my hdd connectivity.

I tried this chip with all of my servers. Running on 8-STABLE fixed the interrupt storms. But, still read/write errors exists. And after a little time, system is dumping and restarting. I shared all the error results on my previous posts.

Firstly, running Slackware with this card solved my problem a little. Because, linux is automatically re-attach the device after it detached with fault. But On BSD it ain't. BSD reboots the machine or just detaching the device itself.

The same errors exists on Linux too, but this auto-attaching thing solved my problem a little. But running this card was still a pain.

So I got bored and purchased a SiL3512 card from e-bay after a freebsd forum users suggestion. I was looking for a cheap pci card and I want to try this one too.

SiL3512 is better for me. Because I can format and fdisk the hdd. Which is not possible for me on VIA.

On VIA, when I shutdown the system, I have to switch the power button to off and cut the all electricity. Because, when I want to open the pc after shutdown, the system weren't detecting the card. But this problem disappeared with SIL.

I have problems with SIL too. After heavy load (55 mbps average and after 7-10 GB transfer) system dumping and rebooting. Transfer speed weren't important for me. So I have limited the network speed to 32 KBPS. This backup server is running for a month with 32KBPS transfer speed without any problem. It may sound stupid. But I was looking for a cheap and temporary solution for my backup. The system was old and my IDE hdds exploded and I don't want to buy new IDE hdds while I have several SATA hdds.

Your other question. I tried all the ports, all PCI slots, all different cables, all jumper setting with different HDDs, one or multiple. I did all the combinations like a crazy 

One note too, this VIA card doesn't see my SSD. But SIL does. SIL also supports boot. You can boot a HDD from bios with this card. But it's still a cheap card. And still have problems. If you have PCI-x support, pay a little more and get a new one.

My system is old. 64 MB ram and 800 mhz CPU. I know that PCI is not related with RAM. I maybe wrong. But I tried VIA with a 3 gig machine too.

Now it doesn't matter for me. I solved my financial problems and buying new servers.

However, if you want me to try something with this cards, I can do to help you.

Conclusion,
I'm not using this VIA card now, I do not suggest it anyone, and I have marked this thread as solved because I solved my need with different solutions, not with this card.

Have a good day.


----------



## bthomson (Nov 7, 2010)

I wanted to add my experience with a VIA6421 PCI card. The card has one IDE port and two sata ports. I have had two IDE drives attached which both worked fine.

First I tried to attach a WDC WD15EARS-00Z5B1. That resulted in thousands of CRC errors like this:


```
ad6: WARNING - READ_DMA UDMA ICRC error (retrying request) LBA=113362091
ad6: FAILURE - READ_DMA status=51<READY,DSC,ERROR> error=84<ICRC,ABORTED> LBA=113362091
```

I changed the cable, tried to jumper the drive to SATA150, and switched it to the other SATA port on the card. Still CRC errors in all cases.

However when I connected a WDC WD5000AAKS-00YGA0 jumper'd to SATA150 for good luck, everything is fine. No errors and good throughput. I put the WD15EARS on a motherboard port instead and now all drives are working.

So, the problems with VIA6421 SATA may be related to certain drives only.


----------



## jakshi (Nov 29, 2010)

I Confirm this error.

I have same problem with my WDC WD15EARS hard drive connected to second port of VIA6420 SATA controller (And the another SATA drive is connected to first port): a lot of:

```
ad6: WARNING - READ_DMA48 UDMA ICRC error (retrying request) LBA=1598653696
ad6: FAILURE - READ_DMA48 status=51<READY,DSC,ERROR> error=10<NID_NOT_FOUND> LBA=1598653696
```

messages.

I checked my drive with MHDD on machine where I have problems with this error - There's no eny errors on disk. Also I chekhed this drive with another SATA controllers, it's also working fine. 
So I think that problem may be:
1. Some bug in FreeBSD.
2. VIA6420 have problems with correct serving more then one SATA drives at the same time. (When I test drive with MHDD another SATA drive didn't work at all)


----------

