summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/tg3.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/tg3.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/tg3.c')
-rw-r--r--src/drivers/net/tg3.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/drivers/net/tg3.c b/src/drivers/net/tg3.c
index cad3bdff..6aad8718 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"),