Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Dec 1999 04:24:29 -0800
From:      Devin Butterfield <dbutter@wireless.net>
To:        Soren Schmidt <sos@freebsd.dk>
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: ATA driver problem?? Solution (in my case)!
Message-ID:  <3858D9FD.2EA50F5A@wireless.net>
References:  <199912161045.LAA04163@freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Soren,

No unfortunately it still fails with the patch and the UDMA disabled in
the BIOS.

I'd be happy to try anything else you can think of. :)

Thanks.
--
Regards, Devin.

Soren Schmidt wrote:
> 
> 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


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?3858D9FD.2EA50F5A>