*/ static void myson_remove ( struct pci_device *pci ) { struct net_device *netdev = pci_get_drvdata ( pci ); struct myson_nic *myson = netdev->priv; /* Unregister network device */ unregister_netdev ( netdev ); /* Reset card */ myson_reset ( myson ); /* Free network device */ netdev_nullify ( netdev ); netdev_put ( netdev ); } /** Myson PCI device IDs */ static struct pci_device_id myson_nics[] = { PCI_ROM ( 0x1516, 0x0800, "mtd800", "MTD-8xx", 0 ), PCI_ROM ( 0x1516, 0x0803, "mtd803", "Surecom EP-320X-S", 0 ), PCI_ROM ( 0x1516, 0x0891, "mtd891", "MTD-8xx", 0 ), }; /** Myson PCI driver */ struct pci_driver myson_driver __pci_driver = { .ids = myson_nics, .id_count = ( sizeof ( myson_nics ) / sizeof ( myson_nics[0] ) ), .probe = myson_probe, .remove = myson_remove, };
struct net_device *netdev = pci_get_drvdata ( pci ); struct intel_nic *intel = netdev->priv; /* Unregister network device */ unregister_netdev ( netdev ); /* Reset the NIC */ intelxvf_reset ( intel ); /* Free network device */ iounmap ( intel->regs ); netdev_nullify ( netdev ); netdev_put ( netdev ); } /** PCI device IDs */ static struct pci_device_id intelxvf_nics[] = { PCI_ROM ( 0x8086, 0x10ed, "82599-vf", "82599 VF", 0 ), PCI_ROM ( 0x8086, 0x1515, "x540-vf", "X540 VF", 0 ), PCI_ROM ( 0x8086, 0x1565, "x550-vf", "X550 VF", 0 ), PCI_ROM ( 0x8086, 0x15a8, "x552-vf", "X552 VF", 0 ), }; /** PCI driver */ struct pci_driver intelxvf_driver __pci_driver = { .ids = intelxvf_nics, .id_count = ( sizeof ( intelxvf_nics ) / sizeof ( intelxvf_nics[0] ) ), .probe = intelxvf_probe, .remove = intelxvf_remove, };
/* Disable MSI-X dummy interrupt */ intelxl_msix_disable ( intelxl, pci ); /* Reset the function via PCIe FLR */ intelxlvf_reset_flr ( intelxl, pci ); /* Free network device */ iounmap ( intelxl->regs ); netdev_nullify ( netdev ); netdev_put ( netdev ); } /** PCI device IDs */ static struct pci_device_id intelxlvf_nics[] = { PCI_ROM ( 0x8086, 0x154c, "xl710-vf", "XL710 VF", 0 ), PCI_ROM ( 0x8086, 0x1571, "xl710-vf-hv", "XL710 VF (Hyper-V)", 0 ), PCI_ROM ( 0x8086, 0x1889, "xl710-vf-ad", "XL710 VF (adaptive)", 0 ), PCI_ROM ( 0x8086, 0x37cd, "x722-vf", "X722 VF", 0 ), PCI_ROM ( 0x8086, 0x37d9, "x722-vf-hv", "X722 VF (Hyper-V)", 0 ), }; /** PCI driver */ struct pci_driver intelxlvf_driver __pci_driver = { .ids = intelxlvf_nics, .id_count = ( sizeof ( intelxlvf_nics ) / sizeof ( intelxlvf_nics[0] ) ), .probe = intelxlvf_probe, .remove = intelxlvf_remove, };
} /* Acknowledge interrupt */ bw32(bp, B44_ISTAT, 0); bflush(bp, B44_ISTAT, 1); } static struct net_device_operations b44_operations = { .open = b44_open, .close = b44_close, .transmit = b44_transmit, .poll = b44_poll, .irq = b44_irq, }; static struct pci_device_id b44_nics[] = { PCI_ROM(0x14e4, 0x4401, "BCM4401", "BCM4401", 0), PCI_ROM(0x14e4, 0x170c, "BCM4401-B0", "BCM4401-B0", 0), PCI_ROM(0x14e4, 0x4402, "BCM4401-B1", "BCM4401-B1", 0), }; struct pci_driver b44_driver __pci_driver = { .ids = b44_nics, .id_count = sizeof b44_nics / sizeof b44_nics[0], .probe = b44_probe, .remove = b44_remove, };
/** @file Stub file for vxge driver * * This file drags in the rest of the driver for Neterion Inc's X3100 Series * 10GbE PCIe I/O Virtualized Server Adapter, allowing the driver to be built * as "vxge" even though the code is in vxge_* named files. */ FILE_LICENCE(GPL2_OR_LATER); #include <ipxe/pci.h> REQUIRE_OBJECT(vxge_main); /** vxge PCI IDs for util/parserom.pl which are put into bin/NIC */ static struct pci_device_id vxge_nics[] __unused = { /* If you change this, also adjust vxge_main_nics[] in vxge_main.c */ PCI_ROM(0x17d5, 0x5833, "vxge-x3100", "Neterion X3100 Series", 0), };
* @v pci PCI device */ static void skeleton_remove ( struct pci_device *pci ) { struct net_device *netdev = pci_get_drvdata ( pci ); struct skeleton_nic *skel = netdev->priv; /* Unregister network device */ unregister_netdev ( netdev ); /* Reset card */ skeleton_reset ( skel ); /* Free network device */ iounmap ( skel->regs ); netdev_nullify ( netdev ); netdev_put ( netdev ); } /** Skeleton PCI device IDs */ static struct pci_device_id skeleton_nics[] = { PCI_ROM ( 0x5ce1, 0x5ce1, "skel", "Skeleton", 0 ), }; /** Skeleton PCI driver */ struct pci_driver skeleton_driver __pci_driver = { .ids = skeleton_nics, .id_count = ( sizeof ( skeleton_nics ) / sizeof ( skeleton_nics[0] ) ), .probe = skeleton_probe, .remove = skeleton_remove, };
#include <gpxe/pci_io.h> #include "base.h" #include "reg.h" #define ATH5K_CALIB_INTERVAL 10 /* Calibrate PHY every 10 seconds */ #define ATH5K_RETRIES 4 /* Number of times to retry packet sends */ #define ATH5K_DESC_ALIGN 16 /* Alignment for TX/RX descriptors */ /******************\ * Internal defines * \******************/ /* Known PCI ids */ static struct pci_device_id ath5k_nics[] = { PCI_ROM(0x168c, 0x0207, "ath5210e", "Atheros 5210 early", AR5K_AR5210), PCI_ROM(0x168c, 0x0007, "ath5210", "Atheros 5210", AR5K_AR5210), PCI_ROM(0x168c, 0x0011, "ath5311", "Atheros 5311 (AHB)", AR5K_AR5211), PCI_ROM(0x168c, 0x0012, "ath5211", "Atheros 5211", AR5K_AR5211), PCI_ROM(0x168c, 0x0013, "ath5212", "Atheros 5212", AR5K_AR5212), PCI_ROM(0xa727, 0x0013, "ath5212c","3com Ath 5212", AR5K_AR5212), PCI_ROM(0x10b7, 0x0013, "rdag675", "3com 3CRDAG675", AR5K_AR5212), PCI_ROM(0x168c, 0x1014, "ath5212m", "Ath 5212 miniPCI", AR5K_AR5212), PCI_ROM(0x168c, 0x0014, "ath5212x14", "Atheros 5212 x14", AR5K_AR5212), PCI_ROM(0x168c, 0x0015, "ath5212x15", "Atheros 5212 x15", AR5K_AR5212), PCI_ROM(0x168c, 0x0016, "ath5212x16", "Atheros 5212 x16", AR5K_AR5212), PCI_ROM(0x168c, 0x0017, "ath5212x17", "Atheros 5212 x17", AR5K_AR5212), PCI_ROM(0x168c, 0x0018, "ath5212x18", "Atheros 5212 x18", AR5K_AR5212), PCI_ROM(0x168c, 0x0019, "ath5212x19", "Atheros 5212 x19", AR5K_AR5212), PCI_ROM(0x168c, 0x001a, "ath2413", "Atheros 2413 Griffin", AR5K_AR5212), PCI_ROM(0x168c, 0x001b, "ath5413", "Atheros 5413 Eagle", AR5K_AR5212),
struct net_device *netdev = pci_get_drvdata ( pci ); struct rhine_nic *nic = netdev->priv; /* Unregister network device */ unregister_netdev ( netdev ); /* Reset card */ rhine_reset ( nic ); /* Free network device */ netdev_nullify ( netdev ); netdev_put ( netdev ); } /** Rhine PCI device IDs */ static struct pci_device_id rhine_nics[] = { PCI_ROM ( 0x1106, 0x3065, "dlink-530tx", "VIA VT6102", 0 ), PCI_ROM ( 0x1106, 0x3106, "vt6105", "VIA VT6105", 0 ), PCI_ROM ( 0x1106, 0x3043, "dlink-530tx-old", "VIA VT3043", 0 ), PCI_ROM ( 0x1106, 0x3053, "vt6105m", "VIA VT6105M", 0 ), PCI_ROM ( 0x1106, 0x6100, "via-rhine-old", "VIA 86C100A", 0 ) }; /** Rhine PCI driver */ struct pci_driver rhine_driver __pci_driver = { .ids = rhine_nics, .id_count = ( sizeof ( rhine_nics ) / sizeof ( rhine_nics[0] ) ), .probe = rhine_probe, .remove = rhine_remove, };
struct net_device *netdev = pci_get_drvdata ( pci ); struct intel_nic *intel = netdev->priv; /* Unregister network device */ unregister_netdev ( netdev ); /* Reset the NIC */ intelx_reset ( intel ); /* Free network device */ iounmap ( intel->regs ); netdev_nullify ( netdev ); netdev_put ( netdev ); } /** PCI device IDs */ static struct pci_device_id intelx_nics[] = { PCI_ROM ( 0x8086, 0x10fb, "82599", "82599", 0 ), PCI_ROM ( 0x8086, 0x1528, "x540at2", "X540-AT2", 0 ), PCI_ROM ( 0x8086, 0x154d, "x520", "X520", 0 ), PCI_ROM ( 0x8086, 0x1557, "82599", "82599", 0 ), }; /** PCI driver */ struct pci_driver intelx_driver __pci_driver = { .ids = intelx_nics, .id_count = ( sizeof ( intelx_nics ) / sizeof ( intelx_nics[0] ) ), .probe = intelx_probe, .remove = intelx_remove, };
printf ( "Prism2.5 has registers at %#lx\n", pci->membase ); hw->membase = ioremap ( pci->membase, 0x100 ); nic->ioaddr = pci->membase; nic->irqno = 0; return prism2_probe ( nic, hw ); } static void prism2_pci_disable ( struct nic *nic ) { prism2_disable ( nic ); } static struct pci_device_id prism2_pci_nics[] = { PCI_ROM(0x1260, 0x3873, "prism2_pci", "Harris Semiconductor Prism2.5 clone", 0), PCI_ROM(0x1260, 0x3873, "hwp01170", "ActionTec HWP01170", 0), PCI_ROM(0x1260, 0x3873, "dwl520", "DLink DWL-520", 0), }; PCI_DRIVER ( prism2_pci_driver, prism2_pci_nics, PCI_NO_CLASS ); DRIVER ( "Prism2/PCI", nic_driver, pci_driver, prism2_pci_driver, prism2_pci_probe, prism2_pci_disable ); /* * Local variables: * c-basic-offset: 8 * c-indent-level: 8 * tab-width: 8 * End:
hw->mac.perm_addr[i+1] = (u8)(nvm_data >> 8); } /* Flip last bit of mac address if we're on second port */ if (hw->bus.func == E1000_FUNC_1) hw->mac.perm_addr[5] ^= 1; for (i = 0; i < ETH_ADDR_LEN; i++) hw->mac.addr[i] = hw->mac.perm_addr[i]; out: return ret_val; } static struct pci_device_id e1000_82540_nics[] = { PCI_ROM(0x8086, 0x100E, "E1000_DEV_ID_82540EM", "E1000_DEV_ID_82540EM", e1000_82540), PCI_ROM(0x8086, 0x1015, "E1000_DEV_ID_82540EM_LOM", "E1000_DEV_ID_82540EM_LOM", e1000_82540), PCI_ROM(0x8086, 0x1016, "E1000_DEV_ID_82540EP_LOM", "E1000_DEV_ID_82540EP_LOM", e1000_82540), PCI_ROM(0x8086, 0x1017, "E1000_DEV_ID_82540EP", "E1000_DEV_ID_82540EP", e1000_82540), PCI_ROM(0x8086, 0x101E, "E1000_DEV_ID_82540EP_LP", "E1000_DEV_ID_82540EP_LP", e1000_82540), PCI_ROM(0x8086, 0x100F, "E1000_DEV_ID_82545EM_COPPER", "E1000_DEV_ID_82545EM_COPPER", e1000_82545), PCI_ROM(0x8086, 0x1011, "E1000_DEV_ID_82545EM_FIBER", "E1000_DEV_ID_82545EM_FIBER", e1000_82545), PCI_ROM(0x8086, 0x1026, "E1000_DEV_ID_82545GM_COPPER", "E1000_DEV_ID_82545GM_COPPER", e1000_82545_rev_3), PCI_ROM(0x8086, 0x1027, "E1000_DEV_ID_82545GM_FIBER", "E1000_DEV_ID_82545GM_FIBER", e1000_82545_rev_3), PCI_ROM(0x8086, 0x1028, "E1000_DEV_ID_82545GM_SERDES", "E1000_DEV_ID_82545GM_SERDES", e1000_82545_rev_3), PCI_ROM(0x8086, 0x1010, "E1000_DEV_ID_82546EB_COPPER", "E1000_DEV_ID_82546EB_COPPER", e1000_82546), PCI_ROM(0x8086, 0x1012, "E1000_DEV_ID_82546EB_FIBER", "E1000_DEV_ID_82546EB_FIBER", e1000_82546), PCI_ROM(0x8086, 0x101D, "E1000_DEV_ID_82546EB_QUAD_COPPER", "E1000_DEV_ID_82546EB_QUAD_COPPER", e1000_82546), PCI_ROM(0x8086, 0x1079, "E1000_DEV_ID_82546GB_COPPER", "E1000_DEV_ID_82546GB_COPPER", e1000_82546_rev_3), PCI_ROM(0x8086, 0x107A, "E1000_DEV_ID_82546GB_FIBER", "E1000_DEV_ID_82546GB_FIBER", e1000_82546_rev_3), PCI_ROM(0x8086, 0x107B, "E1000_DEV_ID_82546GB_SERDES", "E1000_DEV_ID_82546GB_SERDES", e1000_82546_rev_3),
pci_set_drvdata ( pci, NULL ); return rc; } /** * Remove PCI device * * @v pci PCI device */ static void undipci_remove ( struct pci_device *pci ) { struct undi_device *undi = pci_get_drvdata ( pci ); undinet_remove ( undi ); undi_unload ( undi ); list_del ( &undi->dev.siblings ); free ( undi ); pci_set_drvdata ( pci, NULL ); } static struct pci_device_id undipci_nics[] = { PCI_ROM ( 0xffff, 0xffff, "undipci", "UNDI (PCI)", 0 ), }; struct pci_driver undipci_driver __pci_driver_fallback = { .ids = undipci_nics, .id_count = ( sizeof ( undipci_nics ) / sizeof ( undipci_nics[0] ) ), .class = PCI_CLASS_ID ( PCI_CLASS_NETWORK, PCI_ANY_ID, PCI_ANY_ID ), .probe = undipci_probe, .remove = undipci_remove, };