Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jul 2004 14:52:28 +0200 (CEST)
From:      Divacky Roman <xdivac02@stud.fit.vutbr.cz>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/69180: repair of broken via ata controllers
Message-ID:  <200407171252.i6HCqSPu078200@eva.fit.vutbr.cz>
Resent-Message-ID: <200407171300.i6HD0aap036242@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407171252.i6HCqSPu078200>