Deleted Added
full compact
28c28
< * $FreeBSD: head/sys/dev/ata/ata-all.c 54544 1999-12-13 10:19:39Z sos $
---
> * $FreeBSD: head/sys/dev/ata/ata-all.c 54594 1999-12-14 10:25:28Z sos $
199,200c199
< switch (pci_read_config(dev, 0x08, 1)) {
< case 1:
---
> if (ata_find_dev(dev, 0x05861106))
202c201
< case 6:
---
> if (ata_find_dev(dev, 0x06861106))
204d202
< }
279d276
< bmaddr_1 = pci_read_config(dev, 0x20, 4) & IOMASK;
291d287
< bmaddr_2 = (pci_read_config(dev, 0x20, 4) & IOMASK) + ATA_BM_OFFSET1;
312a309,310
> bmaddr_1 = pci_read_config(dev, 0x20, 4) & IOMASK;
> bmaddr_2 = (pci_read_config(dev, 0x20, 4) & IOMASK)+ATA_BM_OFFSET1;
316,317c314
< /* we dont know this controller, disable busmastering DMA */
< bmaddr_1 = bmaddr_2 = 0;
---
> /* we dont know this controller, no busmastering DMA */
950a948,971
>
> int32_t
> ata_find_dev(device_t dev, int32_t type)
> {
> device_t *children, child;
> int nchildren, i;
>
> if (device_get_children(device_get_parent(dev), &children, &nchildren))
> return 0;
>
> for (i = 0; i < nchildren; i++) {
> child = children[i];
>
> /* check that it's on the same silicon and the device we want */
> if (pci_get_slot(dev) == pci_get_slot(child) &&
> pci_get_vendor(child) == (type & 0xffff) &&
> pci_get_device(child) == ((type & 0xffff0000)>>16)) {
> free(children, M_TEMP);
> return 1;
> }
> }
> free(children, M_TEMP);
> return 0;
> }