From owner-freebsd-current@FreeBSD.ORG Wed Oct 8 20:16:32 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCBF916A4B3; Wed, 8 Oct 2003 20:16:32 -0700 (PDT) Received: from mailout05.sul.t-online.com (mailout05.sul.t-online.com [194.25.134.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2AA843F75; Wed, 8 Oct 2003 20:16:31 -0700 (PDT) (envelope-from D.Rock@t-online.de) Received: from fwd10.aul.t-online.de by mailout05.sul.t-online.com with smtp id 1A7N1a-0007SF-00; Thu, 09 Oct 2003 00:43:18 +0200 Received: from dialin.t-online.de (Ekzs5qZfZeVp+B1Hjm5FmRjwqlml2MbB4pGHXSrPQ-GbMc-mPpXHQa@[217.234.103.208]) by fwd10.sul.t-online.com with esmtp id 1A7N1S-1KokFM0; Thu, 9 Oct 2003 00:43:10 +0200 Received: from t-online.de (doom [172.23.7.254])h98MgbvT045223; Thu, 9 Oct 2003 00:42:37 +0200 (CEST) Message-ID: <3F8492DD.9000407@t-online.de> Date: Thu, 09 Oct 2003 00:42:37 +0200 From: D.Rock@t-online.de (Daniel Rock) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.5) Gecko/20030916 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Gallatin References: <16260.27697.175840.870364@grasshopper.cs.duke.edu> In-Reply-To: <16260.27697.175840.870364@grasshopper.cs.duke.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Seen: false X-ID: Ekzs5qZfZeVp+B1Hjm5FmRjwqlml2MbB4pGHXSrPQ-GbMc-mPpXHQa cc: current@freebsd.org Subject: Re: UDMA33 on older acer aladdin chips X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2003 03:16:33 -0000 Andrew Gallatin wrote: > Hi, > > I recently decided to update my alpha UP1000 to today's current from a > mid-July build. However, UDMA33 did not work on a hard disk attached > to the built-in Acer Aladdin controller (verbose dmesg appended). > > I think I have narrowed the problem down to this line of code: > > atadev->channel->flags |= ATA_ATAPI_DMA_RO; > > Removing this line gets my UDMA33 back. If I understand the code correctly, the right fix should more look like: diff -u -r1.18 ata-lowlevel.c --- ata-lowlevel.c 7 Oct 2003 13:45:56 -0000 1.18 +++ ata-lowlevel.c 8 Oct 2003 22:38:15 -0000 @@ -73,7 +73,8 @@ request->device->channel->running = request; /* disable ATAPI DMA writes if HW doesn't support it */ - if (request->flags & (ATA_R_ATAPI | ATA_R_DMA | ATA_R_WRITE) && + if (((request->flags & (ATA_R_ATAPI | ATA_R_DMA | ATA_R_WRITE)) == + (ATA_R_ATAPI | ATA_R_DMA | ATA_R_WRITE)) && request->device->channel->flags & ATA_ATAPI_DMA_RO) request->flags &= ~ATA_R_DMA; But I don't have ATAPI devices attached to this machine to test. Daniel