Date: Thu, 16 Dec 1999 11:45:40 +0100 (CET) From: Soren Schmidt <sos@freebsd.dk> To: dbutter@wireless.net (Devin Butterfield) Cc: freebsd-current@FreeBSD.ORG Subject: Re: ATA driver problem?? Solution (in my case)! Message-ID: <199912161045.LAA04163@freebsd.dk> In-Reply-To: <3858B8AA.53468C2@wireless.net> from Devin Butterfield at "Dec 16, 1999 02:02:18 am"
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912161045.LAA04163>