Andrzej Popielewicz Phd

Dean Office
Department of Social Sciences , UAM

Download| Contact



CV

Interests

projects

CompactFlash+IDE

x3270


Driver for VT642x RAID controller



27.7.2012

My second week of holidays finishes well :

driver for vt642x RAID controllers finally implemented and working.

Features supported

  • one master PATA channel PIO/UDMA(up to UDMA-6= 133 MB/s)

  • one channel SATA 1 (up to 155 MB/s)(chip has two SATA channels)

  • eSATA

  • vt6421 is sometimes used for flashing XBOX 360

Chips tested/planned and supported

  • tested: vt6421A in PCI card supplied by www.4World.pl

  • planned: vt6420 integrated in motherboard in my Amilo notebook

  • ….

Drives tested

  • internal 3.2 GB PATA (PIO4) on VA503 with K6-300 MHZ

Problems

  • via driver special files have major number different from standard 11, it means some utilities may not work and must be modified, for example fdisk etc....

  • interrupt sharing must be taken into account, BIOS assigns in our case the IRQ 5 to vt6421(on VA503).

  • This PCI card is not bootable, it means in our case system BIOS does not boot BIOS of the card(what is theoretically posiible).It is the OS responsibility to access this card. But there are BIOS's , for example AMIbios, for which it is possible to flash it and make the vt6421 bootable. For motherboards with integrated vt6421 the parameters of the card are accesible in the system BIOS.We have the file with BIOS of the vt6421 , but flashing program for our Lenovo motherboard does not support adding this file to the system BIOS. In any case our card has BIOS chip namely PM49FLOO4, quite known .So the problem seems to be to find flash program for such a BIOS chip.

  • controller does not „like” some SATA 2 drives

  • in general behaviour depends on drive and motherboard

  • the are many incarnations of the card with different properties of the internal and external SATA ports.

Possible applications

  • it alows to use newer faster PATA drives in older computers

  • it allows to use SATA drives in older computers

  • it should help to install Coherent in newer desktop computers , which use IDE/SATA controllers not supported by Coherent

  • eSATA , for example for backup

  • software RAID ???

  • …..

In the meantime

9.8.2012

  • PATA and SATA 80 GB drives tested in PIO-4 mode on P4 ICH5 system

  • because PCI card is not bootable we use the following method to boot Coherent. Coherent partition is installed on 500 GB SATA drive plugged into integrated primary SATA channel port in the ICH5 motherboard. Another Coherent partition is on SATA 80 GB drive plugged into VT6421 card primary SATA channel port. We use bootit bootloader to boot from 500 GB SATA drive , on which itest Coherent kernel is present. In the boot menu of the Coherent tboot we choose this test kernel. This kernel during booting mounts the partition on the 80 GB SATA drive. This means after booting system behaves as if it was booted from the drive plugged into VT6421 !

  • Above mentioned test kernel is developed in Coherent partition on SATA 500 GB drive plugged into standard SATA port on the motherboard.

  • TODO : The problem is now to get bus master DMA mode working.

  • TODO : Optimal situation would be to have both at and via driver active.In this case one would boot standard kernel and after booting one could mount partitions on extra drive plugged into VT6421.

8.9.2012

  • kernel created with both at and via driver active. Root partition is on SATA drive connected to ICH5 SATA controller. This means we can now have two master SATA drives accessible at the same time, what is good for backups. Unfortuanately vt6421 controller „forces” both SATA controllers to work in PIO mode only, which is relatively slow.Or more precise, this software configuration works only if both controllers/drives are set to PIO 4 mode.Of course if we use kernel with at driver only, then it works in DMA mode, even if other SATA drive connected to vt6421 is present in the system.

  • Simplest interrupt sharing algorithm implemented, two devices share interrupt in our case : VT6421 and PRO/100.

  • Driver switches to PIO mode if a few DMA timeouts are observed

11.9.2012

  • Magic Fifo fix applied and problems with dma timeouts gone like in Linux world, dma mode works fine.Now CRC errors occur, which is known behavior, and it suggests that my SATA drive is too fast. I will try with older true SATA 1 drive. One can also play with drive jumpers in order to set SATA 1 150MS/s speed.For PATA drive dma mode should work fine without CRC errors, but did not test it yet.FIX explained

13.9.2012

  • After switching the jumper on my ST380815AS Sata drive to set SATA150, the symptoms at first are the same : CRC errors are observed.

  • But after playing with some bits of registers it began to work. UDMA mode works!!! CRC errors are gone.And it makes difference . Wow I am impressed.

  • Above mentioned driver „coupling” was an artifact of functions sharing between at and via driver. After separating function space of both drivers both drivers behave in independent way as expected because they represent two independent IO channels. It means any combination of setting PIO or udma mode of both drivers/drives works fine.

  • Both drivers „at” and „via” ,if activated at the same time and both set to udma mode, work fine. System is booted from ICH5 drive and then partition on drive connected to vt6421 is mounted. It means one can copy files between drive connected to ICH5 and that connected to vt6421.

  • TODO : test E-SATA connection of external SATA drive.Would be perfect for backups and data transfer between different computers.

27.9.2012

  • The story continues. We have tested different kind of VT6421 PCI card(GEMBIRD), this time without the BIOS chip, but with external SATA port being standard SATA, not E-SATA like in above mentioned case. It means one can use standard red SATA cable to connect this external port to free external SATA drive( without any external enclosure). In this case one must arrange for power supply for this drive, what is not a problem. Such a configuration works fine, this external port is equivalent to the back internal port of the card, both being the primary channel. Top internal port(on top of the card) is the secondary SATA channel. We have tested this configuration in Coherent, Ubuntu 10.x and GNU Blag Linux.

  • We have also tested less elegant configuration, namely internal port of our previous vt6421 card(this with BIOS chip) connected via red SATA cable with free external SATA 1 drive. It works fine in Coherent. External E-SATA port does not work in this case, which is confirmed by experiences of other users having similar card, it does not work not only in Coherent but also not in XP with original VIA drivers(black E-sata cable was used).

  • As for today we had no success with external E-SATA enclosure, perhaps because E-SATA means SATA 300(?) and both vt6421 and our test 40 GB SATA drive are SATA 150 (SATA 1) . This enclosure works fine in usb mode in XP. So critical seem to be E-SATA connectors and E-SATA cable.

22.10.2012

  • driver fixed to support vt6420 integrated in AmiloPro notebook (Celeron 1.5 GHZ machine)

  • I can boot Coherent on my notebook !!

  • It is booted using USB floppy, but the Coherent root partition on the internal original 40 GB SATA drive is mounted during the booting. Bootable floppy was created under Coherent on P4 machine. The file system on original partition was created on ThinkCentre P4 machine under Coherent(partition itself was created with gparted), Then under Ubuntu on ThinkCentre P4 machine dd image of this partition was created, gzipped and copied via k3b to CD disc. Under BLAG Linux on AmiloPro the file from this CD disc was restored and this dd image file was copied onto free 1 GB partition.

  • It is also bootable from internal IDE DVD on my AmiloPro notebook. DVD bootable image(El Torito) was created with Nero under Aurox 9.0 (old Polish distribution based on Fedora) on one of my older machines, boot image file was created using dd and the above mentioned bootable floppy disc. It is not bootable from external USB CD/DVD , because AmiloPro does support only USB floppy and USB hardisk as external boot device.My ThinkCentre P4 box also has BIOS not supporting botting from external USB CD device.

  • AmiloPro notebook , although quite old, is interesting because it contains a lot of hardware for testing.It has for example VT82Cx PATA IDE, and I have in the past developed driver for this IDE controller.

  • BTW , the above mentioned test partition contains 64 bit filesystem.

Status : beta, stable



Literature

  • VT6421A Datasheets

  • Linux sata_via driver