From nobody@FreeBSD.org  Fri Mar  3 18:27:54 2000
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21])
	by hub.freebsd.org (Postfix) with ESMTP id 1A62D37B72E
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  3 Mar 2000 18:27:54 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.9.3/8.9.2) id SAA90101;
	Fri, 3 Mar 2000 18:27:54 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Message-Id: <200003040227.SAA90101@freefall.freebsd.org>
Date: Fri, 3 Mar 2000 18:27:54 -0800 (PST)
From: larse@isi.edu
Sender: nobody@FreeBSD.org
To: freebsd-gnats-submit@FreeBSD.org
Subject: 4.0-20000214-CURRENT: ata with Intel ICH ATA-66 -> UDMA33
X-Send-Pr-Version: www-1.0

>Number:         17173
>Category:       kern
>Synopsis:       4.0-20000214-CURRENT: ata with Intel ICH ATA-66 -> UDMA33
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar  3 18:30:01 PST 2000
>Closed-Date:    Thu Mar 16 13:44:44 PST 2000
>Last-Modified:  Thu Mar 16 13:45:26 PST 2000
>Originator:     Lars Eggert
>Release:        4.0-20000214-CURRENT
>Organization:
USC Information Sciences Institute
>Environment:
FreeBSD hbo.isi.edu 4.0-20000214-CURRENT FreeBSD 4.0-20000214-CURRENT #4: Thu Feb 24 16:47:59 PST 2000     root@pub.isi.edu:/usr/src/sys/compile/PRECISION  i386
>Description:
For some reason, the ata driver only supports UDMA33 on an Intel ICH 
ATA-66 controller together with an IBM-DPTA-372730 drive. Both drive
and controller should be UDMA66-capable.

The relevant lines from dmesg:

[hbo: /usr/src/sys] dmesg | grep ata
ata-pci0: <Intel ICH ATA-66 controller> port 0xffa0-0xffaf at device 31.1 on pci0
ata0 at 0x01f0 irq 14 on ata-pci0
ata1 at 0x0170 irq 15 on ata-pci0
ad0: 26105MB <IBM-DPTA-372730> [53040/16/63] at ata0-master using UDMA33
acd0: CD-RW <SONY CD-RW CRX140E> at ata1-master using UDMA33

The relevant lines from my kernel config file:

device          ata
device          atadisk                 # ATA disk drives
device          atapicd                 # ATAPI CDROM drives
options         ATA_STATIC_ID           #Static device numbering
options         ATA_ENABLE_ATAPI_DMA    #Enable DMA on ATAPI devices

I saw this note in ata(4):

     Remember that in order to use UDMA4 mode you have to use a special 80
     conductor cable, and the driver tries to determine if you have such a ca-
     ble attached before setting UDMA4 mode.

I'm *assuming* our machine has such a cable (it's a brand-new Dell 
workstation) - in any case, how do I verify that?

Thanks,
Lars
>How-To-Repeat:
n/a
>Fix:


>Release-Note:
>Audit-Trail:

From: Chris Piazza <cpiazza@FreeBSD.org>
To: larse@isi.edu
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: kern/17173: 4.0-20000214-CURRENT: ata with Intel ICH ATA-66 -> UDMA33
Date: Wed, 15 Mar 2000 19:43:54 -0800

 On Fri, Mar 03, 2000 at 06:27:54PM -0800, larse@isi.edu wrote:
 > 
 > >Description:
 > For some reason, the ata driver only supports UDMA33 on an Intel ICH 
 > ATA-66 controller together with an IBM-DPTA-372730 drive. Both drive
 > and controller should be UDMA66-capable.
 > 
 > 
 >      Remember that in order to use UDMA4 mode you have to use a special 80
 >      conductor cable, and the driver tries to determine if you have such a ca-
 >      ble attached before setting UDMA4 mode.
 > 
 > I'm *assuming* our machine has such a cable (it's a brand-new Dell 
 > workstation) - in any case, how do I verify that?
 
 Hi,
 
 If you want to test that the cable is an ATA66 cable, you have to
 boot in verbose mode and check the output of the cblid field.
 
 ata0-master: success setting up UDMA2 mode on PIIX4 chip
 ad0: <FUJITSU MPC3102AT E/6204> ATA-3 disk at ata0 as master
 ad0: 9765MB (20000536 sectors), 19841 cyls, 16 heads, 63 S/T, 512 B/S
 ad0: 16 secs/int, 1 depth queue, UDMA33
 ad0: piomode=4 dmamode=2 udmamode=2 cblid=0
 
 Obviously this is on an ATA33 controller without an ATA66 cable.
 
 ata2-master: success setting up UDMA4 mode on HPT366 chip
 ad4: <IBM-DJNA-371350/J76OA30K> ATA-4 disk at ata2 as master
 ad4: 12949MB (26520480 sectors), 28064 cyls, 15 heads, 63 S/T, 512 B/S
 ad4: 16 secs/int, 32 depth queue, UDMA66
 ad4: piomode=4 dmamode=2 udmamode=4 cblid=1
 
 Please reply with your findings so we know where to proceed from here. 
 
 Thanks.
 -Chris
 -- 
 cpiazza@jaxon.net   cpiazza@FreeBSD.org
         Abbotsford, BC, Canada
 

From: Lars Eggert <larse@isi.edu>
To: cpiazza@FreeBSD.org
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: kern/17173: 4.0-20000214-CURRENT: ata with Intel ICH ATA-66 -> UDMA33
Date: Wed, 15 Mar 2000 20:11:51 -0800 (PST)

   chris> If you want to test that the cable is an ATA66 cable, you
   chris> have to boot in verbose mode and check the output of the
   chris> cblid field.
 ...
   chris> Please reply with your findings so we know where to proceed
   chris> from here.
 
 No problem, please let me know if you need more info. (FYI, this is
 still with 4.0-20000214-CURRENT, we will move to 4.0-RELEASE when the
 ISO image is available.)
 
 ata-pci0: <Intel ICH ATA-66 controller> port 0xffa0-0xffaf at device 31.1 on pci0
 ata0: iobase=0x01f0 altiobase=0x03f6 bmaddr=0xffa0
 ata0: mask=03 status0=50 status1=00
 ata0: mask=03 status0=50 status1=00
 ata0: devices = 0x1
 ata0 at 0x01f0 irq 14 on ata-pci0
 ata1: iobase=0x0170 altiobase=0x0376 bmaddr=0xffa8
 ata1: mask=03 status0=50 status1=00
 ata1: mask=03 status0=00 status1=00
 ata1: devices = 0x4
 ata1 at 0x0170 irq 15 on ata-pci0
 ata0-master: success setting up UDMA2 mode on ICH chip
 ad0: <IBM-DPTA-372730/P78DA32A> ATA-4 disk at ata0 as master
 ad0: 26105MB (53464320 sectors), 53040 cyls, 16 heads, 63 S/T, 512 B/S
 ad0: 16 secs/int, 1 depth queue, UDMA33
 ad0: piomode=4 dmamode=2 udmamode=4 cblid=1
 Creating DISK ad0
 Creating DISK wd0
 ata1-master: piomode=4 dmamode=2 udmamode=2 dmaflag=1
 ata1-master: success setting up UDMA2 mode on ICH chip
 acd0: <SONY CD-RW CRX140E/1.0h> CD-RW drive at ata1 as master
 acd0: read 5512KB/s (5512KB/s) write 1377KB/s (1377KB/s), 4096KB buffer, UDMA33
 acd0: Reads: CD-R, CD-RW, CD-DA stream, packet
 acd0: Writes: CD-R, CD-RW, test write
 acd0: Audio: play, 256 volume levels
 acd0: Mechanism: ejectable tray
 acd0: Medium: CD-ROM 120mm audio disc loaded, unlocked
 Mounting root from ufs:/dev/ad0s2a
 ad0s1: type 0x1b, start 63, end = 8418059, size 8417997 : OK
 ad0s2: type 0xa5, start 8418060, end = 25205984, size 16787925 : OK
 ad0s3: type 0xf, start 25205985, end = 53464319, size 28258335 : OK
 ad0s5: type 0xb, start 25206048, end = 53464319, size 28258272 
 ad0s5: C/H/S start 1023/1/1 (16434558) != start 25206048: invalid
 
 Lars
 ________________________________________________________________________
 Lars Eggert <larse@isi.edu>               Information Sciences Institute
 http://www.isi.edu/~larse/             University of Southern California
 
Responsible-Changed-From-To: freebsd-bugs->sos  
Responsible-Changed-By: cpiazza 
Responsible-Changed-When: Thu Mar 16 11:38:22 PST 2000 
Responsible-Changed-Why:  
sos write the ata driver and is likely to be able to diagnose this 
State-Changed-From-To: open->analyzed 
State-Changed-By: sos 
State-Changed-When: Thu Mar 16 11:47:11 PST 2000 
State-Changed-Why:  

Hmm, ata checks for the BIOS signature for an 80pin cable, and 
this indicates that the BIOS doesn't think you have one. 
Since the disks says OK for an 80pin cable the BIOS is 
probably to blaim. 
You should dso two things: 

1. verify physically if an 80 pin cable actually is present. 

2. Check the BIOS settings if it can be changed / setup there. 

If a 80 pin cable is present and the BIOS cannot be convinced 
to report this right in the ICH chip, you can try to get rid 
of the test in ata-dma.c line 105 by changing it to fx 
if (1/*word54 & (0x10 << devno)*/) { 
then it should do ata66.. 

From: Lars Eggert <larse@isi.edu>
To: sos@FreeBSD.org, freebsd-gnats-submit@FreeBSD.org,
	cpiazza@FreeBSD.org
Cc:  
Subject: Re: kern/17173: 4.0-20000214-CURRENT: ata with Intel ICH ATA-66 -> UDMA33
Date: Thu, 16 Mar 2000 13:28:52 -0800 (PST)

 Please close this item. I have upgraded to 4.0-RELEASE, and UDMA66 is
 now working:
 
 atapci0: <Intel ICH ATA66 controller> port 0xffa0-0xffaf at device 31.1 on pci0
 ata0: at 0x1f0 irq 14 on atapci0
 ad0: 26105MB <IBM-DPTA-372730> [53040/16/63] at ata0-master using UDMA66
 
 Lars
 ________________________________________________________________________
 Lars Eggert <larse@isi.edu>               Information Sciences Institute
 http://www.isi.edu/~larse/             University of Southern California
 
State-Changed-From-To: analyzed->closed 
State-Changed-By: sos 
State-Changed-When: Thu Mar 16 13:44:44 PST 2000 
State-Changed-Why:  
upgrading to 4.0-RELEASE solved the problem. 
>Unformatted:
