From sonnet@teatime.org  Tue Aug  5 20:07:48 2003
Return-Path: <sonnet@teatime.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A1AF737B401
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  5 Aug 2003 20:07:48 -0700 (PDT)
Received: from copper.he.net (copper.he.net [216.218.164.2])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 1EAC243FD7
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  5 Aug 2003 20:07:46 -0700 (PDT)
	(envelope-from sonnet@teatime.org)
Received: from teatime.org ([220.117.215.185] (may be forged)) by copper.he.net (8.8.6p2003-03-31/8.8.2) with ESMTP id UAA20313 for <FreeBSD-gnats-submit@freebsd.org>; Tue, 5 Aug 2003 20:07:44 -0700
Message-Id: <3F30713A.9060100@teatime.org>
Date: Wed, 06 Aug 2003 12:08:42 +0900
From: Soonmyung Hong <sonnet@teatime.org>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Promise ATA controller can't handle UDMA device properly

>Number:         55299
>Category:       kern
>Synopsis:       Promise ATA controller can't handle UDMA device properly
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 05 20:10:17 PDT 2003
>Closed-Date:    Sat Oct 25 12:47:12 PDT 2003
>Last-Modified:  Fri Mar  5 14:00:26 PST 2004
>Originator:     Soonmyung Hong
>Release:        FreeBSD 4.8-STABLE i386 / FreeBSD 5.1-CURRENT i386
>Organization:
ubAgent Inc.
>Environment:
System: FreeBSD hel.ubagent.com 4.8-STABLE FreeBSD 4.8-STABLE #0: Thu
Jul 31 21:01:57 KST 2003 root@hel.ubagent.com:/usr/obj/usr/src/sys/HEL i386

FreeBSD fs0.ubagent.com 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Mon Aug 4
03:42:13 KST 2003 root@fs0.ubagent.com:/usr/obj/usr/src/sys/FS i386

MB: Intel SE7500CW2
HDD: Western Digital WD2500JB(250GB IDE) * 4

>Description:
Intel mainboard has on-board IDE-RAID controller PDC-20267, I used it as
just additional IDE controller.

When I connected HDD to Promise controller, driver doesn't work properly.
(4-Stable and 5-Current show different behaviors.)

1) 4.8R and 4-Stable Case
When I connect HDD to any(primary master/slave, secondary master/slave)
channel of promise controller, system hang(fatal trap 12) after message
> ad6: READ command timeout tag=0 serv=0 - resetting

workaround:
Set hw.ata.ata_dma="0" at loader command line(for CD install),
or /boot/loader.conf(for installed one).

But it shows very unpleasant perfomance.

2) 5.1R and 5-Current Case
When I connected HDD to primary master(alone) or primary master/slave,
it works properly.

# atacontrol list
ATA channel 0:
Master: ad0 <WDC WD2500JB-00EVA0/15.05R15> ATA/ATAPI rev 6
Slave: no device present
ATA channel 1:
Master: acd0 <HL-DT-ST CD-ROM GCR-8522B/1.00> ATA/ATAPI rev 0
Slave: ad3 <WDC WD2500JB-00EVA0/15.05R15> ATA/ATAPI rev 6
ATA channel 2:
Master: ad4 <WDC WD2500JB-00EVA0/15.05R15> ATA/ATAPI rev 6
Slave: ad5 <WDC WD2500JB-00EVA0/15.05R15> ATA/ATAPI rev 6
ATA channel 3:
Master: no device present
Slave: no device present
# atacontrol mode 2
Master = UDMA100
Slave = UDMA100

But when I connect HDD to secondary master(alone) or secondary master/slave,
It doesn't work UDMA100.

At boot time, driver report below message.
> ad6: READ command timeout tag=0 serv=0 - resetting
> ata3: resetting device ..
> ata3-slave: ATA identify retries exceeded.
> done
repeated 3 times and fail back to PIO4 mode.
In this case, fatal trap 12 doesn't happened.

# atacontrol list
ATA channel 0:
Master: ad0 <WDC WD2500JB-00EVA0/15.05R15> ATA/ATAPI rev 6
Slave: no device present
ATA channel 1:
Master: acd0 <HL-DT-ST CD-ROM GCR-8522B/1.00> ATA/ATAPI rev 0
Slave: ad3 <WDC WD2500JB-00EVA0/15.05R15> ATA/ATAPI rev 6
ATA channel 2:
Master: ad4 <WDC WD2500JB-00EVA0/15.05R15> ATA/ATAPI rev 6
Slave: ad5 <WDC WD2500JB-00EVA0/15.05R15> ATA/ATAPI rev 6
ATA channel 3:
Master: ad6 <WDC WD2500JB-00EVA0/15.05R15> ATA/ATAPI rev 6
Slave: no device present
# atacontrol mode 3
Master = PIO4
Slave = ???

It is odd that secondary master(alone) configuration also show
message "ata3-slave: ATA identify retries exceeded.".

I convinced it is not hardware/connection/cable problem.
(I carefully tested on 4 different machine(4Motherboard/16HDD)).

I think kern/50559 is similar problem.


>How-To-Repeat:
everytime (I test it with 4 different machine with same configuration)

>Fix:





>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: kris 
Responsible-Changed-When: Fri Oct 10 22:27:16 PDT 2003 
Responsible-Changed-Why:  
Assign to ATA maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55299 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Sat Oct 25 12:46:01 PDT 2003 
State-Changed-Why:  
Does this still fail under -current (as of oct 25) 

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

From: "Steven Hartland" <killing@multiplay.co.uk>
To: <freebsd-gnats-submit@FreeBSD.org>, <sonnet@teatime.org>
Cc:  
Subject: Re: kern/55299: Promise ATA controller can't handle UDMA device properly
Date: Fri, 5 Mar 2004 21:53:04 -0000

 Just tried this controller with 4 * 250Gb WD's in 0+1 and get
 loads of issues. with the latest beta bios ( detects the 250's correctly )
 it reboots in the loader no chance to see the error.
 With 4.9 it trap 12's with the old version 122 of the bios ( 139GB )
 READ_DMA errors
 interrupt was seen but timeout fired
 interrupt was seen but taskqueue stalled
 ...
 
 
 ================================================
 This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 
 
 In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137
 or return the E.mail to postmaster@multiplay.co.uk.
 
>Unformatted:
