From owner-freebsd-hardware@FreeBSD.ORG Sun Mar 27 02:07:42 2005 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6BBE616A4CE for ; Sun, 27 Mar 2005 02:07:42 +0000 (GMT) Received: from av8-2-sn3.vrr.skanova.net (av8-2-sn3.vrr.skanova.net [81.228.9.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98F3743D3F for ; Sun, 27 Mar 2005 02:07:41 +0000 (GMT) (envelope-from stefan.haglund@crystalnorth.com) Received: by av8-2-sn3.vrr.skanova.net (Postfix, from userid 502) id 1A02937E70; Sun, 27 Mar 2005 04:07:40 +0200 (CEST) Received: from smtp3-2-sn3.vrr.skanova.net (smtp3-2-sn3.vrr.skanova.net [81.228.9.102]) by av8-2-sn3.vrr.skanova.net (Postfix) with ESMTP id 06D1537E49 for ; Sun, 27 Mar 2005 04:07:40 +0200 (CEST) Received: from [192.168.1.150] (h194n4fls310o253.telia.com [81.229.63.194]) by smtp3-2-sn3.vrr.skanova.net (Postfix) with ESMTP id BB4E937E42 for ; Sun, 27 Mar 2005 04:07:39 +0200 (CEST) Message-ID: <4246156B.3040909@crystalnorth.com> Date: Sun, 27 Mar 2005 04:07:39 +0200 From: Stefan Haglund User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: sv, en-us, en To: freebsd-hardware@freebsd.org Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: KT133A quirks present in FreeBSD [5.3]? X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2005 02:07:42 -0000 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