summaryrefslogtreecommitdiffstats
path: root/src/drivers/net
diff options
context:
space:
mode:
authorMichael Brown2006-05-16 17:12:06 +0200
committerMichael Brown2006-05-16 17:12:06 +0200
commit15ee09ed10d71969abeea9f578f061e096ef43d0 (patch)
treefe9465a87de8f62287474b1c2dc85516b868fbf5 /src/drivers/net
parentMissed a reference to heap.h. (diff)
downloadipxe-15ee09ed10d71969abeea9f578f061e096ef43d0.tar.gz
ipxe-15ee09ed10d71969abeea9f578f061e096ef43d0.tar.xz
ipxe-15ee09ed10d71969abeea9f578f061e096ef43d0.zip
Restructured PCI subsystem to fit the new device model.
Generic PCI code now handles 64-bit BARs correctly when setting "membase"; drivers should need to call pci_bar_start() only if they want to use BARs other than the first memory or I/O BAR. Split rarely-used PCI functions out into pciextra.c. Core PCI code is now 662 bytes (down from 1308 bytes in Etherboot 5.4). 284 bytes of this saving comes from the pci/pciextra split. Cosmetic changes to lots of drivers (e.g. vendor_id->vendor in order to match the names used in Linux).
Diffstat (limited to 'src/drivers/net')
-rw-r--r--src/drivers/net/3c595.c2
-rw-r--r--src/drivers/net/3c90x.c4
-rw-r--r--src/drivers/net/amd8111e.c2
-rw-r--r--src/drivers/net/davicom.c6
-rw-r--r--src/drivers/net/dmfe.c6
-rw-r--r--src/drivers/net/e1000.c2
-rw-r--r--src/drivers/net/eepro100.c2
-rw-r--r--src/drivers/net/epic100.c2
-rw-r--r--src/drivers/net/etherfabric.c4
-rw-r--r--src/drivers/net/forcedeth.c12
-rw-r--r--src/drivers/net/mtd80x.c4
-rw-r--r--src/drivers/net/natsemi.c6
-rwxr-xr-xsrc/drivers/net/ns83820.c4
-rw-r--r--src/drivers/net/ns8390.c2
-rw-r--r--src/drivers/net/pcnet32.c4
-rw-r--r--src/drivers/net/pnic.c32
-rw-r--r--src/drivers/net/prism2_pci.c2
-rw-r--r--src/drivers/net/prism2_plx.c2
-rw-r--r--src/drivers/net/r8169.c4
-rw-r--r--src/drivers/net/rtl8139.c2
-rw-r--r--src/drivers/net/sis900.c16
-rw-r--r--src/drivers/net/skel.c2
-rw-r--r--src/drivers/net/sundance.c4
-rw-r--r--src/drivers/net/tg3.c10
-rw-r--r--src/drivers/net/tlan.c8
-rw-r--r--src/drivers/net/tulip.c8
-rw-r--r--src/drivers/net/via-rhine.c4
-rw-r--r--src/drivers/net/via-velocity.c4
-rw-r--r--src/drivers/net/w89c840.c12
29 files changed, 81 insertions, 91 deletions
diff --git a/src/drivers/net/3c595.c b/src/drivers/net/3c595.c
index b6f531d15..8db1285e6 100644
--- a/src/drivers/net/3c595.c
+++ b/src/drivers/net/3c595.c
@@ -522,7 +522,7 @@ static struct nic_operations t595_operations = {
};
-static struct pci_id t595_nics[] = {
+static struct pci_device_id t595_nics[] = {
PCI_ROM(0x10b7, 0x5900, "3c590", "3Com590"), /* Vortex 10Mbps */
PCI_ROM(0x10b7, 0x5950, "3c595", "3Com595"), /* Vortex 100baseTx */
PCI_ROM(0x10b7, 0x5951, "3c595-1", "3Com595"), /* Vortex 100baseT4 */
diff --git a/src/drivers/net/3c90x.c b/src/drivers/net/3c90x.c
index 54dcc40d9..0fb79a49f 100644
--- a/src/drivers/net/3c90x.c
+++ b/src/drivers/net/3c90x.c
@@ -719,7 +719,7 @@ static int a3c90x_probe ( struct nic *nic, struct pci_device *pci ) {
nic->ioaddr = pci->ioaddr;
nic->irqno = 0;
- INF_3C90X.is3c556 = (pci->device_id == 0x6055);
+ INF_3C90X.is3c556 = (pci->device == 0x6055);
INF_3C90X.IOAddr = pci->ioaddr & ~3;
INF_3C90X.CurrentWindow = 255;
switch (a3c90x_internal_ReadEeprom(INF_3C90X.IOAddr, 0x03))
@@ -984,7 +984,7 @@ static struct nic_operations a3c90x_operations = {
};
-static struct pci_id a3c90x_nics[] = {
+static struct pci_device_id a3c90x_nics[] = {
/* Original 90x revisions: */
PCI_ROM(0x10b7, 0x6055, "3c556", "3C556"), /* Huricane */
PCI_ROM(0x10b7, 0x9000, "3c905-tpo", "3Com900-TPO"), /* 10 Base TPO */
diff --git a/src/drivers/net/amd8111e.c b/src/drivers/net/amd8111e.c
index e3b93dc5b..7702a350c 100644
--- a/src/drivers/net/amd8111e.c
+++ b/src/drivers/net/amd8111e.c
@@ -671,7 +671,7 @@ static int amd8111e_probe(struct nic *nic, struct pci_device *pdev)
return 1;
}
-static struct pci_id amd8111e_nics[] = {
+static struct pci_device_id amd8111e_nics[] = {
PCI_ROM(0x1022, 0x7462, "amd8111e", "AMD8111E"),
};
diff --git a/src/drivers/net/davicom.c b/src/drivers/net/davicom.c
index 0f1a78cc0..0931d13f6 100644
--- a/src/drivers/net/davicom.c
+++ b/src/drivers/net/davicom.c
@@ -662,8 +662,8 @@ static int davicom_probe ( struct nic *nic, struct pci_device *pci ) {
if (pci->ioaddr == 0)
return 0;
- vendor = pci->vendor_id;
- dev_id = pci->device_id;
+ vendor = pci->vendor;
+ dev_id = pci->device;
ioaddr = pci->ioaddr;
pci_fill_nic ( nic, pci );
@@ -703,7 +703,7 @@ static struct nic_operations davicom_operations = {
};
-static struct pci_id davicom_nics[] = {
+static struct pci_device_id davicom_nics[] = {
PCI_ROM(0x1282, 0x9100, "davicom9100", "Davicom 9100"),
PCI_ROM(0x1282, 0x9102, "davicom9102", "Davicom 9102"),
PCI_ROM(0x1282, 0x9009, "davicom9009", "Davicom 9009"),
diff --git a/src/drivers/net/dmfe.c b/src/drivers/net/dmfe.c
index 4cfb69bd6..4c8227249 100644
--- a/src/drivers/net/dmfe.c
+++ b/src/drivers/net/dmfe.c
@@ -457,7 +457,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->name, pci->vendor_id, pci->device_id);
+ pci->name, pci->vendor, pci->device);
/* Read Chip revision */
pci_read_config_dword(pci, PCI_REVISION_ID, &dev_rev);
@@ -466,7 +466,7 @@ static int dmfe_probe ( struct nic *nic, struct pci_device *pci ) {
/* point to private storage */
db = &dfx;
- db->chip_id = ((u32) pci->device_id << 16) | pci->vendor_id;
+ db->chip_id = ((u32) pci->device << 16) | pci->vendor;
BASE = pci_bar_start(pci, PCI_BASE_ADDRESS_0);
db->chip_revision = dev_rev;
@@ -1205,7 +1205,7 @@ static struct nic_operations dmfe_operations = {
};
-static struct pci_id dmfe_nics[] = {
+static struct pci_device_id dmfe_nics[] = {
PCI_ROM(0x1282, 0x9100, "dmfe9100", "Davicom 9100"),
PCI_ROM(0x1282, 0x9102, "dmfe9102", "Davicom 9102"),
PCI_ROM(0x1282, 0x9009, "dmfe9009", "Davicom 9009"),
diff --git a/src/drivers/net/e1000.c b/src/drivers/net/e1000.c
index a13a7271d..b9f9d8f94 100644
--- a/src/drivers/net/e1000.c
+++ b/src/drivers/net/e1000.c
@@ -3707,7 +3707,7 @@ static struct nic_operations e1000_operations = {
};
-static struct pci_id e1000_nics[] = {
+static struct pci_device_id e1000_nics[] = {
PCI_ROM(0x8086, 0x1000, "e1000-82542", "Intel EtherExpressPro1000"),
PCI_ROM(0x8086, 0x1001, "e1000-82543gc-fiber", "Intel EtherExpressPro1000 82543GC Fiber"),
PCI_ROM(0x8086, 0x1004, "e1000-82543gc-copper", "Intel EtherExpressPro1000 82543GC Copper"),
diff --git a/src/drivers/net/eepro100.c b/src/drivers/net/eepro100.c
index 27576a615..c1ff2e765 100644
--- a/src/drivers/net/eepro100.c
+++ b/src/drivers/net/eepro100.c
@@ -791,7 +791,7 @@ static struct nic_operations eepro100_operations = {
};
-static struct pci_id eepro100_nics[] = {
+static struct pci_device_id eepro100_nics[] = {
PCI_ROM(0x8086, 0x1029, "id1029", "Intel EtherExpressPro100 ID1029"),
PCI_ROM(0x8086, 0x1030, "id1030", "Intel EtherExpressPro100 ID1030"),
PCI_ROM(0x8086, 0x1031, "82801cam", "Intel 82801CAM (ICH3) Chipset Ethernet Controller"),
diff --git a/src/drivers/net/epic100.c b/src/drivers/net/epic100.c
index babcf6b32..32f2dff41 100644
--- a/src/drivers/net/epic100.c
+++ b/src/drivers/net/epic100.c
@@ -517,7 +517,7 @@ static struct nic_operations epic100_operations = {
};
-static struct pci_id epic100_nics[] = {
+static struct pci_device_id epic100_nics[] = {
PCI_ROM(0x10b8, 0x0005, "epic100", "SMC EtherPowerII"), /* SMC 83c170 EPIC/100 */
PCI_ROM(0x10b8, 0x0006, "smc-83c175", "SMC EPIC/C 83c175"),
};
diff --git a/src/drivers/net/etherfabric.c b/src/drivers/net/etherfabric.c
index 05239d688..307070f0a 100644
--- a/src/drivers/net/etherfabric.c
+++ b/src/drivers/net/etherfabric.c
@@ -2975,7 +2975,7 @@ static int etherfabric_probe ( struct dev *dev, struct pci_device *pci ) {
memset ( &efab_buffers, 0, sizeof ( efab_buffers ) );
/* Hook in appropriate operations table. Do this early. */
- if ( pci->device_id == EF1002_DEVID ) {
+ if ( pci->device == EF1002_DEVID ) {
efab.op = &ef1002_operations;
} else {
efab.op = &falcon_operations;
@@ -3021,7 +3021,7 @@ static int etherfabric_probe ( struct dev *dev, struct pci_device *pci ) {
return 1;
}
-static struct pci_id etherfabric_nics[] = {
+static struct pci_device_id etherfabric_nics[] = {
PCI_ROM(0x1924, 0xC101, "ef1002", "EtherFabric EF1002"),
PCI_ROM(0x1924, 0x0703, "falcon", "EtherFabric Falcon"),
};
diff --git a/src/drivers/net/forcedeth.c b/src/drivers/net/forcedeth.c
index 08ddbcd9b..a60749c7c 100644
--- a/src/drivers/net/forcedeth.c
+++ b/src/drivers/net/forcedeth.c
@@ -1245,7 +1245,7 @@ static int forcedeth_probe ( struct nic *nic, struct pci_device *pci ) {
return 0;
printf("forcedeth.c: Found %s, vendor=0x%hX, device=0x%hX\n",
- pci->name, pci->vendor_id, pci->device_id);
+ pci->name, pci->vendor, pci->device);
pci_fill_nic ( nic, pci );
@@ -1263,9 +1263,9 @@ static int forcedeth_probe ( struct nic *nic, struct pci_device *pci ) {
return 0;
/* handle different descriptor versions */
- if (pci->device_id == PCI_DEVICE_ID_NVIDIA_NVENET_1 ||
- pci->device_id == PCI_DEVICE_ID_NVIDIA_NVENET_2 ||
- pci->device_id == PCI_DEVICE_ID_NVIDIA_NVENET_3)
+ if (pci->device == PCI_DEVICE_ID_NVIDIA_NVENET_1 ||
+ pci->device == PCI_DEVICE_ID_NVIDIA_NVENET_2 ||
+ pci->device == PCI_DEVICE_ID_NVIDIA_NVENET_3)
np->desc_ver = DESC_VER_1;
else
np->desc_ver = DESC_VER_2;
@@ -1316,7 +1316,7 @@ static int forcedeth_probe ( struct nic *nic, struct pci_device *pci ) {
np->tx_flags = NV_TX2_LASTPACKET | NV_TX2_VALID;
}
- switch (pci->device_id) {
+ switch (pci->device) {
case 0x01C3: // nforce
// DEV_IRQMASK_1|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
np->irqmask = NVREG_IRQMASK_WANTED_2 | NVREG_IRQ_TIMER;
@@ -1406,7 +1406,7 @@ static int forcedeth_probe ( struct nic *nic, struct pci_device *pci ) {
return 1;
}
-static struct pci_id forcedeth_nics[] = {
+static struct pci_device_id forcedeth_nics[] = {
PCI_ROM(0x10de, 0x01C3, "nforce", "nForce NVENET_1 Ethernet Controller"),
PCI_ROM(0x10de, 0x0066, "nforce2", "nForce NVENET_2 Ethernet Controller"),
PCI_ROM(0x10de, 0x00D6, "nforce3", "nForce NVENET_3 Ethernet Controller"),
diff --git a/src/drivers/net/mtd80x.c b/src/drivers/net/mtd80x.c
index 21db5640e..925da9bf0 100644
--- a/src/drivers/net/mtd80x.c
+++ b/src/drivers/net/mtd80x.c
@@ -653,7 +653,7 @@ static struct nic_operations mtd_operations = {
};
-static struct pci_id mtd80x_nics[] = {
+static struct pci_device_id mtd80x_nics[] = {
PCI_ROM(0x1516, 0x0800, "MTD800", "Myson MTD800"),
PCI_ROM(0x1516, 0x0803, "MTD803", "Surecom EP-320X"),
PCI_ROM(0x1516, 0x0891, "MTD891", "Myson MTD891"),
@@ -676,7 +676,7 @@ static int mtd_probe ( struct nic *nic, struct pci_device *pci ) {
adjust_pci_device(pci);
mtdx.nic_name = pci->name;
- mtdx.dev_id = pci->device_id;
+ mtdx.dev_id = pci->device;
mtdx.ioaddr = nic->ioaddr;
/* read ethernet id */
diff --git a/src/drivers/net/natsemi.c b/src/drivers/net/natsemi.c
index 951195f1b..c34d611f3 100644
--- a/src/drivers/net/natsemi.c
+++ b/src/drivers/net/natsemi.c
@@ -259,8 +259,8 @@ natsemi_probe ( struct nic *nic, struct pci_device *pci ) {
nic->ioaddr = pci->ioaddr;
ioaddr = pci->ioaddr;
- vendor = pci->vendor_id;
- dev_id = pci->device_id;
+ vendor = pci->vendor;
+ dev_id = pci->device;
nic_name = pci->name;
/* natsemi has a non-standard PM control register
@@ -770,7 +770,7 @@ static struct nic_operations natsemi_operations = {
};
-static struct pci_id natsemi_nics[] = {
+static struct pci_device_id natsemi_nics[] = {
PCI_ROM(0x100b, 0x0020, "dp83815", "DP83815"),
};
diff --git a/src/drivers/net/ns83820.c b/src/drivers/net/ns83820.c
index 30bf0c1c6..2f26b71bd 100755
--- a/src/drivers/net/ns83820.c
+++ b/src/drivers/net/ns83820.c
@@ -800,7 +800,7 @@ static struct nic_operations ns83820_operations = {
};
-static struct pci_id ns83820_nics[] = {
+static struct pci_device_id ns83820_nics[] = {
PCI_ROM(0x100b, 0x0022, "ns83820", "National Semiconductor 83820"),
};
@@ -822,7 +822,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->name, pci->vendor_id, pci->device_id);
+ pci->name, pci->vendor, pci->device);
/* point to private storage */
ns = &nsx;
diff --git a/src/drivers/net/ns8390.c b/src/drivers/net/ns8390.c
index 9c0912168..af99d1399 100644
--- a/src/drivers/net/ns8390.c
+++ b/src/drivers/net/ns8390.c
@@ -991,7 +991,7 @@ ISA_ROM("ne","NE1000/2000 and clones");
#endif
#ifdef INCLUDE_NS8390
-static struct pci_id nepci_nics[] = {
+static struct pci_device_id nepci_nics[] = {
/* A few NE2000 PCI clones, list not exhaustive */
PCI_ROM(0x10ec, 0x8029, "rtl8029", "Realtek 8029"),
PCI_ROM(0x1186, 0x0300, "dlink-528", "D-Link DE-528"),
diff --git a/src/drivers/net/pcnet32.c b/src/drivers/net/pcnet32.c
index 74fea5a98..51efe39e3 100644
--- a/src/drivers/net/pcnet32.c
+++ b/src/drivers/net/pcnet32.c
@@ -680,7 +680,7 @@ static int pcnet32_probe ( struct nic *nic, struct pci_device *pci ) {
/* BASE is used throughout to address the card */
ioaddr = pci->ioaddr;
printf("pcnet32.c: Found %s, Vendor=0x%hX Device=0x%hX\n",
- pci->name, pci->vendor_id, pci->device_id);
+ pci->name, pci->vendor, pci->device);
nic->irqno = 0;
pci_fill_nic ( nic, pci );
@@ -1000,7 +1000,7 @@ static struct nic_operations pcnet32_operations = {
};
-static struct pci_id pcnet32_nics[] = {
+static struct pci_device_id pcnet32_nics[] = {
PCI_ROM(0x1022, 0x2000, "pcnet32", "AMD PCnet/PCI"),
PCI_ROM(0x1022, 0x2625, "pcnetfastiii", "AMD PCNet FAST III"),
PCI_ROM(0x1022, 0x2001, "amdhomepna", "AMD PCnet/HomePNA"),
diff --git a/src/drivers/net/pnic.c b/src/drivers/net/pnic.c
index d4b19778a..18f7b93b8 100644
--- a/src/drivers/net/pnic.c
+++ b/src/drivers/net/pnic.c
@@ -199,13 +199,17 @@ 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 ) {
+static int pnic_probe ( struct pci_device *pci,
+ const struct pci_device_id *id __unused ) {
struct net_device *netdev;
struct pnic *pnic;
uint16_t api_version;
uint16_t status;
int rc;
+ /* Fix up PCI device */
+ adjust_pci_device ( pci );
+
/* Allocate net device */
netdev = alloc_etherdev ( sizeof ( *pnic ) );
if ( ! netdev ) {
@@ -248,32 +252,14 @@ static int pnic_probe ( struct pci_device *pci ) {
return rc;
}
-static struct pci_id pnic_nics[] = {
+static struct pci_device_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 = {
+struct pci_driver pnic_driver __pci_driver = {
.ids = pnic_nics,
.id_count = ( sizeof ( pnic_nics ) / sizeof ( pnic_nics[0] ) ),
- .class = PCI_NO_CLASS,
- // .probe = pnic_probe,
- // .remove = pnic_remove,
+ .probe = pnic_probe,
+ .remove = pnic_remove,
};
-
-// PCI_DRIVER ( pnic_driver );
-
-
-static int pnic_hack_probe ( void *dummy, struct pci_device *pci ) {
- return ( pnic_probe ( pci ) == 0 );
-}
-
-static void pnic_hack_disable ( void *dummy, struct pci_device *pci ) {
- pnic_remove ( pci );
-}
-
-#include "dev.h"
-extern struct type_driver test_driver;
-
-DRIVER ( "PNIC", test_driver, pci_driver, pnic_driver,
- pnic_hack_probe, pnic_hack_disable );
diff --git a/src/drivers/net/prism2_pci.c b/src/drivers/net/prism2_pci.c
index f0dd9f124..90295cde9 100644
--- a/src/drivers/net/prism2_pci.c
+++ b/src/drivers/net/prism2_pci.c
@@ -39,7 +39,7 @@ static void prism2_pci_disable ( struct nic *nic,
prism2_disable ( nic );
}
-static struct pci_id prism2_pci_nics[] = {
+static struct pci_device_id prism2_pci_nics[] = {
PCI_ROM(0x1260, 0x3873, "prism2_pci", "Harris Semiconductor Prism2.5 clone"),
PCI_ROM(0x1260, 0x3873, "hwp01170", "ActionTec HWP01170"),
PCI_ROM(0x1260, 0x3873, "dwl520", "DLink DWL-520"),
diff --git a/src/drivers/net/prism2_plx.c b/src/drivers/net/prism2_plx.c
index 64432c876..616903cfc 100644
--- a/src/drivers/net/prism2_plx.c
+++ b/src/drivers/net/prism2_plx.c
@@ -95,7 +95,7 @@ static void prism2_plx_disable ( struct nic *nic,
prism2_disable ( nic );
}
-static struct pci_id prism2_plx_nics[] = {
+static struct pci_device_id prism2_plx_nics[] = {
PCI_ROM(0x1385, 0x4100, "ma301", "Netgear MA301"),
PCI_ROM(0x10b7, 0x7770, "3c-airconnect", "3Com AirConnect"),
PCI_ROM(0x111a, 0x1023, "ss1023", "Siemens SpeedStream SS1023"),
diff --git a/src/drivers/net/r8169.c b/src/drivers/net/r8169.c
index c11b8271c..0efcb35da 100644
--- a/src/drivers/net/r8169.c
+++ b/src/drivers/net/r8169.c
@@ -868,7 +868,7 @@ static struct nic_operations r8169_operations = {
};
-static struct pci_id r8169_nics[] = {
+static struct pci_device_id r8169_nics[] = {
PCI_ROM(0x10ec, 0x8169, "r8169", "RealTek RTL8169 Gigabit Ethernet"),
PCI_ROM(0x16ec, 0x0116, "usr-r8169", "US Robotics RTL8169 Gigabit Ethernet"),
PCI_ROM(0x1186, 0x4300, "dlink-r8169", "D-Link RTL8169 Gigabit Ethernet"),
@@ -890,7 +890,7 @@ static int r8169_probe ( struct nic *nic, struct pci_device *pci ) {
int option = -1, Cap10_100 = 0, Cap1000 = 0;
printf("r8169.c: Found %s, Vendor=%hX Device=%hX\n",
- pci->name, pci->vendor_id, pci->device_id);
+ pci->name, pci->vendor, pci->device);
board_idx++;
diff --git a/src/drivers/net/rtl8139.c b/src/drivers/net/rtl8139.c
index 9a155048c..c4baa13f9 100644
--- a/src/drivers/net/rtl8139.c
+++ b/src/drivers/net/rtl8139.c
@@ -528,7 +528,7 @@ static struct nic_operations rtl_operations = {
};
-static struct pci_id rtl8139_nics[] = {
+static struct pci_device_id rtl8139_nics[] = {
PCI_ROM(0x10ec, 0x8129, "rtl8129", "Realtek 8129"),
PCI_ROM(0x10ec, 0x8139, "rtl8139", "Realtek 8139"),
PCI_ROM(0x10ec, 0x8138, "rtl8139b", "Realtek 8139B"),
diff --git a/src/drivers/net/sis900.c b/src/drivers/net/sis900.c
index 1a79b1d4f..c6b53d819 100644
--- a/src/drivers/net/sis900.c
+++ b/src/drivers/net/sis900.c
@@ -121,18 +121,20 @@ static struct mii_phy {
// PCI to ISA bridge for SIS640E access
-static struct pci_id pci_isa_bridge_list[] = {
- { 0x1039, 0x0008,
- "SIS 85C503/5513 PCI to ISA bridge"},
+static struct pci_device_id pci_isa_bridge_list[] = {
+ { .vendor = 0x1039, .device = 0x0008,
+ .name = "SIS 85C503/5513 PCI to ISA bridge"},
};
PCI_DRIVER ( sis_bridge_pci_driver, pci_isa_bridge_list, PCI_NO_CLASS );
+#if 0
static struct device_driver sis_bridge_driver = {
.name = "SIS ISA bridge",
.bus_driver = &pci_driver,
.bus_driver_info = ( struct bus_driver_info * ) &sis_bridge_pci_driver,
};
+#endif
/* Function Prototypes */
@@ -254,10 +256,12 @@ static int sis630e_get_mac_addr(struct pci_device * pci_dev __unused, struct nic
struct pci_device isa_bridge;
} u;
+#if 0
/* find PCI to ISA bridge */
memset(&bus_loc, 0, sizeof(bus_loc));
if ( ! find_by_driver ( &bus_loc, &u.bus_dev, &sis_bridge_driver, 0 ) )
return 0;
+#endif
pci_read_config_byte(&u.isa_bridge, 0x48, &reg);
pci_write_config_byte(&u.isa_bridge, 0x48, reg | 0x40);
@@ -337,8 +341,8 @@ static int sis900_probe ( struct nic *nic, struct pci_device *pci ) {
pci_fill_nic ( nic, pci );
nic->ioaddr = pci->ioaddr;
ioaddr = pci->ioaddr;
- vendor = pci->vendor_id;
- dev_id = pci->device_id;
+ vendor = pci->vendor;
+ dev_id = pci->device;
/* wakeup chip */
pci_write_config_dword(pci, 0x40, 0x00000000);
@@ -1266,7 +1270,7 @@ static struct nic_operations sis900_operations = {
.irq = sis900_irq,
};
-static struct pci_id sis900_nics[] = {
+static struct pci_device_id sis900_nics[] = {
PCI_ROM(0x1039, 0x0900, "sis900", "SIS900"),
PCI_ROM(0x1039, 0x7016, "sis7016", "SIS7016"),
};
diff --git a/src/drivers/net/skel.c b/src/drivers/net/skel.c
index e05239b63..882a38e59 100644
--- a/src/drivers/net/skel.c
+++ b/src/drivers/net/skel.c
@@ -218,7 +218,7 @@ static void skel_pci_disable ( struct nic *nic __unused,
*/
}
-static struct pci_id skel_pci_nics[] = {
+static struct pci_device_id skel_pci_nics[] = {
PCI_ROM ( 0x0000, 0x0000, "skel-pci", "Skeleton PCI Adapter" ),
};
diff --git a/src/drivers/net/sundance.c b/src/drivers/net/sundance.c
index 9c660b9bf..d3cb75066 100644
--- a/src/drivers/net/sundance.c
+++ b/src/drivers/net/sundance.c
@@ -590,7 +590,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->name, pci->vendor_id, pci->device_id);
+ pci->name, pci->vendor, pci->device);
/* Get the MAC Address by reading the EEPROM */
for (i = 0; i < 3; i++) {
@@ -873,7 +873,7 @@ static void set_rx_mode(struct nic *nic __unused)
return;
}
-static struct pci_id sundance_nics[] = {
+static struct pci_device_id sundance_nics[] = {
PCI_ROM(0x13f0, 0x0201, "sundance", "ST201 Sundance 'Alta' based Adaptor"),
PCI_ROM(0x1186, 0x1002, "dfe530txs", "D-Link DFE530TXS (Sundance ST201 Alta)"),
};
diff --git a/src/drivers/net/tg3.c b/src/drivers/net/tg3.c
index cad3bdffc..6aad8718f 100644
--- a/src/drivers/net/tg3.c
+++ b/src/drivers/net/tg3.c
@@ -2852,9 +2852,9 @@ static int tg3_get_invariants(struct tg3 *tp)
if (((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) &&
((grc_misc_cfg == 0x8000) || (grc_misc_cfg == 0x4000))) ||
((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) &&
- (tp->pdev->vendor_id == PCI_VENDOR_ID_BROADCOM) &&
- ((tp->pdev->device_id == PCI_DEVICE_ID_TIGON3_5901) ||
- (tp->pdev->device_id == PCI_DEVICE_ID_TIGON3_5901_2)))) {
+ (tp->pdev->vendor == PCI_VENDOR_ID_BROADCOM) &&
+ ((tp->pdev->device == PCI_DEVICE_ID_TIGON3_5901) ||
+ (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5901_2)))) {
tp->tg3_flags |= TG3_FLAG_10_100_ONLY;
}
@@ -2886,7 +2886,7 @@ static int tg3_get_device_address(struct tg3 *tp)
struct nic *nic = tp->nic;
uint32_t hi, lo, mac_offset;
- if (PCI_FUNC(tp->pdev->busdevfn) == 0)
+ if (PCI_FUNC(tp->pdev->devfn) == 0)
mac_offset = 0x7c;
else
mac_offset = 0xcc;
@@ -3362,7 +3362,7 @@ static int tg3_probe ( struct nic *nic, struct pci_device *pdev ) {
}
-static struct pci_id tg3_nics[] = {
+static struct pci_device_id tg3_nics[] = {
PCI_ROM(0x14e4, 0x1644, "tg3-5700", "Broadcom Tigon 3 5700"),
PCI_ROM(0x14e4, 0x1645, "tg3-5701", "Broadcom Tigon 3 5701"),
PCI_ROM(0x14e4, 0x1646, "tg3-5702", "Broadcom Tigon 3 5702"),
diff --git a/src/drivers/net/tlan.c b/src/drivers/net/tlan.c
index 25d66d826..bebc07a9d 100644
--- a/src/drivers/net/tlan.c
+++ b/src/drivers/net/tlan.c
@@ -811,7 +811,7 @@ static int tlan_probe ( struct nic *nic, struct pci_device *pci ) {
i = 0;
chip_idx = -1;
while (tlan_pci_tbl[i].name) {
- if ((((u32) pci->device_id << 16) | pci->vendor_id) ==
+ if ((((u32) pci->device << 16) | pci->vendor) ==
(tlan_pci_tbl[i].id.pci & 0xffffffff)) {
chip_idx = i;
break;
@@ -819,8 +819,8 @@ static int tlan_probe ( struct nic *nic, struct pci_device *pci ) {
i++;
}
- priv->vendor_id = pci->vendor_id;
- priv->dev_id = pci->device_id;
+ priv->vendor_id = pci->vendor;
+ priv->dev_id = pci->device;
priv->nic_name = pci->name;
priv->eoc = 0;
@@ -1704,7 +1704,7 @@ void TLan_PhyMonitor(struct net_device *dev)
#endif /* MONITOR */
-static struct pci_id tlan_nics[] = {
+static struct pci_device_id tlan_nics[] = {
PCI_ROM(0x0e11, 0xae34, "netel10", "Compaq Netelligent 10 T PCI UTP"),
PCI_ROM(0x0e11, 0xae32, "netel100","Compaq Netelligent 10/100 TX PCI UTP"),
PCI_ROM(0x0e11, 0xae35, "netflex3i", "Compaq Integrated NetFlex-3/P"),
diff --git a/src/drivers/net/tulip.c b/src/drivers/net/tulip.c
index 7ac02d7b2..cebc74cf6 100644
--- a/src/drivers/net/tulip.c
+++ b/src/drivers/net/tulip.c
@@ -1249,8 +1249,8 @@ static int tulip_probe ( struct nic *nic, struct pci_device *pci ) {
/* point to private storage */
tp = &tulip_bss.tpx;
- tp->vendor_id = pci->vendor_id;
- tp->dev_id = pci->device_id;
+ tp->vendor_id = pci->vendor;
+ tp->dev_id = pci->device;
tp->nic_name = pci->name;
tp->if_port = 0;
@@ -1275,7 +1275,7 @@ static int tulip_probe ( struct nic *nic, struct pci_device *pci ) {
#ifdef TULIP_DEBUG
if (tulip_debug > 1)
printf ("%s: Looking for Tulip Chip: Vendor=%hX Device=%hX\n", tp->nic_name,
- tp->vendor_id, tp->dev_id);
+ tp->vendor, tp->dev_id);
#endif
/* Figure out which chip we're dealing with */
@@ -2042,7 +2042,7 @@ static int tulip_check_duplex(struct nic *nic)
return 0;
}
-static struct pci_id tulip_nics[] = {
+static struct pci_device_id tulip_nics[] = {
PCI_ROM(0x1011, 0x0002, "dc21040", "Digital Tulip"),
PCI_ROM(0x1011, 0x0009, "ds21140", "Digital Tulip Fast"),
PCI_ROM(0x1011, 0x0014, "dc21041", "Digital Tulip+"),
diff --git a/src/drivers/net/via-rhine.c b/src/drivers/net/via-rhine.c
index e95d9323e..ca3212ad3 100644
--- a/src/drivers/net/via-rhine.c
+++ b/src/drivers/net/via-rhine.c
@@ -966,7 +966,7 @@ rhine_probe ( struct nic *nic, struct pci_device *pci ) {
if (!pci->ioaddr)
return 0;
- rhine_probe1 (nic, pci, pci->ioaddr, pci->device_id, -1);
+ rhine_probe1 (nic, pci, pci->ioaddr, pci->device, -1);
adjust_pci_device ( pci );
rhine_reset (nic);
@@ -1412,7 +1412,7 @@ static struct nic_operations rhine_operations = {
};
-static struct pci_id rhine_nics[] = {
+static struct pci_device_id rhine_nics[] = {
PCI_ROM(0x1106, 0x3065, "dlink-530tx", "VIA 6102"),
PCI_ROM(0x1106, 0x3106, "via-rhine-6105", "VIA 6105"),
PCI_ROM(0x1106, 0x3043, "dlink-530tx-old", "VIA 3043"), /* Rhine-I 86c100a */
diff --git a/src/drivers/net/via-velocity.c b/src/drivers/net/via-velocity.c
index c6a15e264..9bb471a24 100644
--- a/src/drivers/net/via-velocity.c
+++ b/src/drivers/net/via-velocity.c
@@ -676,7 +676,7 @@ static int velocity_probe(struct dev *dev, struct pci_device *pci)
struct mac_regs *regs;
printf("via-velocity.c: Found %s Vendor=0x%hX Device=0x%hX\n",
- pci->name, pci->vendor_id, pci->device_id);
+ pci->name, pci->vendor, pci->device);
/* point to private storage */
vptr = &vptx;
@@ -1930,7 +1930,7 @@ int pci_set_power_state(struct pci_device *dev, int state)
return 0;
}
-static struct pci_id velocity_nics[] = {
+static struct pci_device_id velocity_nics[] = {
PCI_ROM(0x1106, 0x3119, "via-velocity", "VIA Networking Velocity Family Gigabit Ethernet Adapter"),
};
diff --git a/src/drivers/net/w89c840.c b/src/drivers/net/w89c840.c
index 8d8a6ded7..97d8d1587 100644
--- a/src/drivers/net/w89c840.c
+++ b/src/drivers/net/w89c840.c
@@ -609,7 +609,7 @@ static struct nic_operations w89c840_operations = {
};
-static struct pci_id w89c840_nics[] = {
+static struct pci_device_id w89c840_nics[] = {
PCI_ROM(0x1050, 0x0840, "winbond840", "Winbond W89C840F"),
PCI_ROM(0x11f6, 0x2011, "compexrl100atx", "Compex RL100ATX"),
};
@@ -643,20 +643,20 @@ static int w89c840_probe ( struct nic *nic, struct pci_device *p ) {
#define PCI_DEVICE_ID_COMPEX_RL100ATX 0x2011
/* From Matt Hortman <mbhortman@acpthinclient.com> */
- if (p->vendor_id == PCI_VENDOR_ID_WINBOND2
- && p->device_id == PCI_DEVICE_ID_WINBOND2_89C840) {
+ if (p->vendor == PCI_VENDOR_ID_WINBOND2
+ && p->device == PCI_DEVICE_ID_WINBOND2_89C840) {
/* detected "Winbond W89c840 Fast Ethernet PCI NIC" */
- } else if ( p->vendor_id == PCI_VENDOR_ID_COMPEX
- && p->device_id == PCI_DEVICE_ID_COMPEX_RL100ATX) {
+ } else if ( p->vendor == PCI_VENDOR_ID_COMPEX
+ && p->device == PCI_DEVICE_ID_COMPEX_RL100ATX) {
/* detected "Compex RL100ATX Fast Ethernet PCI NIC" */
} else {
/* Gee, guess what? They missed again. */
printf("device ID : %X - is not a Compex RL100ATX NIC.\n",
- p->device_id);
+ p->device);
return 0;
}