From owner-freebsd-bugs@FreeBSD.ORG Sat Jul 17 13:00:36 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4038F16A4CE for ; Sat, 17 Jul 2004 13:00:36 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 33F3443D46 for ; Sat, 17 Jul 2004 13:00:36 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i6HD0aaP036243 for ; Sat, 17 Jul 2004 13:00:36 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i6HD0aap036242; Sat, 17 Jul 2004 13:00:36 GMT (envelope-from gnats) Resent-Date: Sat, 17 Jul 2004 13:00:36 GMT Resent-Message-Id: <200407171300.i6HD0aap036242@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Divacky Roman Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B99B16A4CE for ; Sat, 17 Jul 2004 12:52:33 +0000 (GMT) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09D6F43D41 for ; Sat, 17 Jul 2004 12:52:32 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (8.12.11/8.12.11) with ESMTP id i6HCqSqV078201 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sat, 17 Jul 2004 14:52:28 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.12.11/8.12.5/Submit) id i6HCqSPu078200; Sat, 17 Jul 2004 14:52:28 +0200 (CEST) Message-Id: <200407171252.i6HCqSPu078200@eva.fit.vutbr.cz> Date: Sat, 17 Jul 2004 14:52:28 +0200 (CEST) From: Divacky Roman To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/69180: repair of broken via ata controllers X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Divacky Roman List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2004 13:00:36 -0000 >Number: 69180 >Category: kern >Synopsis: repair of broken via ata controllers >Confidential: no >Severity: critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jul 17 13:00:35 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Divacky Roman >Release: FreeBSD 5.2-CURRENT i386 >Organization: home >Environment: 5.2-CURRENT >Description: Patch which repairs broken via ata controllers (8237, 8235 and 8233a). These controllers are broken, we cannot reprogram their timing settings. >How-To-Repeat: Try one of these atacontrollers (8237, 8235 or 8233a) with udma higher than udma2 (aka udma33). It hangs... >Fix: --- /root/ata-pci.h Sat Jul 17 14:39:06 2004 +++ ata-pci.h Sat Jul 17 14:38:03 2004 @@ -291,6 +291,7 @@ #define NVIDIA 0x04 #define VIACLK 0x08 #define VIABUG 0x10 +#define VIAAST 0x20 /* global prototypes */ int ata_legacy(device_t); --- /root/ata-chipset.c Sat Jul 17 14:34:12 2004 +++ ata-chipset.c Sat Jul 17 14:36:00 2004 @@ -2565,9 +2565,9 @@ { ATA_VIA8231, 0x00, VIA100, VIABUG, ATA_UDMA5, "VIA 8231" }, { ATA_VIA8233, 0x00, VIA100, 0x00, ATA_UDMA5, "VIA 8233" }, { ATA_VIA8233C, 0x00, VIA100, 0x00, ATA_UDMA5, "VIA 8233C" }, - { ATA_VIA8233A, 0x00, VIA133, 0x00, ATA_UDMA6, "VIA 8233A" }, - { ATA_VIA8235, 0x00, VIA133, 0x00, ATA_UDMA6, "VIA 8235" }, - { ATA_VIA8237, 0x00, VIA133, 0x00, ATA_UDMA6, "VIA 8237" }, + { ATA_VIA8233A, 0x00, VIA133, VIAAST, ATA_UDMA6, "VIA 8233A" }, + { ATA_VIA8235, 0x00, VIA133, VIAAST, ATA_UDMA6, "VIA 8235" }, + { ATA_VIA8237, 0x00, VIA133, VIAAST, ATA_UDMA6, "VIA 8237" }, { 0, 0, 0, 0, 0, 0 }}; static struct ata_chip_id new_ids[] = {{ ATA_VIA6410, 0x00, 0x00, 0x00, ATA_UDMA6, "VIA 6410" }, @@ -2695,7 +2695,8 @@ if (ctlr->chip->cfg2 & NVIDIA) reg += 0x10; - pci_write_config(parent, reg - 0x08, timings[ata_mode2idx(mode)], 1); + if (~ctlr->chip->cfg2 & VIAAST) + pci_write_config(parent, reg - 0x08, timings[ata_mode2idx(mode)], 1); error = ata_controlcmd(atadev, ATA_SETFEATURES, ATA_SF_SETXFER, 0, mode); >Release-Note: >Audit-Trail: >Unformatted: