Date: Sun, 27 Mar 2005 04:07:39 +0200 From: Stefan Haglund <stefan.haglund@crystalnorth.com> To: freebsd-hardware@freebsd.org Subject: KT133A quirks present in FreeBSD [5.3]? Message-ID: <4246156B.3040909@crystalnorth.com>
next in thread | raw e-mail | index | archive | help
I have a private FreeBSD 5.3 file- & webserver sporting an IWill KK266-R (KT133A/686B) motherboard, running a Athlon XP 1600+ (1400MHz). The board has an onboard CMD649 IDE RAID controller, that I use as an ordinary IDE controller. This controller handles all four disks in the system, other than the boot disk. The NIC is an Intel PRO/100 (fxp). I have a problem with files uploaded to the server is sometimes getting corrupted. I've tried a lot of possible solutions (changing PCI slots, BIOS settings, etc) to no avail. My question is - is there a quirk fix in FreeBSD for the KT133A northbridge, as (AFAIK) there is in Linux? Snippet from Linux 2.6.11 - drivers/pci/quirks.c: /* * VIA Apollo KT133 needs PCI latency patch * Made according to a windows driver based patch by George E. Breese * see PCI Latency Adjust on [1]http://www.viahardware.com/download/viatweak.shtm * Also see [2]http://www.au-ja.org/review-kt133a-1-en.phtml for * the info on which Mr Breese based his work. * * Updated based on further information from the site and also on * information provided by VIA */ static void __devinit quirk_vialatency(struct pci_dev *dev) { struct pci_dev *p; u8 rev; u8 busarb; /* Ok we have a potential problem chipset here. Now see if we have a buggy southbridge */ p = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, NULL); if (p!=NULL) { pci_read_config_byte(p, PCI_CLASS_REVISION, &rev); /* 0x40 - 0x4f == 686B, 0x10 - 0x2f == 686A; thanks Dan Hollis */ /* Check for buggy part revisions */ if (rev < 0x40 || rev > 0x42) goto exit; } else { p = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231, NULL); if (p==NULL) /* No problem parts */ goto exit; pci_read_config_byte(p, PCI_CLASS_REVISION, &rev); /* Check for buggy part revisions */ if (rev < 0x10 || rev > 0x12) goto exit; } /* * Ok we have the problem. Now set the PCI master grant to * occur every master grant. The apparent bug is that under high * PCI load (quite common in Linux of course) you can get data * loss when the CPU is held off the bus for 3 bus master requests * This happens to include the IDE controllers.... * * VIA only apply this fix when an SB Live! is present but under * both Linux and Windows this isnt enough, and we have seen * corruption without SB Live! but with things like 3 UDMA IDE * controllers. So we ignore that bit of the VIA recommendation.. */ pci_read_config_byte(dev, 0x76, &busarb); /* Set bit 4 and bi 5 of byte 76 to 0x01 "Master priority rotation on every PCI master grant */ busarb &= ~(1<<5); busarb |= (1<<4); pci_write_config_byte(dev, 0x76, busarb); printk(KERN_INFO "Applying VIA southbridge workaround.\n"); exit: pci_dev_put(p); } References 1. http://www.viahardware.com/download/viatweak.shtm 2. http://www.au-ja.org/review-kt133a-1-en.phtml
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4246156B.3040909>