Commit 5b6f06d7 authored by Jeff Garzik's avatar Jeff Garzik

Hand-merge e100 remove-NAPI patch with newly updated mainstream.

parents 140eff1b 8396c851
...@@ -87,9 +87,8 @@ ...@@ -87,9 +87,8 @@
* cb_to_use is the next CB to use for queuing a command; cb_to_clean * cb_to_use is the next CB to use for queuing a command; cb_to_clean
* is the next CB to check for completion; cb_to_send is the first * is the next CB to check for completion; cb_to_send is the first
* CB to start on in case of a previous failure to resume. CB clean * CB to start on in case of a previous failure to resume. CB clean
* up happens in interrupt context in response to a CU interrupt, or * up happens in interrupt context in response to a CU interrupt.
* in dev->poll in the case where NAPI is enabled. cbs_avail keeps * cbs_avail keeps track of number of free CB resources available.
* track of number of free CB resources available.
* *
* Hardware padding of short packets to minimum packet size is * Hardware padding of short packets to minimum packet size is
* enabled. 82557 pads with 7Eh, while the later controllers pad * enabled. 82557 pads with 7Eh, while the later controllers pad
...@@ -112,9 +111,8 @@ ...@@ -112,9 +111,8 @@
* replacement RFDs cannot be allocated, or the RU goes non-active, * replacement RFDs cannot be allocated, or the RU goes non-active,
* the RU must be restarted. Frame arrival generates an interrupt, * the RU must be restarted. Frame arrival generates an interrupt,
* and Rx indication and re-allocation happen in the same context, * and Rx indication and re-allocation happen in the same context,
* therefore no locking is required. If NAPI is enabled, this work * therefore no locking is required. A software-generated interrupt
* happens in dev->poll. A software-generated interrupt is gen- * is generated from the watchdog to recover from a failed allocation
* erated from the watchdog to recover from a failed allocation
* senario where all Rx resources have been indicated and none re- * senario where all Rx resources have been indicated and none re-
* placed. * placed.
* *
...@@ -126,8 +124,6 @@ ...@@ -126,8 +124,6 @@
* supported. Tx Scatter/Gather is not supported. Jumbo Frames is * supported. Tx Scatter/Gather is not supported. Jumbo Frames is
* not supported (hardware limitation). * not supported (hardware limitation).
* *
* NAPI support is enabled with CONFIG_E100_NAPI.
*
* MagicPacket(tm) WoL support is enabled/disabled via ethtool. * MagicPacket(tm) WoL support is enabled/disabled via ethtool.
* *
* Thanks to JC (jchapman@katalix.com) for helping with * Thanks to JC (jchapman@katalix.com) for helping with
...@@ -158,11 +154,7 @@ ...@@ -158,11 +154,7 @@
#define DRV_NAME "e100" #define DRV_NAME "e100"
#ifndef CONFIG_E100_NAPI #define DRV_EXT "-NAPI"
#define DRV_EXT
#else
#define DRV_EXT "-NAPI"
#endif
#define DRV_VERSION "3.0.27-k2"DRV_EXT #define DRV_VERSION "3.0.27-k2"DRV_EXT
#define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" #define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver"
#define DRV_COPYRIGHT "Copyright(c) 1999-2004 Intel Corporation" #define DRV_COPYRIGHT "Copyright(c) 1999-2004 Intel Corporation"
...@@ -1508,11 +1500,7 @@ static inline int e100_rx_indicate(struct nic *nic, struct rx *rx, ...@@ -1508,11 +1500,7 @@ static inline int e100_rx_indicate(struct nic *nic, struct rx *rx,
nic->net_stats.rx_packets++; nic->net_stats.rx_packets++;
nic->net_stats.rx_bytes += actual_size; nic->net_stats.rx_bytes += actual_size;
nic->netdev->last_rx = jiffies; nic->netdev->last_rx = jiffies;
#ifdef CONFIG_E100_NAPI
netif_receive_skb(skb); netif_receive_skb(skb);
#else
netif_rx(skb);
#endif
if(work_done) if(work_done)
(*work_done)++; (*work_done)++;
} }
...@@ -1607,20 +1595,12 @@ static irqreturn_t e100_intr(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1607,20 +1595,12 @@ static irqreturn_t e100_intr(int irq, void *dev_id, struct pt_regs *regs)
if(stat_ack & stat_ack_rnr) if(stat_ack & stat_ack_rnr)
nic->ru_running = 0; nic->ru_running = 0;
#ifdef CONFIG_E100_NAPI
e100_disable_irq(nic); e100_disable_irq(nic);
netif_rx_schedule(netdev); netif_rx_schedule(netdev);
#else
if(stat_ack & stat_ack_rx)
e100_rx_clean(nic, NULL, 0);
if(stat_ack & stat_ack_tx)
e100_tx_clean(nic);
#endif
return IRQ_HANDLED; return IRQ_HANDLED;
} }
#ifdef CONFIG_E100_NAPI
static int e100_poll(struct net_device *netdev, int *budget) static int e100_poll(struct net_device *netdev, int *budget)
{ {
struct nic *nic = netdev_priv(netdev); struct nic *nic = netdev_priv(netdev);
...@@ -1643,7 +1623,6 @@ static int e100_poll(struct net_device *netdev, int *budget) ...@@ -1643,7 +1623,6 @@ static int e100_poll(struct net_device *netdev, int *budget)
return 1; return 1;
} }
#endif
#ifdef CONFIG_NET_POLL_CONTROLLER #ifdef CONFIG_NET_POLL_CONTROLLER
static void e100_netpoll(struct net_device *netdev) static void e100_netpoll(struct net_device *netdev)
...@@ -2189,10 +2168,8 @@ static int __devinit e100_probe(struct pci_dev *pdev, ...@@ -2189,10 +2168,8 @@ static int __devinit e100_probe(struct pci_dev *pdev,
SET_ETHTOOL_OPS(netdev, &e100_ethtool_ops); SET_ETHTOOL_OPS(netdev, &e100_ethtool_ops);
netdev->tx_timeout = e100_tx_timeout; netdev->tx_timeout = e100_tx_timeout;
netdev->watchdog_timeo = E100_WATCHDOG_PERIOD; netdev->watchdog_timeo = E100_WATCHDOG_PERIOD;
#ifdef CONFIG_E100_NAPI
netdev->poll = e100_poll; netdev->poll = e100_poll;
netdev->weight = E100_NAPI_WEIGHT; netdev->weight = E100_NAPI_WEIGHT;
#endif
#ifdef CONFIG_NET_POLL_CONTROLLER #ifdef CONFIG_NET_POLL_CONTROLLER
netdev->poll_controller = e100_netpoll; netdev->poll_controller = e100_netpoll;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment