diff options
Diffstat (limited to 'src/drivers/net/pnic.c')
-rw-r--r-- | src/drivers/net/pnic.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/drivers/net/pnic.c b/src/drivers/net/pnic.c index 6db4dea3..e79b7647 100644 --- a/src/drivers/net/pnic.c +++ b/src/drivers/net/pnic.c @@ -211,28 +211,15 @@ static struct nic_operations pnic_operations = { .disable = pnic_disable, }; -static struct pci_id pnic_nics[] = { -/* genrules.pl doesn't let us use macros for PCI IDs...*/ -PCI_ROM ( 0xfefe, 0xefef, "pnic", "Bochs Pseudo NIC Adaptor" ), -}; - -static struct pci_driver pnic_driver = - PCI_DRIVER ( "PNIC", pnic_nics, PCI_NO_CLASS ); - /************************************************************************** PROBE - Look for an adapter, this routine's visible to the outside ***************************************************************************/ -static int pnic_probe ( struct dev *dev ) { +static int pnic_probe ( struct dev *dev, struct pci_device *pci ) { struct nic *nic = nic_device ( dev ); - struct pci_device *pci = pci_device ( dev ); uint16_t api_version; uint16_t status; - /* Scan PCI bus for a PNIC device */ - if ( ! find_pci_device ( pci, &pnic_driver ) ) - return 0; - /* Retrieve relevant information about PCI device */ nic->ioaddr = pci->ioaddr; nic->irqno = pci->irq; @@ -257,4 +244,12 @@ static int pnic_probe ( struct dev *dev ) { return 1; } -BOOT_DRIVER ( "PNIC", pnic_probe ); +static struct pci_id pnic_nics[] = { +/* genrules.pl doesn't let us use macros for PCI IDs...*/ +PCI_ROM ( 0xfefe, 0xefef, "pnic", "Bochs Pseudo NIC Adaptor" ), +}; + +static struct pci_driver pnic_driver = + PCI_DRIVER ( "PNIC", pnic_nics, PCI_NO_CLASS ); + +BOOT_DRIVER ( "PNIC", find_pci_boot_device, pnic_driver, pnic_probe ); |