Messages in this thread Patch in this message | | | Date | Thu, 26 Nov 1998 12:59:09 +0100 (CET) | From | Arjan van de Ven <> | Subject | [patch] Nameclash in 2.1.129 kernel: epic100 and yellowfin |
| |
Compilation patch -----------------
Kernel version : 2.1.129ac5 Platform : i386/gcc Affected files : drivers/net/yellowfin.c
Description of the problem -------------------------- The yellowfin and epic100 drivers have a nameclash about the chip_tbl structure. The suggested fix solves this by adding a prefix of "yellow_" to the yellowfin driver.
Suggested fix ------------- --- linux1/drivers/net/yellowfin.c Wed Nov 25 12:07:39 1998 +++ linux/drivers/net/yellowfin.c Thu Nov 26 13:13:16 1998 @@ -224,7 +224,7 @@ void (*media_timer)(unsigned long data); u32 chip_rev; /* As read from ChipRev, not PCI dev ID. */ int flags; -} chip_tbl[] = { +} yellow_chip_tbl[] = { {0x1000, 0x0702, 0xffff, 0, "Yellowfin G-NIC Gbit Ethernet", yellowfin_timer, 0x0702, FullTxStatus}, {0x1000, 0x0701, 0xffff, 0, "Symbios SYM83C885", @@ -384,12 +384,12 @@ pcibios_read_config_word(pci_bus, pci_device_fn, PCI_DEVICE_ID, &device); - for (chip_idx = 0; chip_tbl[chip_idx].vendor_id; chip_idx++) - if (vendor == chip_tbl[chip_idx].vendor_id - && (device & chip_tbl[chip_idx].device_id_mask) == - chip_tbl[chip_idx].device_id) + for (chip_idx = 0; yellow_chip_tbl[chip_idx].vendor_id; chip_idx++) + if (vendor == yellow_chip_tbl[chip_idx].vendor_id + && (device & yellow_chip_tbl[chip_idx].device_id_mask) == + yellow_chip_tbl[chip_idx].device_id) break; - if (chip_tbl[chip_idx].vendor_id == 0) /* Compiled out! */ + if (yellow_chip_tbl[chip_idx].vendor_id == 0) /* Compiled out! */ continue; { @@ -413,7 +413,7 @@ if (yellowfin_debug > 2) printk(KERN_INFO "Found %s at I/O %#lx, IRQ %d.\n", - chip_tbl[chip_idx].name, ioaddr, irq); + yellow_chip_tbl[chip_idx].name, ioaddr, irq); if (check_region(ioaddr, YELLOWFIN_TOTAL_SIZE)) continue; @@ -465,7 +465,7 @@ dev = init_etherdev(dev, sizeof(struct yellowfin_private)); printk(KERN_INFO "%s: %s type %8x at 0x%lx, ", - dev->name, chip_tbl[chip_id].name, inl(ioaddr + ChipRev), ioaddr); + dev->name, yellow_chip_tbl[chip_id].name, inl(ioaddr + ChipRev), ioaddr); if (inw(ioaddr + ChipRev) == 0x0702) for (i = 0; i < 6; i++) @@ -528,7 +528,7 @@ if (mtu) dev->mtu = mtu; - if (chip_tbl[yp->chip_id].flags & HasMII) { + if (yellow_chip_tbl[yp->chip_id].flags & HasMII) { int phy, phy_idx = 0; for (phy = 0; phy < 32 && phy_idx < 4; phy++) { int mii_status = mdio_read(ioaddr, phy, 1); @@ -795,7 +795,7 @@ yp->tx_ring[i].cmd = CMD_STOP; /* Branch on Tx error. */ yp->tx_ring[i].branch_addr = virt_to_bus(&yp->tx_ring[i+1]); i++; - if (chip_tbl[yp->chip_id].flags & FullTxStatus) { + if (yellow_chip_tbl[yp->chip_id].flags & FullTxStatus) { yp->tx_ring[i].cmd = CMD_TXSTATUS; yp->tx_ring[i].request_cnt = sizeof(yp->tx_status[i]); yp->tx_ring[i].addr = virt_to_bus(&yp->tx_status[i/2]);
Compiler output + config-file ----------------------------- > Detected some other bugs, to complex to put here
Greetings, Arjan van de Ven
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |