]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[pci] Make driver PCI ID a property of the PCI device
authorMichael Brown <mcb30@ipxe.org>
Sat, 12 Feb 2011 01:11:57 +0000 (01:11 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 17 Feb 2011 01:25:12 +0000 (01:25 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
45 files changed:
src/arch/i386/drivers/net/undi.c
src/drivers/bus/pci.c
src/drivers/infiniband/arbel.c
src/drivers/infiniband/hermon.c
src/drivers/infiniband/linda.c
src/drivers/infiniband/qib7322.c
src/drivers/net/3c90x.c
src/drivers/net/ath5k/ath5k.c
src/drivers/net/atl1e.c
src/drivers/net/b44.c
src/drivers/net/b44.h
src/drivers/net/dmfe.c
src/drivers/net/e1000/e1000_api.h
src/drivers/net/e1000/e1000_main.c
src/drivers/net/e1000e/e1000e.h
src/drivers/net/e1000e/e1000e_main.c
src/drivers/net/eepro100.c
src/drivers/net/eepro100.h
src/drivers/net/etherfabric.c
src/drivers/net/forcedeth.c
src/drivers/net/igb/igb.h
src/drivers/net/igb/igb_main.c
src/drivers/net/igbvf/igbvf_main.c
src/drivers/net/jme.c
src/drivers/net/mtd80x.c
src/drivers/net/myri10ge.c
src/drivers/net/natsemi.c
src/drivers/net/ns83820.c
src/drivers/net/pcnet32.c
src/drivers/net/phantom/phantom.c
src/drivers/net/pnic.c
src/drivers/net/r8169.c
src/drivers/net/rtl8139.c
src/drivers/net/rtl818x/rtl818x.c
src/drivers/net/sis190.c
src/drivers/net/skge.c
src/drivers/net/sky2.c
src/drivers/net/sundance.c
src/drivers/net/tlan.c
src/drivers/net/tulip.c
src/drivers/net/via-velocity.c
src/drivers/net/virtio-net.c
src/drivers/net/vxge/vxge_main.c
src/include/ipxe/pci.h
src/include/nic.h

index 017843f6aa91cf64912d9bce36678d1d3cbfce47..34fd09562857571faa4edd1cf0d9481b9b91ac8e 100644 (file)
@@ -62,8 +62,7 @@ static struct undi_rom * undipci_find_rom ( struct pci_device *pci ) {
  * @v id               PCI ID
  * @ret rc             Return status code
  */
-static int undipci_probe ( struct pci_device *pci,
-                          const struct pci_device_id *id __unused ) {
+static int undipci_probe ( struct pci_device *pci ) {
        struct undi_device *undi;
        struct undi_rom *undirom;
        int rc;
index a30fcc7233bd734406fd34e740a5fea7d86dfa5b..4d77dfe5670888903cb189d62e7597c456db90d4 100644 (file)
@@ -192,9 +192,9 @@ static int pci_probe ( struct pci_device *pci ) {
                             ( id->device != pci->device ) )
                                continue;
                        pci->driver = driver;
-                       pci->driver_name = id->name;
-                       DBGC ( pci, "...using driver %s\n", pci->driver_name );
-                       if ( ( rc = driver->probe ( pci, id ) ) != 0 ) {
+                       pci->id = id;
+                       DBGC ( pci, "...using driver %s\n", pci->id->name );
+                       if ( ( rc = driver->probe ( pci ) ) != 0 ) {
                                DBGC ( pci, "......probe failed: %s\n",
                                       strerror ( rc ) );
                                continue;
index ba80235a5b1ec3ec5221f7623dd06863a3b09d2b..5331523bc70a8c1f554ea6478d28622a8e3bc4d1 100644 (file)
@@ -2642,8 +2642,7 @@ static int arbel_configure_special_qps ( struct arbel *arbel ) {
  * @v id               PCI ID
  * @ret rc             Return status code
  */
-static int arbel_probe ( struct pci_device *pci,
-                        const struct pci_device_id *id __unused ) {
+static int arbel_probe ( struct pci_device *pci ) {
        struct arbel *arbel;
        struct ib_device *ibdev;
        struct arbelprm_init_hca init_hca;
index a67c678718d998d8b04f2b121d91b8a8750fba1c..011892f2aff6470657e913f55a4321240d454e0e 100644 (file)
@@ -3332,8 +3332,7 @@ static void hermon_reset ( struct hermon *hermon,
  * @v id               PCI ID
  * @ret rc             Return status code
  */
-static int hermon_probe ( struct pci_device *pci,
-                         const struct pci_device_id *id __unused ) {
+static int hermon_probe ( struct pci_device *pci ) {
        struct hermon *hermon;
        struct ib_device *ibdev;
        struct net_device *netdev;
index f3987d6ee74a1c1736b459f582addf93edbe7cbe..6a6a2ec9aebdee63a6454b7772f5b630a9248156 100644 (file)
@@ -2316,8 +2316,7 @@ static int linda_init_ib_serdes ( struct linda *linda ) {
  * @v id               PCI ID
  * @ret rc             Return status code
  */
-static int linda_probe ( struct pci_device *pci,
-                        const struct pci_device_id *id __unused ) {
+static int linda_probe ( struct pci_device *pci ) {
        struct ib_device *ibdev;
        struct linda *linda;
        struct QIB_7220_Revision revision;
index e8c63a1f432f896418339ca7b54d0399ff50d2ea..23ec20a1eb8aeb27d606fc93408ba35d3e847e79 100644 (file)
@@ -2281,8 +2281,7 @@ static void qib7322_reset ( struct qib7322 *qib7322, struct pci_device *pci ) {
  * @v id               PCI ID
  * @ret rc             Return status code
  */
-static int qib7322_probe ( struct pci_device *pci,
-                          const struct pci_device_id *id __unused ) {
+static int qib7322_probe ( struct pci_device *pci ) {
        struct qib7322 *qib7322;
        struct QIB_7322_Revision revision;
        struct ib_device *ibdev;
index f606ac122539c4fe9bbb63fc57282dad9abd6aff..c190057468638beec1d03cbd607f825b84090bff 100644 (file)
@@ -865,8 +865,7 @@ static struct net_device_operations a3c90x_operations = {
  *
  * @ret rc     Returns 0 on success, negative on failure
  */
-static int a3c90x_probe(struct pci_device *pci,
-                       const struct pci_device_id *pci_id __unused)
+static int a3c90x_probe(struct pci_device *pci)
 {
 
        struct net_device *netdev;
index 648118ae54a2488302c35963887fb391747ab005..92c4ffdf410bb49906a45d618080e44a3740fea8 100644 (file)
@@ -157,8 +157,7 @@ static const struct {
 /*
  * Prototypes - PCI stack related functions
  */
-static int             ath5k_probe(struct pci_device *pdev,
-                                   const struct pci_device_id *id);
+static int             ath5k_probe(struct pci_device *pdev);
 static void            ath5k_remove(struct pci_device *pdev);
 
 struct pci_driver ath5k_pci_driver __pci_driver = {
@@ -284,8 +283,7 @@ ath5k_chip_name(enum ath5k_srev_type type, u16 val)
 }
 #endif
 
-static int ath5k_probe(struct pci_device *pdev,
-                      const struct pci_device_id *id)
+static int ath5k_probe(struct pci_device *pdev)
 {
        void *mem;
        struct ath5k_softc *sc;
@@ -371,7 +369,7 @@ static int ath5k_probe(struct pci_device *pdev,
        dev->netdev->dev = (struct device *)pdev;
 
        /* Initialize device */
-       ret = ath5k_hw_attach(sc, id->driver_data, &sc->ah);
+       ret = ath5k_hw_attach(sc, pdev->id->driver_data, &sc->ah);
        if (ret)
                goto err_free_hwinfo;
 
index c436783548062f228d0e30d4a1cc60fdc45e7415..d1ee064c36de185619a4de3c793b01976d1aea5b 100644 (file)
@@ -1123,8 +1123,7 @@ static void atl1e_init_netdev(struct net_device *netdev, struct pci_device *pdev
  * The OS initialization, configuring of the adapter private structure,
  * and a hardware reset occur.
  */
-static int atl1e_probe(struct pci_device *pdev,
-                      const struct pci_device_id *ent __unused)
+static int atl1e_probe(struct pci_device *pdev)
 {
        struct net_device *netdev;
        struct atl1e_adapter *adapter = NULL;
index d34bd8a7305feb3fd04fc3eb0d716abbd2c351a0..66fa8ea3c840a12826984ea7c860b7f281c01075 100644 (file)
@@ -638,7 +638,7 @@ static void b44_set_rx_mode(struct net_device *netdev)
  * @v id       Matching entry in ID table
  * @ret rc     Return status code
  */
-static int b44_probe(struct pci_device *pci, const struct pci_device_id *id)
+static int b44_probe(struct pci_device *pci)
 {
        struct net_device *netdev;
        struct b44_private *bp;
@@ -694,8 +694,9 @@ static int b44_probe(struct pci_device *pci, const struct pci_device_id *id)
 
        b44_chip_reset(bp, B44_CHIP_RESET_FULL);
 
-       DBG("b44 %s (%04x:%04x) regs=%p MAC=%s\n", id->name, id->vendor,
-           id->device, bp->regs, eth_ntoa(netdev->ll_addr));
+       DBG("b44 %s (%04x:%04x) regs=%p MAC=%s\n", pci->id->name,
+           pci->id->vendor, pci->id->device, bp->regs,
+           eth_ntoa(netdev->ll_addr));
 
        return 0;
 }
index b5afcbdd07ccb314701b64826c19d46f9963eedc..2d1f206e0499c945003cd5a8fcac7e1b8619c406 100644 (file)
@@ -453,8 +453,7 @@ static void b44_free_rx_ring ( struct b44_private *bp );
 static void b44_rx_refill ( struct b44_private *bp, u32 pending );
 static void b44_populate_rx_descriptor (struct b44_private *bp, u32 index);
 
-static int b44_probe ( struct pci_device *pci,
-                       const struct pci_device_id *id );
+static int b44_probe ( struct pci_device *pci );
 static void b44_remove ( struct pci_device *pci );
 
 static int b44_open ( struct net_device *netdev );
index 6975ee7efe99d18682251a3aac95f05de025d52f..dd6c1dec215f844a381f3bef9758ed030dd4fd8f 100644 (file)
@@ -458,7 +458,7 @@ static int dmfe_probe ( struct nic *nic, struct pci_device *pci ) {
 
        BASE = pci->ioaddr;
        printf("dmfe.c: Found %s Vendor=0x%hX Device=0x%hX\n",
-              pci->driver_name, pci->vendor, pci->device);
+              pci->id->name, pci->vendor, pci->device);
 
        /* Read Chip revision */
        pci_read_config_dword(pci, PCI_REVISION_ID, &dev_rev);
@@ -489,7 +489,8 @@ static int dmfe_probe ( struct nic *nic, struct pci_device *pci ) {
                nic->node_addr[i] = db->srom[20 + i];
 
        /* Print out some hardware info */
-       DBG ( "%s: %s at ioaddr %4.4lx\n", pci->driver_name, eth_ntoa ( nic->node_addr ), BASE );
+       DBG ( "%s: %s at ioaddr %4.4lx\n",
+             pci->id->name, eth_ntoa ( nic->node_addr ), BASE );
 
        /* Set the card as PCI Bus Master */
        adjust_pci_device(pci);
index 07be1ce075b8df38b2ad77eb17f0f5ecf3b9d081..fc1e533d2c7983d58a659425f89e2d535c919481 100644 (file)
@@ -121,8 +121,7 @@ s32  e1000_mng_write_dhcp_info(struct e1000_hw * hw,
                                     u8 *buffer, u16 length);
 u32  e1000_translate_register_82542(u32 reg) __attribute__((weak));
 
-extern int e1000_probe(struct pci_device *pdev,
-                      const struct pci_device_id *id __unused);
+extern int e1000_probe(struct pci_device *pdev);
 extern void e1000_remove(struct pci_device *pdev);
 
 #endif
index 6361570101c2d0993390db7109e02d7c34607472..2708e63f0d8606b9c0403302d9ae32f5ee80eac6 100644 (file)
@@ -689,8 +689,7 @@ static struct net_device_operations e1000_operations;
  *
  * @ret rc     Return status code
  **/
-int e1000_probe ( struct pci_device *pdev,
-             const struct pci_device_id *id __unused )
+int e1000_probe ( struct pci_device *pdev )
 {
        int i, err;
        struct net_device *netdev;
index 61584138af5fa988aeb17f14abfc8f8f1cfdb8bb..bc8e7b08328c52e7dd6b177b551efd2ae701302b 100644 (file)
@@ -276,8 +276,7 @@ extern void e1000e_init_function_pointers_80003es2lan(struct e1000_hw *hw)
 extern void e1000e_init_function_pointers_ich8lan(struct e1000_hw *hw)
                                                __attribute__((weak));
 
-extern int e1000e_probe(struct pci_device *pdev,
-                      const struct pci_device_id *id __unused);
+extern int e1000e_probe(struct pci_device *pdev);
 
 extern void e1000e_remove(struct pci_device *pdev);
 
index 1b56f20c68d7dcb0946ee18607082ef35ab81247..cfe114bdc74028708363ea146ebce611b1d4389a 100644 (file)
@@ -1005,8 +1005,7 @@ static struct net_device_operations e1000e_operations;
  *
  * @ret rc     Return status code
  **/
-int e1000e_probe ( struct pci_device *pdev,
-             const struct pci_device_id *ent)
+int e1000e_probe ( struct pci_device *pdev )
 {
        int i, err;
        struct net_device *netdev;
@@ -1014,7 +1013,7 @@ int e1000e_probe ( struct pci_device *pdev,
        unsigned long mmio_start, mmio_len;
        unsigned long flash_start, flash_len;
        struct e1000_hw *hw;
-       const struct e1000_info *ei = e1000_info_tbl[ent->driver_data];
+       const struct e1000_info *ei = e1000_info_tbl[pdev->id->driver_data];
 
        DBGP ( "e1000_probe\n" );
 
index f350b5c85ab48c45fa5ab5ba04b398e0c4546af4..50214eccd5d87dd27849399092f5aed447c98dfe 100644 (file)
@@ -167,8 +167,7 @@ static struct net_device_operations ifec_operations = {
  * This function is called very early on, while iPXE is initializing.
  * This is a iPXE PCI Device Driver API function.
  */
-static int ifec_pci_probe ( struct pci_device *pci,
-                            const struct pci_device_id *id __unused )
+static int ifec_pci_probe ( struct pci_device *pci )
 {
        struct net_device *netdev;
        struct ifec_private *priv;
index 1592c631c79445014dfdff01482e3c3b012d2d34..3f72f59ec2665cbbb6e9c545487724476c5b13fc 100644 (file)
@@ -171,7 +171,7 @@ struct ifec_private {
 /**************************** Function prototypes ****************************/
 
 /* PCI device API prototypes */
-static int  ifec_pci_probe  ( struct pci_device*, const struct pci_device_id*);
+static int  ifec_pci_probe  ( struct pci_device *pci );
 static void ifec_pci_remove ( struct pci_device *pci );
 
 /* Network device API prototypes */
index 836b85a9a2b7a79c7143fb1df66376a69b29f678..f7aae14f8559d0fe89b8669bd2c1820f131681de 100644 (file)
@@ -4129,8 +4129,7 @@ efab_remove ( struct pci_device *pci )
 }
 
 static int
-efab_probe ( struct pci_device *pci,
-            const struct pci_device_id *id )
+efab_probe ( struct pci_device *pci )
 {
        struct net_device *netdev;
        struct efab_nic *efab;
@@ -4190,7 +4189,7 @@ efab_probe ( struct pci_device *pci,
                        goto fail5;
        }
 
-       EFAB_LOG ( "Found %s EtherFabric %s %s revision %d\n", id->name,
+       EFAB_LOG ( "Found %s EtherFabric %s %s revision %d\n", pci->id->name,
                   efab->is_asic ? "ASIC" : "FPGA",
                   efab->phy_10g ? "10G" : "1G",
                   efab->pci_revision );
index 26bbdc8d0e48cc34900db4cf28764027114d8511..3df683ef18fbdf5fba860cf99d362458d24d71a8 100644 (file)
@@ -1796,7 +1796,7 @@ err_ioremap:
  * @ret rc     Return status code
  **/
 static int
-forcedeth_probe ( struct pci_device *pdev, const struct pci_device_id *ent )
+forcedeth_probe ( struct pci_device *pdev )
 {
        struct net_device *netdev;
        struct forcedeth_private *priv;
@@ -1806,7 +1806,7 @@ forcedeth_probe ( struct pci_device *pdev, const struct pci_device_id *ent )
        DBGP ( "forcedeth_probe\n" );
 
        DBG ( "Found %s, vendor = %#04x, device = %#04x\n",
-               pdev->driver_name, ent->vendor, ent->device );
+             pdev->id->name, pdev->id->vendor, pdev->id->device );
 
        /* Allocate our private data */
        netdev = alloc_etherdev ( sizeof ( *priv ) );
@@ -1829,7 +1829,7 @@ forcedeth_probe ( struct pci_device *pdev, const struct pci_device_id *ent )
        /* We'll need these set up for the rest of the routines */
        priv->pci_dev = pdev;
        priv->netdev = netdev;
-       priv->driver_data = ent->driver_data;
+       priv->driver_data = pdev->id->driver_data;
 
        adjust_pci_device ( pdev );
 
index f624a11ca30be1070a71bfd021162c95fc404641..c8e8205dfdcfb4cb6e26788ee046e37dfd5dcf1d 100644 (file)
@@ -34,7 +34,7 @@ FILE_LICENCE ( GPL2_ONLY );
 
 #include "igb_api.h"
 
-extern int igb_probe ( struct pci_device *pdev, const struct pci_device_id *ent);
+extern int igb_probe ( struct pci_device *pdev );
 extern void igb_remove ( struct pci_device *pdev );
 
 struct igb_adapter;
index df5cadc50d405f8a5e3d6508f229c5bdd1e7a6db..8d6415282f9a9b088185f5215308e1d75699feee 100644 (file)
@@ -771,8 +771,7 @@ static struct net_device_operations igb_operations;
  *
  * @ret rc     Return status code
  **/
-int igb_probe ( struct pci_device *pdev,
-             const struct pci_device_id *ent __unused)
+int igb_probe ( struct pci_device *pdev )
 {
        int i, err;
        struct net_device *netdev;
index 6414d54c7e86e784c855dae74fdcf9f6ebe2db50..da55805076380fe01a5f4bc45f89b7f6889d856e 100644 (file)
@@ -779,8 +779,7 @@ void igbvf_get_hw_control ( struct igbvf_adapter *adapter )
  * The OS initialization, configuring of the adapter private structure,
  * and a hardware reset occur.
  **/
-int igbvf_probe ( struct pci_device *pdev,
-                 const struct pci_device_id *ent __unused )
+int igbvf_probe ( struct pci_device *pdev )
 {
        int err;
        struct net_device *netdev;
index eaddcb84203ca88fd09e809fa5d60f15760b13f0..545402650fca92f95dd43f1b3214dff399e116a4 100644 (file)
@@ -1175,7 +1175,7 @@ jme_load_macaddr(struct net_device *netdev)
  * @ret rc     Return status code
  */
 static int
-jme_probe(struct pci_device *pci, const struct pci_device_id *id __unused)
+jme_probe(struct pci_device *pci)
 {
        struct net_device *netdev;
        struct jme_adapter *jme;
index 4d17d7ff57c5e7ffedddd68570065feb1a2b8918..170b5c524a6e3880b2f2cd16c33efed73d7333ad 100644 (file)
@@ -617,7 +617,7 @@ static int mtd_probe ( struct nic *nic, struct pci_device *pci ) {
     nic->ioaddr = pci->ioaddr;
     nic->irqno = 0;
 
-    mtdx.nic_name = pci->driver_name;
+    mtdx.nic_name = pci->id->name;
     mtdx.dev_id = pci->device;
     mtdx.ioaddr = nic->ioaddr;
 
index c7b9dfa248b912d658746c0d9e6772baa2e42f47..5bb555d8216fd6345a125cf0f00038a30415d216 100644 (file)
@@ -94,8 +94,7 @@ FILE_LICENCE ( GPL2_ONLY );
 
 /* PCI driver entry points */
 
-static int     myri10ge_pci_probe ( struct pci_device*,
-                                    const struct pci_device_id* );
+static int     myri10ge_pci_probe ( struct pci_device* );
 static void    myri10ge_pci_remove ( struct pci_device* );
 
 /* Network device operations */
@@ -771,8 +770,7 @@ myri10ge_nv_fini ( struct myri10ge_private *priv )
  * This function is called very early on, while iPXE is initializing.
  * This is a iPXE PCI Device Driver API function.
  */
-static int myri10ge_pci_probe ( struct pci_device *pci,
-                               const struct pci_device_id *id __unused )
+static int myri10ge_pci_probe ( struct pci_device *pci )
 {
        static struct net_device_operations myri10ge_operations = {
                .open     = myri10ge_net_open,
index da2f0886f5f5e52517959ab28217acd50c11a9d9..171542818f5f1da26e404f809da290e098a600ed 100644 (file)
@@ -83,7 +83,7 @@ FILE_LICENCE ( GPL_ANY );
 static int natsemi_spi_read_bit ( struct bit_basher *, unsigned int );
 static void natsemi_spi_write_bit ( struct bit_basher *,unsigned int, unsigned long ); 
 static void natsemi_init_eeprom ( struct natsemi_private * ); 
-static int natsemi_probe (struct pci_device *pci, const struct pci_device_id *id);
+static int natsemi_probe (struct pci_device *pci);
 static void natsemi_reset (struct net_device *netdev);
 static int natsemi_open (struct net_device *netdev);
 static int natsemi_transmit (struct net_device *netdev, struct io_buffer *iobuf);
@@ -164,8 +164,7 @@ static void natsemi_init_eeprom ( struct natsemi_private *np ) {
  * @v id       PCI ID
  * @ret rc     Return status code
  */
-static int natsemi_probe (struct pci_device *pci,
-                      const struct pci_device_id *id __unused) {
+static int natsemi_probe (struct pci_device *pci) {
        struct net_device *netdev;
        struct natsemi_private *np = NULL;
        uint8_t ll_addr_encoded[MAX_LL_ADDR_LEN];
index c8dc23f831d16aad9fe78f013f438c235c159daf..5ea5937a3e822d315aa73252c3f3411dfdf867d5 100644 (file)
@@ -824,7 +824,7 @@ static int ns83820_probe ( struct nic *nic, struct pci_device *pci ) {
                return 0;
 
        printf("ns83820.c: Found %s, vendor=0x%hX, device=0x%hX\n",
-              pci->driver_name, pci->vendor, pci->device);
+              pci->id->name, pci->vendor, pci->device);
 
        /* point to private storage */
        ns = &nsx;
@@ -862,12 +862,12 @@ static int ns83820_probe ( struct nic *nic, struct pci_device *pci ) {
        ns->CFG_cache = readl(ns->base + CFG);
 
        if ((ns->CFG_cache & CFG_PCI64_DET)) {
-               printf("%s: detected 64 bit PCI data bus.\n", pci->driver_name);
+               printf("%s: detected 64 bit PCI data bus.\n", pci->id->name);
                /*dev->CFG_cache |= CFG_DATA64_EN; */
                if (!(ns->CFG_cache & CFG_DATA64_EN))
                        printf
                            ("%s: EEPROM did not enable 64 bit bus.  Disabled.\n",
-                            pci->driver_name);
+                            pci->id->name);
        } else
                ns->CFG_cache &= ~(CFG_DATA64_EN);
 
index e957ad9bbf903461a19ab4f7b9b1d14e57c5c78b..d6da3c5e524c19daa195663a5c99ac448efd3118 100644 (file)
@@ -1034,7 +1034,7 @@ static struct net_device_operations pcnet32_operations = {
  * @ret rc     Return status code
  **/
 static int
-pcnet32_probe ( struct pci_device *pdev, const struct pci_device_id *ent )
+pcnet32_probe ( struct pci_device *pdev )
 {
        struct net_device *netdev;
        struct pcnet32_private *priv;
@@ -1044,7 +1044,7 @@ pcnet32_probe ( struct pci_device *pdev, const struct pci_device_id *ent )
        DBGP ( "pcnet32_probe\n" );
 
        DBG ( "Found %s, vendor = %#04x, device = %#04x\n",
-               pdev->driver_name, ent->vendor, ent->device );
+               pdev->id->name, pdev->id->vendor, pdev->id->device );
 
        /* Allocate our private data */
        netdev = alloc_etherdev ( sizeof ( *priv ) );
index 6a3f5f7bfd2c547575397fe02ceed53842a7336d..87ade7e3471d0fb4f1927c3cd78153bcc4265245 100644 (file)
@@ -2038,8 +2038,7 @@ static int phantom_init_rcvpeg ( struct phantom_nic *phantom ) {
  * @v id               PCI ID
  * @ret rc             Return status code
  */
-static int phantom_probe ( struct pci_device *pci,
-                          const struct pci_device_id *id __unused ) {
+static int phantom_probe ( struct pci_device *pci ) {
        struct net_device *netdev;
        struct phantom_nic *phantom;
        struct settings *parent_settings;
index b34b912665e60395da02803e987dfb4915a51d71..4170cc640d6391f37ae96378ca5f4d2e7b208064 100644 (file)
@@ -215,8 +215,7 @@ static void pnic_remove ( struct pci_device *pci ) {
 /**************************************************************************
 PROBE - Look for an adapter, this routine's visible to the outside
 ***************************************************************************/
-static int pnic_probe ( struct pci_device *pci,
-                       const struct pci_device_id *id __unused ) {
+static int pnic_probe ( struct pci_device *pci ) {
        struct net_device *netdev;
        struct pnic *pnic;
        uint16_t api_version;
index 5c5fbab5ebf8dbfccf47ca916f40b6b388a7bc68..13ab65ba504b1d365b5ec77a3efe1ef0b7aaa051 100644 (file)
@@ -2050,18 +2050,19 @@ static struct net_device_operations rtl8169_operations = {
  * @ret rc     Return status code
  **/
 static int
-rtl8169_probe ( struct pci_device *pdev, const struct pci_device_id *ent )
+rtl8169_probe ( struct pci_device *pdev )
 {
        int i, rc;
        struct net_device *netdev;
        struct rtl8169_private *tp;
        void *ioaddr;
 
-       const struct rtl_cfg_info *cfg = rtl_cfg_infos + ent->driver_data;
+       const struct rtl_cfg_info *cfg = rtl_cfg_infos + pdev->id->driver_data;
 
        DBGP ( "rtl8169_probe\n" );
 
-       DBG ( "ent->vendor = %#04x, ent->device = %#04x\n", ent->vendor, ent->device );
+       DBG ( "id->vendor = %#04x, id->device = %#04x\n",
+             pdev->id->vendor, pdev->id->device );
 
        DBG ( "cfg->intr_event = %#04x\n", cfg->intr_event );
 
index 7cc1de2f86d5125c9c04b9cc9fcf00a7f5670ffa..ebe84fb108db7f58c1b0619826acaeba825c786b 100644 (file)
@@ -505,8 +505,7 @@ static struct net_device_operations rtl_operations = {
  * @v id       PCI ID
  * @ret rc     Return status code
  */
-static int rtl_probe ( struct pci_device *pci,
-                      const struct pci_device_id *id __unused ) {
+static int rtl_probe ( struct pci_device *pci ) {
        struct net_device *netdev;
        struct rtl8139_nic *rtl;
        int rc;
index f9a46a2f99fe74077723f95718b1af3fa8b76bb9..cf4c7556f637bcca9d1367230ab632433c7a0434 100644 (file)
@@ -649,8 +649,7 @@ struct net80211_device_operations rtl818x_operations = {
        .config = rtl818x_config,
 };
 
-static int rtl818x_probe(struct pci_device *pdev,
-                        const struct pci_device_id *id __unused)
+static int rtl818x_probe(struct pci_device *pdev )
 {
        struct net80211_device *dev;
        struct rtl818x_priv *priv;
index b0c3303fe517152a531e78cd315175e52a51b8b1..1bf4d92cc0d99a4afa449a893a651d37c735cf84 100644 (file)
@@ -47,8 +47,7 @@ static struct pci_device_id sis190_isa_bridge_tbl[] = {
        PCI_ID (0x1039, 0x0968, "", "", 0),
 };
 
-static int sis190_isa_bridge_probe(struct pci_device *pdev __unused,
-                                  const struct pci_device_id *ent __unused)
+static int sis190_isa_bridge_probe(struct pci_device *pdev __unused)
 {
        return 0;
 }
@@ -1110,8 +1109,7 @@ static struct net_device_operations sis190_netdev_ops = {
        .irq = sis190_irq,
 };
 
-static int sis190_probe(struct pci_device *pdev,
-                          const struct pci_device_id *ent __unused)
+static int sis190_probe(struct pci_device *pdev)
 {
        struct sis190_private *tp;
        struct net_device *dev;
index c9fb6bae3f8f1d61a3f3099c30eeffb73ca1a8bb..fea338414910a34792b35a928a33004617e8af3b 100755 (executable)
@@ -2333,8 +2333,7 @@ static void skge_show_addr(struct net_device *dev)
             dev->name, netdev_addr(dev));
 }
 
-static int skge_probe(struct pci_device *pdev,
-                               const struct pci_device_id *ent __unused)
+static int skge_probe(struct pci_device *pdev)
 {
        struct net_device *dev, *dev1;
        struct skge_hw *hw;
index 059c7f07f2a6b695805d7b3545bbf23be0ef936a..a0a3acd7767bd22e6e1a3dcd5e28acbb79337d08 100644 (file)
@@ -2264,8 +2264,7 @@ static struct net_device_operations sky2_operations = {
        .irq      = sky2_net_irq
 };
 
-static int sky2_probe(struct pci_device *pdev,
-                     const struct pci_device_id *ent __unused)
+static int sky2_probe(struct pci_device *pdev)
 {
        struct net_device *dev;
        struct sky2_hw *hw;
index 2ee6089d687673af9e08480bec21d8b29ee4d590..63a9ea5f1c885fb3968f83cb3a770b3606c0a9b8 100644 (file)
@@ -575,7 +575,7 @@ static int sundance_probe ( struct nic *nic, struct pci_device *pci ) {
        /* BASE is used throughout to address the card */
        BASE = pci->ioaddr;
        printf(" sundance.c: Found %s Vendor=0x%hX Device=0x%hX\n",
-              pci->driver_name, pci->vendor, pci->device);
+              pci->id->name, pci->vendor, pci->device);
 
        /* Get the MAC Address by reading the EEPROM */
        for (i = 0; i < 3; i++) {
@@ -597,7 +597,7 @@ static int sundance_probe ( struct nic *nic, struct pci_device *pci ) {
        /* point to private storage */
        sdc = &sdx;
 
-       sdc->nic_name = pci->driver_name;
+       sdc->nic_name = pci->id->name;
        sdc->mtu = mtu;
 
        pci_read_config_byte(pci, PCI_REVISION_ID, &sdc->pci_rev_id);
@@ -605,7 +605,8 @@ static int sundance_probe ( struct nic *nic, struct pci_device *pci ) {
        DBG ( "Device revision id: %hx\n", sdc->pci_rev_id );
 
        /* Print out some hardware info */
-       DBG ( "%s: %s at ioaddr %hX, ", pci->driver_name, nic->node_addr, (unsigned int) BASE);
+       DBG ( "%s: %s at ioaddr %hX, ",
+             pci->id->name, nic->node_addr, (unsigned int) BASE);
 
        sdc->mii_preamble_required = 0;
        if (1) {
index c775620bcb9961f696e0e6165ef694174859105d..b1a09d187f34b44c218ace7fd6b0dfdb856be0b2 100644 (file)
@@ -810,7 +810,7 @@ static int tlan_probe ( struct nic *nic, struct pci_device *pci ) {
 
        priv->vendor_id = pci->vendor;
        priv->dev_id = pci->device;
-       priv->nic_name = pci->driver_name;
+       priv->nic_name = pci->id->name;
        priv->eoc = 0;
 
        err = 0;
@@ -821,10 +821,10 @@ static int tlan_probe ( struct nic *nic, struct pci_device *pci ) {
                                       (u8 *) & nic->node_addr[i]);
        if (err) {
            printf ( "TLAN: %s: Error reading MAC from eeprom: %d\n",
-                   pci->driver_name, err);
+                   pci->id->name, err);
        } else {
            DBG ( "%s: %s at ioaddr %#lX, ", 
-                 pci->driver_name, eth_ntoa ( nic->node_addr ), pci->ioaddr );
+                 pci->id->name, eth_ntoa ( nic->node_addr ), pci->ioaddr );
        }
 
        priv->tlanRev = TLan_DioRead8(BASE, TLAN_DEF_REVISION);
index bc7a23687124222f3ebdfb0f7ec33a1b0c2432a4..7a23b7e9e244f319c43bb5726a885b1209b502ff 100644 (file)
@@ -1191,7 +1191,7 @@ static int tulip_probe ( struct nic *nic, struct pci_device *pci ) {
 
     tp->vendor_id  = pci->vendor;
     tp->dev_id     = pci->device;
-    tp->nic_name   = pci->driver_name;
+    tp->nic_name   = pci->id->name;
 
     tp->if_port = 0;
     tp->default_port = 0;
index f2326b8d1260ae11a82c96c82746371455296103..549460a5c07c48092410e34d4c30e8bbb53831e6 100644 (file)
@@ -675,7 +675,7 @@ static int velocity_probe( struct nic *nic, struct pci_device *pci)
        struct mac_regs *regs;
 
        printf("via-velocity.c: Found %s Vendor=0x%hX Device=0x%hX\n",
-              pci->driver_name, pci->vendor, pci->device);
+              pci->id->name, pci->vendor, pci->device);
 
        /* point to private storage */
        vptr = &vptx;
@@ -707,10 +707,10 @@ static int velocity_probe( struct nic *nic, struct pci_device *pci)
        for (i = 0; i < 6; i++)
                nic->node_addr[i] = readb(&regs->PAR[i]);
 
-       DBG ( "%s: %s at ioaddr %#hX\n", pci->driver_name, eth_ntoa ( nic->node_addr ),
+       DBG ( "%s: %s at ioaddr %#hX\n", pci->id->name, eth_ntoa ( nic->node_addr ),
              (unsigned int) BASE );
 
-       velocity_get_options(&vptr->options, 0, pci->driver_name);
+       velocity_get_options(&vptr->options, 0, pci->id->name);
 
        /* 
         *      Mask out the options cannot be set to the chip
index 1c5f074c0ad7bf7d58c8ddd1860acf18006fbb2d..54e962d1f838dc5af3e19114d68539c4f5ec2969 100644 (file)
@@ -344,8 +344,7 @@ static struct net_device_operations virtnet_operations = {
  * @v id       PCI ID
  * @ret rc     Return status code
  */
-static int virtnet_probe ( struct pci_device *pci,
-                          const struct pci_device_id *id __unused ) {
+static int virtnet_probe ( struct pci_device *pci ) {
        unsigned long ioaddr = pci->ioaddr;
        struct net_device *netdev;
        struct virtnet_nic *virtnet;
index a856344718c6888e38f90725110a959c36ad47c2..a8812985260841215cc1d51026c32cc6713fcfb5 100644 (file)
@@ -495,7 +495,7 @@ vxge_device_unregister(struct __vxge_hw_device *hldev)
  *
  */
 static int
-vxge_probe(struct pci_device *pdev, const struct pci_device_id *id __unused)
+vxge_probe(struct pci_device *pdev)
 {
        struct __vxge_hw_device  *hldev;
        enum vxge_hw_status status;
index 01df761763c7e5a60225e0f04488ab7d62876ac3..c116f6e09228fdcfb2d9f8694188fa0a480ec05b 100644 (file)
@@ -312,8 +312,8 @@ struct pci_device {
         * field.
         */
        void *priv;
-       /** Driver name */
-       const char *driver_name;
+       /** Driver device ID */
+       struct pci_device_id *id;
 };
 
 /** A PCI driver */
@@ -326,11 +326,9 @@ struct pci_driver {
         * Probe device
         *
         * @v pci       PCI device
-        * @v id        Matching entry in ID table
         * @ret rc      Return status code
         */
-       int ( * probe ) ( struct pci_device *pci,
-                         const struct pci_device_id *id );
+       int ( * probe ) ( struct pci_device *pci );
        /**
         * Remove device
         *
index d5375bd6aba90c98ee08e39d1d7341ea64618c52..9aaede8a7f64aaa3bef5f2bf07c63435f57d864a 100644 (file)
@@ -85,8 +85,7 @@ void legacy_remove ( void *hwdev,
 
 #define PCI_DRIVER(_name,_ids,_class)                                    \
        static inline int                                                 \
-       _name ## _pci_legacy_probe ( struct pci_device *pci,              \
-                                    const struct pci_device_id *id );    \
+       _name ## _pci_legacy_probe ( struct pci_device *pci );            \
        static inline void                                                \
        _name ## _pci_legacy_remove ( struct pci_device *pci );           \
        struct pci_driver _name __pci_driver = {                          \
@@ -211,8 +210,7 @@ static inline void * legacy_isa_get_drvdata ( void *hwdev ) {
                _unsafe_disable ( nic, hwdev );                           \
        }                                                                 \
        static inline int                                                 \
-       _name ## _pci_legacy_probe ( struct pci_device *pci,              \
-                           const struct pci_device_id *id __unused ) {   \
+       _name ## _pci_legacy_probe ( struct pci_device *pci ) {           \
                return legacy_probe ( pci, legacy_pci_set_drvdata,        \
                                      &pci->dev, _name ## _probe,         \
                                      _name ## _disable );                \