summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/forcedeth.c
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/forcedeth.c
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/forcedeth.c')
-rw-r--r--src/drivers/net/forcedeth.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/drivers/net/forcedeth.c b/src/drivers/net/forcedeth.c
index 08ddbcd9..a60749c7 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"),