From nobody@FreeBSD.org  Fri Jan 16 12:28:46 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id AE28E16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 16 Jan 2004 12:28:46 -0800 (PST)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B0DA543D1D
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 16 Jan 2004 12:28:45 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.10/8.12.10) with ESMTP id i0GKSjdL015532
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 16 Jan 2004 12:28:45 -0800 (PST)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.10/8.12.10/Submit) id i0GKSj6s015531;
	Fri, 16 Jan 2004 12:28:45 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200401162028.i0GKSj6s015531@www.freebsd.org>
Date: Fri, 16 Jan 2004 12:28:45 -0800 (PST)
From: Bjrn Knig <bkoenig@cs.tu-berlin.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Highpoint RocketRAID 1520 uses only UDMA2
X-Send-Pr-Version: www-2.0

>Number:         61442
>Category:       i386
>Synopsis:       Highpoint RocketRAID 1520 uses only UDMA2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    remko
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 16 12:30:15 PST 2004
>Closed-Date:    Mon Sep 11 17:10:30 GMT 2006
>Last-Modified:  Mon Sep 11 17:10:30 GMT 2006
>Originator:     Bjrn Knig
>Release:        FreeBSD 4.9
>Organization:
>Environment:
>Description:
      Probably some (or maybe all) hard disks on S-ATA controller Highpoint RocketRAID 1520 remains in UDMA2 (33 MB/s). Tested with Seagate Barracuda 7200.7 (ST380013AS). ATA driver shows "DMA limited to UDMA33, non-ATA66 cable or device" during booting process and benchmarks confirms a very low sequential reading data transfer rate (e.g. around 15 MB/s).

>How-To-Repeat:

>Fix:
Use this patch below to override setting UDMA2 for HighPoint controllers and use the existing function hpt_cable80(...) to determine whether set this pessimistic mode or not.

--- sys/dev/ata/ata-dma.c.orig  Wed Jan 14 16:21:02 2004
+++ sys/dev/ata/ata-dma.c       Wed Jan 14 16:20:46 2004
@@ -186,6 +186,7 @@
     int device = ATA_DEV(atadev->unit);
     int devno = (channel << 1) + device;
     int error;
+    int override = 0;
 
     /* set our most pessimistic default mode */
     atadev->mode = ATA_PIO;
@@ -210,8 +211,16 @@
 
 #if 1
     if (udmamode > 2 && !atadev->param->hwres_cblid) {
-       ata_prtdev(atadev,"DMA limited to UDMA33, non-ATA66 cable or device\n");
-       udmamode = 2;
+       if (chiptype == 0x00051103 && chiprev >= 0x01)
+           if (hpt_cable80)
+               override = 1;
+
+       if (!override) {
+           ata_prtdev(atadev,"DMA limited to UDMA33, non-ATA66 cable or device\n");
+           udmamode = 2;
+       } else {
+           ata_prtdev(atadev,"I don't force UDMA33\n");
+       }
     }
 #endif
     switch (chiptype) {

>Release-Note:
>Audit-Trail:

From: =?ISO-8859-15?Q?Bj=F6rn_K=F6nig?= <bkoenig@cs.tu-berlin.de>
To: freebsd-gnats-submit@FreeBSD.org, bkoenig@cs.tu-berlin.de
Cc:  
Subject: Re: i386/61442: Highpoint RocketRAID 1520 uses only UDMA2
Date: Sat, 17 Jan 2004 00:18:25 +0100

 +++ ATTENTION! +++
 There is a mistake in this patch.
 
 Please use
 
     if (hpt_cable80(atadev))
 
 instead of
 
     if (hpt_cable80)
 
State-Changed-From-To: open->feedback 
State-Changed-By: remko 
State-Changed-When: Mon Sep 11 12:36:07 UTC 2006 
State-Changed-Why:  
Hello, 

Is this still a problem? Did you test with 80pins cables? 
What is the latest version you did test this on? 

Thanks! 


Responsible-Changed-From-To: freebsd-i386->remko 
Responsible-Changed-By: remko 
Responsible-Changed-When: Mon Sep 11 12:36:07 UTC 2006 
Responsible-Changed-Why:  
grab the PR 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61442 

From: =?ISO-8859-15?Q?Bj=F6rn_K=F6nig?= <bkoenig@cs.tu-berlin.de>
To: bug-followup@FreeBSD.org
Cc: bkoenig@cs.tu-berlin.de,  remko@FreeBSD.org
Subject: Re: i386/61442: Highpoint RocketRAID 1520 uses only UDMA2
Date: Mon, 11 Sep 2006 18:45:15 +0200

 This is a SATA controller, for this reason you have use SATA cables. The 
 controller works fine if you use HighPoint's binary drivers. The problem 
 is that HighPoint uses an traditional PATA controller (HPT 372) with 
 SATA bridge chips and the ATA driver of FreeBSD is not aware of this 
 particular case.
 
 Please close this PR.
 
 Regards
 Bjrn
State-Changed-From-To: feedback->closed 
State-Changed-By: remko 
State-Changed-When: Mon Sep 11 17:10:29 UTC 2006 
State-Changed-Why:  
Bjorn reports that this PR can be closed since the binary drivers of the 
highpoint controllers work, the problem is that HighPoint uses an 
traditional PATA controller (HPT 372) with SATA bridge chips and the ATA 
driver of FreeBSD is not aware of this particular case. (Feedback from 
Bjorn) 

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