aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2008-07-10 18:30:14 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-07-11 01:11:43 -0400
commit32b0f53e5bc80b87fd20d4d78a0e0cb602c9157a (patch)
treefdd7263a2d0d7406866ad003fc9f4af757feedb7
parent4422b00390749f8b877b2838a99ef2948ae08a58 (diff)
via-rhine: delete non NAPI code from the driver.
Compile-tested only. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r--drivers/net/Kconfig11
-rw-r--r--drivers/net/via-rhine.c27
2 files changed, 2 insertions, 36 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 50ca1cf1271e..fb618b6e88eb 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -1694,17 +1694,6 @@ config VIA_RHINE_MMIO
1694 1694
1695 If unsure, say Y. 1695 If unsure, say Y.
1696 1696
1697config VIA_RHINE_NAPI
1698 bool "Use Rx Polling (NAPI)"
1699 depends on VIA_RHINE
1700 help
1701 NAPI is a new driver API designed to reduce CPU and interrupt load
1702 when the driver is receiving lots of packets from the card.
1703
1704 If your estimated Rx load is 10kpps or more, or if the card will be
1705 deployed on potentially unfriendly networks (e.g. in a firewall),
1706 then say Y here.
1707
1708config LAN_SAA9730 1697config LAN_SAA9730
1709 bool "Philips SAA9730 Ethernet support" 1698 bool "Philips SAA9730 Ethernet support"
1710 depends on NET_PCI && PCI && MIPS_ATLAS 1699 depends on NET_PCI && PCI && MIPS_ATLAS
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
index 8c9d6ae2bb31..96dff04334b8 100644
--- a/drivers/net/via-rhine.c
+++ b/drivers/net/via-rhine.c
@@ -73,12 +73,7 @@ static const int multicast_filter_limit = 32;
73 There are no ill effects from too-large receive rings. */ 73 There are no ill effects from too-large receive rings. */
74#define TX_RING_SIZE 16 74#define TX_RING_SIZE 16
75#define TX_QUEUE_LEN 10 /* Limit ring entries actually used. */ 75#define TX_QUEUE_LEN 10 /* Limit ring entries actually used. */
76#ifdef CONFIG_VIA_RHINE_NAPI
77#define RX_RING_SIZE 64 76#define RX_RING_SIZE 64
78#else
79#define RX_RING_SIZE 16
80#endif
81
82 77
83/* Operational parameters that usually are not changed. */ 78/* Operational parameters that usually are not changed. */
84 79
@@ -583,7 +578,6 @@ static void rhine_poll(struct net_device *dev)
583} 578}
584#endif 579#endif
585 580
586#ifdef CONFIG_VIA_RHINE_NAPI
587static int rhine_napipoll(struct napi_struct *napi, int budget) 581static int rhine_napipoll(struct napi_struct *napi, int budget)
588{ 582{
589 struct rhine_private *rp = container_of(napi, struct rhine_private, napi); 583 struct rhine_private *rp = container_of(napi, struct rhine_private, napi);
@@ -604,7 +598,6 @@ static int rhine_napipoll(struct napi_struct *napi, int budget)
604 } 598 }
605 return work_done; 599 return work_done;
606} 600}
607#endif
608 601
609static void __devinit rhine_hw_init(struct net_device *dev, long pioaddr) 602static void __devinit rhine_hw_init(struct net_device *dev, long pioaddr)
610{ 603{
@@ -784,9 +777,8 @@ static int __devinit rhine_init_one(struct pci_dev *pdev,
784#ifdef CONFIG_NET_POLL_CONTROLLER 777#ifdef CONFIG_NET_POLL_CONTROLLER
785 dev->poll_controller = rhine_poll; 778 dev->poll_controller = rhine_poll;
786#endif 779#endif
787#ifdef CONFIG_VIA_RHINE_NAPI
788 netif_napi_add(dev, &rp->napi, rhine_napipoll, 64); 780 netif_napi_add(dev, &rp->napi, rhine_napipoll, 64);
789#endif 781
790 if (rp->quirks & rqRhineI) 782 if (rp->quirks & rqRhineI)
791 dev->features |= NETIF_F_SG|NETIF_F_HW_CSUM; 783 dev->features |= NETIF_F_SG|NETIF_F_HW_CSUM;
792 784
@@ -1056,9 +1048,7 @@ static void init_registers(struct net_device *dev)
1056 1048
1057 rhine_set_rx_mode(dev); 1049 rhine_set_rx_mode(dev);
1058 1050
1059#ifdef CONFIG_VIA_RHINE_NAPI
1060 napi_enable(&rp->napi); 1051 napi_enable(&rp->napi);
1061#endif
1062 1052
1063 /* Enable interrupts by setting the interrupt mask. */ 1053 /* Enable interrupts by setting the interrupt mask. */
1064 iowrite16(IntrRxDone | IntrRxErr | IntrRxEmpty| IntrRxOverflow | 1054 iowrite16(IntrRxDone | IntrRxErr | IntrRxEmpty| IntrRxOverflow |
@@ -1193,9 +1183,7 @@ static void rhine_tx_timeout(struct net_device *dev)
1193 /* protect against concurrent rx interrupts */ 1183 /* protect against concurrent rx interrupts */
1194 disable_irq(rp->pdev->irq); 1184 disable_irq(rp->pdev->irq);
1195 1185
1196#ifdef CONFIG_VIA_RHINE_NAPI
1197 napi_disable(&rp->napi); 1186 napi_disable(&rp->napi);
1198#endif
1199 1187
1200 spin_lock(&rp->lock); 1188 spin_lock(&rp->lock);
1201 1189
@@ -1319,16 +1307,12 @@ static irqreturn_t rhine_interrupt(int irq, void *dev_instance)
1319 1307
1320 if (intr_status & (IntrRxDone | IntrRxErr | IntrRxDropped | 1308 if (intr_status & (IntrRxDone | IntrRxErr | IntrRxDropped |
1321 IntrRxWakeUp | IntrRxEmpty | IntrRxNoBuf)) { 1309 IntrRxWakeUp | IntrRxEmpty | IntrRxNoBuf)) {
1322#ifdef CONFIG_VIA_RHINE_NAPI
1323 iowrite16(IntrTxAborted | 1310 iowrite16(IntrTxAborted |
1324 IntrTxDone | IntrTxError | IntrTxUnderrun | 1311 IntrTxDone | IntrTxError | IntrTxUnderrun |
1325 IntrPCIErr | IntrStatsMax | IntrLinkChange, 1312 IntrPCIErr | IntrStatsMax | IntrLinkChange,
1326 ioaddr + IntrEnable); 1313 ioaddr + IntrEnable);
1327 1314
1328 netif_rx_schedule(dev, &rp->napi); 1315 netif_rx_schedule(dev, &rp->napi);
1329#else
1330 rhine_rx(dev, RX_RING_SIZE);
1331#endif
1332 } 1316 }
1333 1317
1334 if (intr_status & (IntrTxErrSummary | IntrTxDone)) { 1318 if (intr_status & (IntrTxErrSummary | IntrTxDone)) {
@@ -1520,11 +1504,7 @@ static int rhine_rx(struct net_device *dev, int limit)
1520 PCI_DMA_FROMDEVICE); 1504 PCI_DMA_FROMDEVICE);
1521 } 1505 }
1522 skb->protocol = eth_type_trans(skb, dev); 1506 skb->protocol = eth_type_trans(skb, dev);
1523#ifdef CONFIG_VIA_RHINE_NAPI
1524 netif_receive_skb(skb); 1507 netif_receive_skb(skb);
1525#else
1526 netif_rx(skb);
1527#endif
1528 dev->last_rx = jiffies; 1508 dev->last_rx = jiffies;
1529 rp->stats.rx_bytes += pkt_len; 1509 rp->stats.rx_bytes += pkt_len;
1530 rp->stats.rx_packets++; 1510 rp->stats.rx_packets++;
@@ -1836,9 +1816,7 @@ static int rhine_close(struct net_device *dev)
1836 spin_lock_irq(&rp->lock); 1816 spin_lock_irq(&rp->lock);
1837 1817
1838 netif_stop_queue(dev); 1818 netif_stop_queue(dev);
1839#ifdef CONFIG_VIA_RHINE_NAPI
1840 napi_disable(&rp->napi); 1819 napi_disable(&rp->napi);
1841#endif
1842 1820
1843 if (debug > 1) 1821 if (debug > 1)
1844 printk(KERN_DEBUG "%s: Shutting down ethercard, " 1822 printk(KERN_DEBUG "%s: Shutting down ethercard, "
@@ -1937,9 +1915,8 @@ static int rhine_suspend(struct pci_dev *pdev, pm_message_t state)
1937 if (!netif_running(dev)) 1915 if (!netif_running(dev))
1938 return 0; 1916 return 0;
1939 1917
1940#ifdef CONFIG_VIA_RHINE_NAPI
1941 napi_disable(&rp->napi); 1918 napi_disable(&rp->napi);
1942#endif 1919
1943 netif_device_detach(dev); 1920 netif_device_detach(dev);
1944 pci_save_state(pdev); 1921 pci_save_state(pdev);
1945 1922