pcnet32: delete non NAPI code from driver.

Delete the non-napi code from the driver and Kconfig.
Tested x86_64. Apply at next open opportunity.

Signed-off-by: Don Fry <pcnet32@verizon.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

authored by Don Fry and committed by Jeff Garzik 01935d7d a86e2cbe

+4 -71
-14
drivers/net/Kconfig
··· 1273 1273 To compile this driver as a module, choose M here. The module 1274 1274 will be called pcnet32. 1275 1275 1276 - config PCNET32_NAPI 1277 - bool "Use RX polling (NAPI)" 1278 - depends on PCNET32 1279 - help 1280 - NAPI is a new driver API designed to reduce CPU and interrupt load 1281 - when the driver is receiving lots of packets from the card. It is 1282 - still somewhat experimental and thus not yet enabled by default. 1283 - 1284 - If your estimated Rx load is 10kpps or more, or if the card will be 1285 - deployed on potentially unfriendly networks (e.g. in a firewall), 1286 - then say Y here. 1287 - 1288 - If in doubt, say N. 1289 - 1290 1276 config AMD8111_ETH 1291 1277 tristate "AMD 8111 (new PCI lance) support" 1292 1278 depends on NET_PCI && PCI
+4 -57
drivers/net/pcnet32.c
··· 22 22 *************************************************************************/ 23 23 24 24 #define DRV_NAME "pcnet32" 25 - #ifdef CONFIG_PCNET32_NAPI 26 - #define DRV_VERSION "1.34-NAPI" 27 - #else 28 - #define DRV_VERSION "1.34" 29 - #endif 30 - #define DRV_RELDATE "14.Aug.2007" 25 + #define DRV_VERSION "1.35" 26 + #define DRV_RELDATE "21.Apr.2008" 31 27 #define PFX DRV_NAME ": " 32 28 33 29 static const char *const version = ··· 441 445 442 446 static void pcnet32_netif_stop(struct net_device *dev) 443 447 { 444 - #ifdef CONFIG_PCNET32_NAPI 445 448 struct pcnet32_private *lp = netdev_priv(dev); 446 - #endif 449 + 447 450 dev->trans_start = jiffies; 448 - #ifdef CONFIG_PCNET32_NAPI 449 451 napi_disable(&lp->napi); 450 - #endif 451 452 netif_tx_disable(dev); 452 453 } 453 454 454 455 static void pcnet32_netif_start(struct net_device *dev) 455 456 { 456 - #ifdef CONFIG_PCNET32_NAPI 457 457 struct pcnet32_private *lp = netdev_priv(dev); 458 458 ulong ioaddr = dev->base_addr; 459 459 u16 val; 460 - #endif 460 + 461 461 netif_wake_queue(dev); 462 - #ifdef CONFIG_PCNET32_NAPI 463 462 val = lp->a.read_csr(ioaddr, CSR3); 464 463 val &= 0x00ff; 465 464 lp->a.write_csr(ioaddr, CSR3, val); 466 465 napi_enable(&lp->napi); 467 - #endif 468 466 } 469 467 470 468 /* ··· 901 911 rc = 1; /* default to fail */ 902 912 903 913 if (netif_running(dev)) 904 - #ifdef CONFIG_PCNET32_NAPI 905 914 pcnet32_netif_stop(dev); 906 - #else 907 - pcnet32_close(dev); 908 - #endif 909 915 910 916 spin_lock_irqsave(&lp->lock, flags); 911 917 lp->a.write_csr(ioaddr, CSR0, CSR0_STOP); /* stop the chip */ ··· 1032 1046 x = a->read_bcr(ioaddr, 32); /* reset internal loopback */ 1033 1047 a->write_bcr(ioaddr, 32, (x & ~0x0002)); 1034 1048 1035 - #ifdef CONFIG_PCNET32_NAPI 1036 1049 if (netif_running(dev)) { 1037 1050 pcnet32_netif_start(dev); 1038 1051 pcnet32_restart(dev, CSR0_NORMAL); ··· 1040 1055 lp->a.write_bcr(ioaddr, 20, 4); /* return to 16bit mode */ 1041 1056 } 1042 1057 spin_unlock_irqrestore(&lp->lock, flags); 1043 - #else 1044 - if (netif_running(dev)) { 1045 - spin_unlock_irqrestore(&lp->lock, flags); 1046 - pcnet32_open(dev); 1047 - } else { 1048 - pcnet32_purge_rx_ring(dev); 1049 - lp->a.write_bcr(ioaddr, 20, 4); /* return to 16bit mode */ 1050 - spin_unlock_irqrestore(&lp->lock, flags); 1051 - } 1052 - #endif 1053 1058 1054 1059 return (rc); 1055 1060 } /* end pcnet32_loopback_test */ ··· 1245 1270 } 1246 1271 dev->stats.rx_bytes += skb->len; 1247 1272 skb->protocol = eth_type_trans(skb, dev); 1248 - #ifdef CONFIG_PCNET32_NAPI 1249 1273 netif_receive_skb(skb); 1250 - #else 1251 - netif_rx(skb); 1252 - #endif 1253 1274 dev->last_rx = jiffies; 1254 1275 dev->stats.rx_packets++; 1255 1276 return; ··· 1374 1403 return must_restart; 1375 1404 } 1376 1405 1377 - #ifdef CONFIG_PCNET32_NAPI 1378 1406 static int pcnet32_poll(struct napi_struct *napi, int budget) 1379 1407 { 1380 1408 struct pcnet32_private *lp = container_of(napi, struct pcnet32_private, napi); ··· 1412 1442 } 1413 1443 return work_done; 1414 1444 } 1415 - #endif 1416 1445 1417 1446 #define PCNET32_REGS_PER_PHY 32 1418 1447 #define PCNET32_MAX_PHYS 32 ··· 1833 1864 /* napi.weight is used in both the napi and non-napi cases */ 1834 1865 lp->napi.weight = lp->rx_ring_size / 2; 1835 1866 1836 - #ifdef CONFIG_PCNET32_NAPI 1837 1867 netif_napi_add(dev, &lp->napi, pcnet32_poll, lp->rx_ring_size / 2); 1838 - #endif 1839 1868 1840 1869 if (fdx && !(lp->options & PCNET32_PORT_ASEL) && 1841 1870 ((cards_found >= MAX_UNITS) || full_duplex[cards_found])) ··· 2264 2297 goto err_free_ring; 2265 2298 } 2266 2299 2267 - #ifdef CONFIG_PCNET32_NAPI 2268 2300 napi_enable(&lp->napi); 2269 - #endif 2270 2301 2271 2302 /* Re-initialize the PCNET32, and start it when done. */ 2272 2303 lp->a.write_csr(ioaddr, 1, (lp->init_dma_addr & 0xffff)); ··· 2588 2623 dev->name, csr0); 2589 2624 /* unlike for the lance, there is no restart needed */ 2590 2625 } 2591 - #ifdef CONFIG_PCNET32_NAPI 2592 2626 if (netif_rx_schedule_prep(dev, &lp->napi)) { 2593 2627 u16 val; 2594 2628 /* set interrupt masks */ ··· 2598 2634 __netif_rx_schedule(dev, &lp->napi); 2599 2635 break; 2600 2636 } 2601 - #else 2602 - pcnet32_rx(dev, lp->napi.weight); 2603 - if (pcnet32_tx(dev)) { 2604 - /* reset the chip to clear the error condition, then restart */ 2605 - lp->a.reset(ioaddr); 2606 - lp->a.write_csr(ioaddr, CSR4, 0x0915); /* auto tx pad */ 2607 - pcnet32_restart(dev, CSR0_START); 2608 - netif_wake_queue(dev); 2609 - } 2610 - #endif 2611 2637 csr0 = lp->a.read_csr(ioaddr, CSR0); 2612 2638 } 2613 - 2614 - #ifndef CONFIG_PCNET32_NAPI 2615 - /* Set interrupt enable. */ 2616 - lp->a.write_csr(ioaddr, CSR0, CSR0_INTEN); 2617 - #endif 2618 2639 2619 2640 if (netif_msg_intr(lp)) 2620 2641 printk(KERN_DEBUG "%s: exiting interrupt, csr0=%#4.4x.\n", ··· 2619 2670 del_timer_sync(&lp->watchdog_timer); 2620 2671 2621 2672 netif_stop_queue(dev); 2622 - #ifdef CONFIG_PCNET32_NAPI 2623 2673 napi_disable(&lp->napi); 2624 - #endif 2625 2674 2626 2675 spin_lock_irqsave(&lp->lock, flags); 2627 2676