diff -urNp linux-1280/drivers/net/3c59x.c linux-1290/drivers/net/3c59x.c --- linux-1280/drivers/net/3c59x.c +++ linux-1290/drivers/net/3c59x.c @@ -446,6 +446,7 @@ enum vortex_chips { CH_3CCFEM656_1, CH_3C450, + CH_3C920, }; @@ -537,6 +538,8 @@ static struct vortex_chip_info { MAX_COLLISION_RESET|HAS_HWCKSM, 128, }, {"3c450 HomePNA Tornado", /* AKPM: from Don's 0.99Q */ PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, + {"3c920 Tornado", + PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, {0,}, /* 0 terminated list. */ }; @@ -580,6 +583,7 @@ static struct pci_device_id vortex_pci_t { 0x10B7, 0x6564, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3CCFEM656_1 }, { 0x10B7, 0x4500, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C450 }, + { 0x10B7, 0x9201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C920 }, {0,} /* 0 terminated list. */ }; MODULE_DEVICE_TABLE(pci, vortex_pci_tbl); @@ -980,7 +984,7 @@ static int __devinit vortex_probe1(struc int i, step; struct net_device *dev; static int printed_version; - int retval, print_info; + int retval; struct vortex_chip_info * const vci = &vortex_info_tbl[chip_idx]; char *print_name; @@ -1022,10 +1026,7 @@ static int __devinit vortex_probe1(struc vp->enable_wol = 1; } - print_info = (vortex_debug > 1); - if (print_info) - printk (KERN_INFO "See Documentation/networking/vortex.txt\n"); - + printk (KERN_INFO "See Documentation/networking/vortex.txt\n"); printk(KERN_INFO "%s: 3Com %s %s at 0x%lx. Vers " DRV_VERSION "\n", print_name, pdev ? "PCI" : "EISA", @@ -1151,20 +1152,16 @@ static int __devinit vortex_probe1(struc printk(" ***INVALID CHECKSUM %4.4x*** ", checksum); for (i = 0; i < 3; i++) ((u16 *)dev->dev_addr)[i] = htons(eeprom[i + 10]); - if (print_info) { - for (i = 0; i < 6; i++) - printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]); - } + for (i = 0; i < 6; i++) + printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]); EL3WINDOW(2); for (i = 0; i < 6; i++) outb(dev->dev_addr[i], ioaddr + i); #ifdef __sparc__ - if (print_info) - printk(", IRQ %s\n", __irq_itoa(dev->irq)); + printk(", IRQ %s\n", __irq_itoa(dev->irq)); #else - if (print_info) - printk(", IRQ %d\n", dev->irq); + printk(", IRQ %d\n", dev->irq); /* Tell them about an invalid IRQ. */ if (dev->irq <= 0 || dev->irq >= NR_IRQS) printk(KERN_WARNING " *** Warning: IRQ %d is unlikely to work! ***\n", @@ -1173,12 +1170,9 @@ static int __devinit vortex_probe1(struc EL3WINDOW(4); step = (inb(ioaddr + Wn4_NetDiag) & 0x1e) >> 1; - if (print_info) { - printk(KERN_INFO " product code %02x%02x rev %02x.%d date %02d-" - "%02d-%02d\n", eeprom[6]&0xff, eeprom[6]>>8, eeprom[0x14], - step, (eeprom[4]>>5) & 15, eeprom[4] & 31, eeprom[4]>>9); - } - + printk(KERN_INFO " product code %02x%02x rev %02x.%d date %02d-" + "%02d-%02d\n", eeprom[6]&0xff, eeprom[6]>>8, eeprom[0x14], + step, (eeprom[4]>>5) & 15, eeprom[4] & 31, eeprom[4]>>9); if (pdev && vci->drv_flags & HAS_CB_FNS) { unsigned long fn_st_addr; /* Cardbus function status space */ @@ -1191,10 +1185,8 @@ static int __devinit vortex_probe1(struc if (!vp->cb_fn_base) goto free_ring; } - if (print_info) { - printk(KERN_INFO "%s: CardBus functions mapped %8.8lx->%p\n", - print_name, fn_st_addr, vp->cb_fn_base); - } + printk(KERN_INFO "%s: CardBus functions mapped %8.8lx->%p\n", + print_name, fn_st_addr, vp->cb_fn_base); EL3WINDOW(2); n = inw(ioaddr + Wn2_ResetOptions) & ~0x4010; @@ -1216,8 +1208,7 @@ static int __devinit vortex_probe1(struc if (vp->info1 & 0x8000) { vp->full_duplex = 1; - if (print_info) - printk(KERN_INFO "Full duplex capable\n"); + printk(KERN_INFO "Full duplex capable\n"); } { @@ -1228,17 +1219,16 @@ static int __devinit vortex_probe1(struc if ((vp->available_media & 0xff) == 0) /* Broken 3c916 */ vp->available_media = 0x40; config = inl(ioaddr + Wn3_Config); - if (print_info) { - printk(KERN_DEBUG " Internal config register is %4.4x, " - "transceivers %#x.\n", config, inw(ioaddr + Wn3_Options)); - printk(KERN_INFO " %dK %s-wide RAM %s Rx:Tx split, %s%s interface.\n", - 8 << RAM_SIZE(config), - RAM_WIDTH(config) ? "word" : "byte", - ram_split[RAM_SPLIT(config)], - AUTOSELECT(config) ? "autoselect/" : "", - XCVR(config) > XCVR_ExtMII ? "" : - media_tbl[XCVR(config)].name); - } + printk(KERN_DEBUG " Internal config register is %4.4x, " + "transceivers %#x.\n", config, + inw(ioaddr + Wn3_Options)); + printk(KERN_INFO " %dK %s-wide RAM %s Rx:Tx split, %s%s interface.\n", + 8 << RAM_SIZE(config), + RAM_WIDTH(config) ? "word" : "byte", + ram_split[RAM_SPLIT(config)], + AUTOSELECT(config) ? "autoselect/" : "", + XCVR(config) > XCVR_ExtMII ? "" : + media_tbl[XCVR(config)].name); vp->default_media = XCVR(config); if (vp->default_media == XCVR_NWAY) vp->has_nway = 1; @@ -1275,10 +1265,9 @@ static int __devinit vortex_probe1(struc mii_status = mdio_read(dev, phyx, 1); if (mii_status && mii_status != 0xffff) { vp->phys[phy_idx++] = phyx; - if (print_info) { - printk(KERN_INFO " MII transceiver found at address %d," - " status %4x.\n", phyx, mii_status); - } + printk(KERN_INFO " MII transceiver found at " + "address %d, status %4x.\n", + phyx, mii_status); if ((mii_status & 0x0040) == 0) mii_preamble_required++; } @@ -1299,10 +1288,9 @@ static int __devinit vortex_probe1(struc if (vp->capabilities & CapBusMaster) { vp->full_bus_master_tx = 1; - if (print_info) { - printk(KERN_INFO " Enabling bus-master transmits and %s receives.\n", + printk(KERN_INFO " Enabling bus-master transmits and %s " + "receives.\n", (vp->info2 & 1) ? "early" : "whole-frame" ); - } vp->full_bus_master_rx = (vp->info2 & 1) ? 1 : 2; vp->bus_master = 0; /* AKPM: vortex only */ } @@ -1321,12 +1309,10 @@ static int __devinit vortex_probe1(struc dev->hard_start_xmit = vortex_start_xmit; } - if (print_info) { - printk(KERN_INFO "%s: scatter/gather %sabled. h/w checksums %sabled\n", - print_name, - (dev->features & NETIF_F_SG) ? "en":"dis", - (dev->features & NETIF_F_IP_CSUM) ? "en":"dis"); - } + printk(KERN_INFO "%s: scatter/gather %sabled. h/w checksums %sabled\n", + print_name, + (dev->features & NETIF_F_SG) ? "en":"dis", + (dev->features & NETIF_F_IP_CSUM) ? "en":"dis"); dev->stop = vortex_close; dev->get_stats = vortex_get_stats; diff -urNp linux-1280/drivers/net/ppp_generic.c linux-1290/drivers/net/ppp_generic.c --- linux-1280/drivers/net/ppp_generic.c +++ linux-1290/drivers/net/ppp_generic.c @@ -965,11 +965,10 @@ ppp_send_frame(struct ppp *ppp, struct s if (ppp->pass_filter.filter && sk_run_filter(skb, ppp->pass_filter.filter, ppp->pass_filter.len) == 0) { - if (ppp->debug & 1) { + if (ppp->debug & 1) printk(KERN_DEBUG "PPP: outbound frame not passed\n"); - kfree_skb(skb); - return; - } + kfree_skb(skb); + return; } /* if this packet passes the active filter, record the time */ if (!(ppp->active_filter.filter