From geeorgy@nevernet.net  Tue Oct 10 10:37:37 2000
Return-Path: <geeorgy@nevernet.net>
Received: from mta02-svc.ntlworld.com (mta02-svc.ntlworld.com [62.253.162.42])
	by hub.freebsd.org (Postfix) with ESMTP id 277B937B502
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 10 Oct 2000 10:37:36 -0700 (PDT)
Received: from m17-mp1-cvx1b.gui.ntl.com ([62.252.8.17])
          by mta07-svc.ntlworld.com
          (InterMail vM.4.01.02.27 201-229-119-110) with ESMTP
          id <20001010171513.BTLZ27285.mta07-svc.ntlworld.com@m17-mp1-cvx1b.gui.ntl.com>
          for <FreeBSD-gnats-submit@freebsd.org>;
          Tue, 10 Oct 2000 18:15:13 +0100
Message-Id: <Pine.BSF.4.21.0010101800520.344-100000@sobek.nevernet.net>
Date: Tue, 10 Oct 2000 18:15:35 +0100 (BST)
From: George Reid <geeorgy@nevernet.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: SiS 5591 (early revision) has broken UDMA33

>Number:         21893
>Category:       kern
>Synopsis:       SiS 5591 (early revision) has broken UDMA33
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 10 10:40:00 PDT 2000
>Closed-Date:    Tue Nov 14 00:53:54 PST 2000
>Last-Modified:  Tue Nov 14 00:54:15 PST 2000
>Originator:     George Reid
>Release:        FreeBSD 4.1-RELEASE i386
>Organization:
NeverNET IRC
>Environment:
FreeBSD 4.1-RELEASE i386
>Description:
The SiS 5591 IDE controller (an supposedly-ATA33 model) does not work in
ATA33 mode and attempts to revers to PIO. The chipset revision is 0xc1
and I have been informed that early revisions have issues with UDMA. The
drive is a Fujitsu MPD3043AD, which is capable of UDMA4 (the 5591 does not
support this) and UDMA2 (which this controller does not support 
either). Booting the system causes a freeze after 3 read timeouts when it
attempts to revert to PIO mode after setting UDMA2 mode on the drive.
>How-To-Repeat:
Boot a system with an early revision (<= 0xc1) SiS 5591 controller and a
drive capable of UDMA2.
>Fix:
--- ata-dma.c.orig	Tue Oct 10 17:09:35 2000
+++ ata-dma.c	Tue Oct 10 17:56:31 2000
@@ -377,7 +377,12 @@
 	break;
 
     case 0x55131039:	/* SiS 5591 */
-	if (udmamode >= 2) {
+	if (pci_get_revid(scp->dev) <= 0xc1) {
+	    if (udmamode >= 2)
+	        ata_printf(scp, device,
+		    "buggy SiS 5591 chip revision, not setting UDMA2\n");
+	}
+	else if (udmamode >= 2) {
 	    error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
 				ATA_UDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
 	    if (bootverbose)


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: johan 
Responsible-Changed-When: Tue Oct 10 14:39:45 PDT 2000 
Responsible-Changed-Why:  
Over to ATA maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21893 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Tue Nov 14 00:53:54 PST 2000 
State-Changed-Why:  
fixed in 4.2 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21893 
>Unformatted:
