Fix the bug that caused SATA disks on VIA etc to fail attach.
This commit is contained in:
parent
171068e718
commit
e52ce037e1
@ -3387,8 +3387,9 @@ ata_via_allocate(device_t dev)
|
||||
|
||||
ctlr->r_type2 = SYS_RES_IOPORT;
|
||||
ctlr->r_rid2 = PCIR_BAR(5);
|
||||
if (!(ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2,
|
||||
&ctlr->r_rid2, RF_ACTIVE)))
|
||||
if (!(ctlr->r_res2 = bus_alloc_resource_any(device_get_parent(dev),
|
||||
ctlr->r_type2, &ctlr->r_rid2,
|
||||
RF_ACTIVE)))
|
||||
return ENXIO;
|
||||
|
||||
/* setup the usual register normal pci style */
|
||||
|
@ -275,7 +275,6 @@ ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid,
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (type == SYS_RES_IRQ && *rid == ATA_IRQ_RID) {
|
||||
if (ata_legacy(dev)) {
|
||||
#ifdef __alpha__
|
||||
@ -290,7 +289,6 @@ ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid,
|
||||
else
|
||||
res = controller->r_irq;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user