From owner-freebsd-i386@FreeBSD.ORG Fri Oct 24 05:30:20 2003 Return-Path: Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C29DA16A4B3 for ; Fri, 24 Oct 2003 05:30:20 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0E3843F3F for ; Fri, 24 Oct 2003 05:30:19 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h9OCUJFY053678 for ; Fri, 24 Oct 2003 05:30:19 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h9OCUJJb053676; Fri, 24 Oct 2003 05:30:19 -0700 (PDT) (envelope-from gnats) Date: Fri, 24 Oct 2003 05:30:19 -0700 (PDT) Message-Id: <200310241230.h9OCUJJb053676@freefall.freebsd.org> To: freebsd-i386@FreeBSD.org From: Bruce Evans Subject: Re: i386/58458: ATAPI-CDROM DMA Support on ALi Aladdin V Chipset is brocken X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Bruce Evans List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Oct 2003 12:30:20 -0000 The following reply was made to PR i386/58458; it has been noted by GNATS. From: Bruce Evans To: Rolf Witt Cc: freebsd-gnats-submit@freebsd.org Subject: Re: i386/58458: ATAPI-CDROM DMA Support on ALi Aladdin V Chipset is brocken Date: Fri, 24 Oct 2003 22:19:44 +1000 (EST) On Fri, 24 Oct 2003, Rolf Witt wrote: > The following reply was made to PR i386/58458; it has been noted by GNATS. > > From: Rolf Witt > > Nice text... > > I hope, i have you understand. > > I doesn't use wild gcc optimization flags. Er, it was about missing break statements. However, on closer inspection the missing break statements only affect PIO modes (at best, all PIO modes are reduced to PIO0). > I believe that someone forgot the Workarounds for the DMA mode with CD- > Roms drive assemblies in the code. The Aladdin V chipsets has there a > problem. There seems to be only 1 significant change (an addition with no removals) between RELENG_4_8_0_RELEASE and RELENG_4_9 for Aladdin IV/V chipsets for DMA modes: %%% Index: ata-dma.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ata/ata-dma.c,v retrieving revision 1.35.2.29 retrieving revision 1.35.2.34 diff -u -2 -r1.35.2.29 -r1.35.2.34 --- ata-dma.c 2 Oct 2002 14:13:38 -0000 1.35.2.29 +++ ata-dma.c 22 Oct 2003 14:43:52 -0000 1.35.2.34 @@ -285,10 +392,12 @@ case 0x522910b9: /* AcerLabs Aladdin IV/V */ /* the older Aladdin doesn't support ATAPI DMA on both master & slave */ - if (pci_get_revid(parent) < 0xc2 && - ch->devices & ATA_ATAPI_MASTER && ch->devices & ATA_ATAPI_SLAVE) { + if (chiprev < 0xc2 && + atadev->channel->devices & ATA_ATAPI_MASTER && + atadev->channel->devices & ATA_ATAPI_SLAVE) { ata_prtdev(atadev, "two atapi devices on this channel, no DMA\n"); break; } - if (udmamode >= 5 && pci_get_revid(parent) >= 0xc4) { + pci_write_config(parent, 0x58 + (channel << 2), 0x00310001, 4); + if (udmamode >= 5 && chiprev >= 0xc4) { error = ata_command(atadev, ATA_C_SETFEATURES, 0, ATA_UDMA5, ATA_C_F_SETXFER, ATA_WAIT_READY); %%% The pci_write_config() line is new. Bruce