Set the pci->have_drivers flag for any device that calls
pci_enable_x() to ensure that the flag is consistently set on any
device with an internal driver. Setting this flag prevents an option
rom on the device from being executed.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
static void
init_pciata(struct pci_device *pci, u8 prog_if)
{
- pci->have_driver = 1;
u8 pciirq = pci_config_readb(pci->bdf, PCI_INTERRUPT_LINE);
int master = 0;
if (CONFIG_ATA_DMA && prog_if & 0x80) {
ASSERT32FLAT();
wait_preempt();
pci_config_maskw(pci->bdf, PCI_COMMAND, 0, PCI_COMMAND_MASTER);
+ pci->have_driver = 1;
}
// Verify an IO bar and return it to the caller
return 0;
}
pci_config_maskw(pci->bdf, PCI_COMMAND, 0, PCI_COMMAND_IO);
+ pci->have_driver = 1;
return bar;
}
return NULL;
}
pci_config_maskw(pci->bdf, PCI_COMMAND, 0, PCI_COMMAND_MEMORY);
+ pci->have_driver = 1;
return (void*)bar;
}