From owner-freebsd-current Thu Dec 16 2:45:50 1999 Delivered-To: freebsd-current@freebsd.org Received: from freebsd.dk (freebsd.dk [212.242.42.178]) by hub.freebsd.org (Postfix) with ESMTP id AC81A14D8E for ; Thu, 16 Dec 1999 02:45:45 -0800 (PST) (envelope-from sos@freebsd.dk) Received: (from sos@localhost) by freebsd.dk (8.9.3/8.9.1) id LAA04163; Thu, 16 Dec 1999 11:45:40 +0100 (CET) (envelope-from sos) From: Soren Schmidt Message-Id: <199912161045.LAA04163@freebsd.dk> Subject: Re: ATA driver problem?? Solution (in my case)! In-Reply-To: <3858B8AA.53468C2@wireless.net> from Devin Butterfield at "Dec 16, 1999 02:02:18 am" To: dbutter@wireless.net (Devin Butterfield) Date: Thu, 16 Dec 1999 11:45:40 +0100 (CET) Cc: freebsd-current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG It seems Devin Butterfield wrote: > Hi Soren/group, > > After spending a little time sniffing around in my BIOS I realized that > my BIOS (Award BIOS) defaults to disabling UDMA for both master and > slave and for some reason I never thought to check this....duh. Anyway > after setting this to "auto" for both master and slave the problem seems > to be fixed! > > This is curious because I was running the wd driver with the BIOS set > wrong all along and never had any errors or problems (AFAIK). So why > does the wd driver seem to ignore this incorrect configuration while the > ata driver trips over it? > > Does this help anyone? Hmm, maybe. Try the below patch, but with the BIOS again in the disabled position, and see if it still fails. Index: ata-dma.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ata/ata-dma.c,v retrieving revision 1.23 diff -u -r1.23 ata-dma.c --- ata-dma.c 1999/12/14 10:25:25 1.23 +++ ata-dma.c 1999/12/16 10:44:51 @@ -227,6 +227,12 @@ pci_write_config(scp->dev, 0x53, pci_read_config(scp->dev, 0x53, 1) | 0x03, 1); scp->flags |= ATA_ATAPI_DMA_RO; + if (device == ATA_MASTER) + outb(scp->bmaddr + ATA_BMSTAT_PORT, + inb(scp->bmaddr + ATA_BMSTAT_PORT) | ATA_BMSTAT_DMA_MASTER); + else + outb(scp->bmaddr + ATA_BMSTAT_PORT, + inb(scp->bmaddr + ATA_BMSTAT_PORT) | ATA_BMSTAT_DMA_SLAVE); scp->mode[(device == ATA_MASTER) ? 0 : 1] = ATA_MODE_UDMA2; return 0; } @@ -242,6 +248,12 @@ pci_write_config(scp->dev, 0x53, pci_read_config(scp->dev, 0x53, 1) | 0x03, 1); scp->flags |= ATA_ATAPI_DMA_RO; + if (device == ATA_MASTER) + outb(scp->bmaddr + ATA_BMSTAT_PORT, + inb(scp->bmaddr + ATA_BMSTAT_PORT) | ATA_BMSTAT_DMA_MASTER); + else + outb(scp->bmaddr + ATA_BMSTAT_PORT, + inb(scp->bmaddr + ATA_BMSTAT_PORT) | ATA_BMSTAT_DMA_SLAVE); scp->mode[(device == ATA_MASTER) ? 0 : 1] = ATA_MODE_WDMA2; return 0; } -Søren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message