Deleted Added
full compact
28c28
< * $FreeBSD: head/sys/dev/ata/ata-all.c 52918 1999-11-06 16:50:21Z sos $
---
> * $FreeBSD: head/sys/dev/ata/ata-all.c 53029 1999-11-08 21:36:00Z sos $
76a77
> #define IOMASK 0xfffffffc /* XXX SOS 0xfffc */
266,268c267,269
< iobase_1 = pci_read_config(dev, 0x10, 4) & 0xfffc;
< altiobase_1 = pci_read_config(dev, 0x14, 4) & 0xfffc;
< bmaddr_1 = pci_read_config(dev, 0x20, 4) & 0xfffc;
---
> iobase_1 = pci_read_config(dev, 0x10, 4) & IOMASK;
> altiobase_1 = pci_read_config(dev, 0x14, 4) & IOMASK;
> bmaddr_1 = pci_read_config(dev, 0x20, 4) & IOMASK;
278,280c279,281
< iobase_2 = pci_read_config(dev, 0x18, 4) & 0xfffc;
< altiobase_2 = pci_read_config(dev, 0x1c, 4) & 0xfffc;
< bmaddr_2 = (pci_read_config(dev, 0x20, 4) & 0xfffc) + ATA_BM_OFFSET1;
---
> iobase_2 = pci_read_config(dev, 0x18, 4) & IOMASK;
> altiobase_2 = pci_read_config(dev, 0x1c, 4) & IOMASK;
> bmaddr_2 = (pci_read_config(dev, 0x20, 4) & IOMASK) + ATA_BM_OFFSET1;
289c290
< if ((bmaddr_1 = pci_read_config(dev, 0x20, 4) & 0xfffc)) {
---
> if ((bmaddr_1 = pci_read_config(dev, 0x20, 4) & IOMASK)) {
300,305c301,302
< /* the Promise controllers need this to support burst mode */
< if (type == 0x4d33105a || type == 0x4d38105a)
< outb(bmaddr_1 + 0x1f, inb(bmaddr_1 + 0x1f) | 0x01);
<
< /* Promise and HPT366 controllers support busmastering DMA */
< if (type == 0x4d33105a || type == 0x4d38105a || type == 0x00041103)
---
> if (type == 0x4d33105a || type == 0x4d38105a || type == 0x00041103) {
> /* Promise and HPT366 controllers support busmastering DMA */
307,308c304
<
< /* we dont know this controller, disable busmastering DMA */
---
> }
309a306
> /* we dont know this controller, disable busmastering DMA */
313a311,320
>
> /* on the Aladdin activate the ATAPI FIFO */
> if (type == 0x522910b9) {
> pci_write_config(dev, 0x53,
> (pci_read_config(dev, 0x53, 1) & ~0x01) | 0x02, 1);
> }
>
> /* the Promise controllers needs burst mode to be turned on explicitly */
> if (type == 0x4d33105a || type == 0x4d38105a)
> outb(bmaddr_1 + 0x1f, inb(bmaddr_1 + 0x1f) | 0x01);
515,518c522,523
< if (scp->flags & ATA_DMA_ACTIVE)
< if (!(ata_dmastatus(scp) & ATA_BMSTAT_INTERRUPT))
< return;
< if ((scp->status = inb(scp->ioaddr + ATA_STATUS)) == ATA_S_BUSY)
---
> if ((scp->flags & ATA_DMA_ACTIVE) &&
> !(ata_dmastatus(scp) & ATA_BMSTAT_INTERRUPT))
520a526,528
> if (((scp->status = inb(scp->ioaddr+ATA_STATUS)) & ATA_S_BUSY)==ATA_S_BUSY)
> return;
>
533c541
< if (!scp->running)
---
> if (!scp->running)