Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Oct 2003 05:30:19 -0700 (PDT)
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-i386@FreeBSD.org
Subject:   Re: i386/58458: ATAPI-CDROM DMA Support on ALi Aladdin V Chipset is brocken
Message-ID:  <200310241230.h9OCUJJb053676@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/58458; it has been noted by GNATS.

From: Bruce Evans <bde@zeta.org.au>
To: Rolf Witt <rowi@free.de>
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 <rowi@free.de>
 >
 >  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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310241230.h9OCUJJb053676>