17 #include <rtems/pci.h> 18 #include <rtems/rtems_bsdnet.h> 33 printk(
"Probing for NE2000 on PCI (aka. Realtek 8029)\n");
35 if(pci_find_device(PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8029, 0, &B, &D, &F))
37 printk(
"Not found\n");
41 printk(
"Found %d:%d.%d\n", B, D, F);
43 ret = pci_read_config_dword(B, D, F, PCI_BASE_ADDRESS_0, &bar0);
44 ret|= pci_read_config_byte(B, D, F, PCI_INTERRUPT_LINE, &irq);
46 if(ret || (bar0&PCI_BASE_ADDRESS_SPACE)!=PCI_BASE_ADDRESS_SPACE_IO)
48 printk(
"Failed reading card config\n");
53 config->port = bar0&PCI_BASE_ADDRESS_IO_MASK;
55 printk(
"Using port=0x%x irq=%u\n", (
unsigned)config->port, config->irno);
int rtems_ne2kpci_driver_attach(struct rtems_bsdnet_ifconfig *config, int attach)
int rtems_ne_driver_attach(struct rtems_bsdnet_ifconfig *config, int attach)