1 drivers/net/3c59x.c | 27 +++++++++++++++++++++++++++
2 drivers/net/e100/e100_main.c | 19 +++++++++++++++++++
3 drivers/net/e1000/e1000_main.c | 13 +++++++++++++
4 drivers/net/eepro100.c | 21 +++++++++++++++++++++
5 drivers/net/smc-ultra.c | 11 +++++++++++
6 drivers/net/tlan.c | 14 +++++++++++++-
7 drivers/net/tulip/tulip_core.c | 22 ++++++++++++++++++++++
8 include/linux/netdevice.h | 3 +++
9 net/core/dev.c | 18 ++++++++++++++++--
10 9 files changed, 145 insertions(+), 3 deletions(-)
12 --- linux-2.6.0-test1/drivers/net/3c59x.c~dump_netdev 2003-07-22 01:14:04.000000000 -0600
13 +++ linux-2.6.0-test1-braam/drivers/net/3c59x.c 2003-07-22 01:15:10.000000000 -0600
14 @@ -900,6 +900,7 @@ static void set_rx_mode(struct net_devic
15 static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
16 static void vortex_tx_timeout(struct net_device *dev);
17 static void acpi_set_WOL(struct net_device *dev);
18 +static void vorboom_poll(struct net_device *dev);
20 /* This driver uses 'options' to pass the media type, full-duplex flag, etc. */
21 /* Option count limit only -- unlimited interfaces are supported. */
22 @@ -1448,6 +1449,9 @@ static int __devinit vortex_probe1(struc
23 dev->set_multicast_list = set_rx_mode;
24 dev->tx_timeout = vortex_tx_timeout;
25 dev->watchdog_timeo = (watchdog * HZ) / 1000;
26 +#ifdef HAVE_POLL_CONTROLLER
27 + dev->poll_controller = &vorboom_poll;
30 vp->pm_state_valid = 1;
31 pci_save_state(VORTEX_PCI(vp), vp->power_state);
32 @@ -2438,6 +2442,29 @@ handler_exit:
36 +#ifdef HAVE_POLL_CONTROLLER
39 + * Polling 'interrupt' - used by things like netconsole to send skbs
40 + * without having to re-enable interrupts. It's not called while
41 + * the interrupt routine is executing.
44 +static void vorboom_poll (struct net_device *dev)
46 + struct vortex_private *vp = (struct vortex_private *)dev->priv;
48 + disable_irq(dev->irq);
49 + if (vp->full_bus_master_tx)
50 + boomerang_interrupt(dev->irq, dev, 0);
52 + vortex_interrupt(dev->irq, dev, 0);
53 + enable_irq(dev->irq);
59 static int vortex_rx(struct net_device *dev)
61 struct vortex_private *vp = (struct vortex_private *)dev->priv;
62 --- linux-2.6.0-test1/drivers/net/e100/e100_main.c~dump_netdev 2003-07-13 21:34:02.000000000 -0600
63 +++ linux-2.6.0-test1-braam/drivers/net/e100/e100_main.c 2003-07-22 01:14:38.000000000 -0600
64 @@ -551,6 +551,22 @@ e100_trigger_SWI(struct e100_private *bd
65 readw(&(bdp->scb->scb_status)); /* flushes last write, read-safe */
68 +#ifdef HAVE_POLL_CONTROLLER
71 + * Polling 'interrupt' - used by things like netconsole to send skbs
72 + * without having to re-enable interrupts. It's not called while
73 + * the interrupt routine is executing.
76 +e100_poll(struct net_device *dev)
78 + disable_irq(dev->irq);
79 + e100intr(dev->irq, dev, NULL);
80 + enable_irq(dev->irq);
85 e100_found1(struct pci_dev *pcid, const struct pci_device_id *ent)
87 @@ -569,6 +585,9 @@ e100_found1(struct pci_dev *pcid, const
89 SET_MODULE_OWNER(dev);
91 +#ifdef HAVE_POLL_CONTROLLER
92 + dev->poll_controller = &e100_poll;
96 printk(KERN_NOTICE "%s - version %s\n",
97 --- linux-2.6.0-test1/drivers/net/e1000/e1000_main.c~dump_netdev 2003-07-13 21:32:43.000000000 -0600
98 +++ linux-2.6.0-test1-braam/drivers/net/e1000/e1000_main.c 2003-07-22 01:14:38.000000000 -0600
99 @@ -138,6 +138,7 @@ static void e1000_leave_82542_rst(struct
100 static inline void e1000_rx_checksum(struct e1000_adapter *adapter,
101 struct e1000_rx_desc *rx_desc,
102 struct sk_buff *skb);
103 +static void e1000_Poll(struct net_device *dev);
104 static void e1000_tx_timeout(struct net_device *dev);
105 static void e1000_tx_timeout_task(struct net_device *dev);
106 static void e1000_smartspeed(struct e1000_adapter *adapter);
107 @@ -402,6 +403,9 @@ e1000_probe(struct pci_dev *pdev,
109 adapter->bd_number = cards_found;
111 +#ifdef HAVE_POLL_CONTROLLER
112 + netdev->poll_controller = &e1000_Poll;
114 /* setup the private structure */
116 if(e1000_sw_init(adapter))
117 @@ -1700,6 +1704,15 @@ e1000_xmit_frame(struct sk_buff *skb, st
121 +#ifdef HAVE_POLL_CONTROLLER
122 +static void e1000_Poll(struct net_device *dev)
124 + disable_irq(dev->irq);
125 + e1000_intr(dev->irq, dev, NULL);
126 + enable_irq(dev->irq);
131 * e1000_tx_timeout - Respond to a Tx Hang
132 * @netdev: network interface device structure
133 --- linux-2.6.0-test1/drivers/net/eepro100.c~dump_netdev 2003-07-13 21:35:52.000000000 -0600
134 +++ linux-2.6.0-test1-braam/drivers/net/eepro100.c 2003-07-22 01:14:38.000000000 -0600
135 @@ -543,6 +543,7 @@ static void speedo_refill_rx_buffers(str
136 static int speedo_rx(struct net_device *dev);
137 static void speedo_tx_buffer_gc(struct net_device *dev);
138 static irqreturn_t speedo_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
139 +static void poll_speedo (struct net_device *dev);
140 static int speedo_close(struct net_device *dev);
141 static struct net_device_stats *speedo_get_stats(struct net_device *dev);
142 static int speedo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
143 @@ -885,6 +886,9 @@ static int __devinit speedo_found1(struc
144 dev->get_stats = &speedo_get_stats;
145 dev->set_multicast_list = &set_rx_mode;
146 dev->do_ioctl = &speedo_ioctl;
147 +#ifdef HAVE_POLL_CONTROLLER
148 + dev->poll_controller = &poll_speedo;
151 if (register_netdevice(dev))
152 goto err_free_unlock;
153 @@ -1675,6 +1679,23 @@ static irqreturn_t speedo_interrupt(int
154 return IRQ_RETVAL(handled);
157 +#ifdef HAVE_POLL_CONTROLLER
160 + * Polling 'interrupt' - used by things like netconsole to send skbs
161 + * without having to re-enable interrupts. It's not called while
162 + * the interrupt routine is executing.
165 +static void poll_speedo (struct net_device *dev)
167 + disable_irq(dev->irq);
168 + speedo_interrupt (dev->irq, dev, NULL);
169 + enable_irq(dev->irq);
174 static inline struct RxFD *speedo_rx_alloc(struct net_device *dev, int entry)
176 struct speedo_private *sp = (struct speedo_private *)dev->priv;
177 --- linux-2.6.0-test1/drivers/net/smc-ultra.c~dump_netdev 2003-07-13 21:30:47.000000000 -0600
178 +++ linux-2.6.0-test1-braam/drivers/net/smc-ultra.c 2003-07-22 01:14:38.000000000 -0600
179 @@ -122,6 +122,14 @@ MODULE_DEVICE_TABLE(isapnp, ultra_device
180 #define ULTRA_IO_EXTENT 32
181 #define EN0_ERWCNT 0x08 /* Early receive warning count. */
184 +static void ultra_poll(struct net_device *dev)
186 + disable_irq(dev->irq);
187 + ei_interrupt(dev->irq, dev, NULL);
188 + enable_irq(dev->irq);
191 /* Probe for the Ultra. This looks like a 8013 with the station
192 address PROM at I/O ports <base>+8 to <base>+13, with a checksum
194 @@ -134,6 +142,9 @@ int __init ultra_probe(struct net_device
196 SET_MODULE_OWNER(dev);
198 +#ifdef HAVE_POLL_CONTROLLER
199 + dev->poll_controller = &ultra_poll;
201 if (base_addr > 0x1ff) /* Check a single specified location. */
202 return ultra_probe1(dev, base_addr);
203 else if (base_addr != 0) /* Don't probe at all. */
204 --- linux-2.6.0-test1/drivers/net/tlan.c~dump_netdev 2003-07-13 21:30:42.000000000 -0600
205 +++ linux-2.6.0-test1-braam/drivers/net/tlan.c 2003-07-22 01:14:38.000000000 -0600
206 @@ -345,6 +345,8 @@ static int TLan_EeSendByte( u16, u8, int
207 static void TLan_EeReceiveByte( u16, u8 *, int );
208 static int TLan_EeReadByte( struct net_device *, u8, u8 * );
210 +static void TLan_Poll(struct net_device *);
214 TLan_StoreSKB( struct tlan_list_tag *tag, struct sk_buff *skb)
215 @@ -890,6 +892,9 @@ static int TLan_Init( struct net_device
216 dev->get_stats = &TLan_GetStats;
217 dev->set_multicast_list = &TLan_SetMulticastList;
218 dev->do_ioctl = &TLan_ioctl;
219 +#ifdef HAVE_POLL_CONTROLLER
220 + dev->poll_controller = &TLan_Poll;
222 dev->tx_timeout = &TLan_tx_timeout;
223 dev->watchdog_timeo = TX_TIMEOUT;
225 @@ -1173,7 +1178,14 @@ static irqreturn_t TLan_HandleInterrupt(
227 } /* TLan_HandleInterrupts */
230 +#ifdef HAVE_POLL_CONTROLLER
231 +static void TLan_Poll(struct net_device *dev)
233 + disable_irq(dev->irq);
234 + TLan_HandleInterrupt(dev->irq, dev, NULL);
235 + enable_irq(dev->irq);
240 /***************************************************************
241 --- linux-2.6.0-test1/drivers/net/tulip/tulip_core.c~dump_netdev 2003-07-13 21:34:48.000000000 -0600
242 +++ linux-2.6.0-test1-braam/drivers/net/tulip/tulip_core.c 2003-07-22 01:14:38.000000000 -0600
243 @@ -245,6 +245,7 @@ static void tulip_down(struct net_device
244 static struct net_device_stats *tulip_get_stats(struct net_device *dev);
245 static int private_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
246 static void set_rx_mode(struct net_device *dev);
247 +static void poll_tulip(struct net_device *dev);
251 @@ -1630,6 +1631,9 @@ static int __devinit tulip_init_one (str
252 dev->get_stats = tulip_get_stats;
253 dev->do_ioctl = private_ioctl;
254 dev->set_multicast_list = set_rx_mode;
255 +#ifdef HAVE_POLL_CONTROLLER
256 + dev->poll_controller = &poll_tulip;
259 if (register_netdev(dev))
260 goto err_out_free_ring;
261 @@ -1787,6 +1791,24 @@ static void __devexit tulip_remove_one (
265 +#ifdef HAVE_POLL_CONTROLLER
268 + * Polling 'interrupt' - used by things like netconsole to send skbs
269 + * without having to re-enable interrupts. It's not called while
270 + * the interrupt routine is executing.
273 +static void poll_tulip (struct net_device *dev)
275 + disable_irq(dev->irq);
276 + tulip_interrupt (dev->irq, dev, NULL);
277 + enable_irq(dev->irq);
283 static struct pci_driver tulip_driver = {
285 .id_table = tulip_pci_tbl,
286 --- linux-2.6.0-test1/include/linux/netdevice.h~dump_netdev 2003-07-22 01:14:05.000000000 -0600
287 +++ linux-2.6.0-test1-braam/include/linux/netdevice.h 2003-07-22 01:14:38.000000000 -0600
288 @@ -446,6 +446,9 @@ struct net_device
289 unsigned char *haddr);
290 int (*neigh_setup)(struct net_device *dev, struct neigh_parms *);
291 int (*accept_fastpath)(struct net_device *, struct dst_entry*);
292 +#define HAVE_POLL_CONTROLLER
293 + void (*poll_controller)(struct net_device *dev);
294 + int (*rx_hook)(struct sk_buff *skb);
297 struct net_bridge_port *br_port;
298 --- linux-2.6.0-test1/net/core/dev.c~dump_netdev 2003-07-22 01:14:05.000000000 -0600
299 +++ linux-2.6.0-test1-braam/net/core/dev.c 2003-07-22 01:14:38.000000000 -0600
300 @@ -1349,8 +1349,6 @@ int netif_rx(struct sk_buff *skb)
301 struct softnet_data *queue;
304 - if (!skb->stamp.tv_sec)
305 - do_gettimeofday(&skb->stamp);
308 * The code is rearranged so that the path is the most
309 @@ -1360,6 +1358,13 @@ int netif_rx(struct sk_buff *skb)
310 this_cpu = smp_processor_id();
311 queue = &__get_cpu_var(softnet_data);
313 + if (skb->dev->rx_hook)
317 + if (!skb->stamp.tv_sec )
318 + do_gettimeofday(&skb->stamp);
320 netdev_rx_stat[this_cpu].total++;
321 if (queue->input_pkt_queue.qlen <= netdev_max_backlog) {
322 if (queue->input_pkt_queue.qlen) {
323 @@ -1402,6 +1407,15 @@ drop:
331 + ret = skb->dev->rx_hook(skb);
332 + if (ret == NET_RX_DROP)
334 + goto rx_hook_continue;
338 /* Deliver skb to an old protocol, which is not threaded well