aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-03-18 02:44:31 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-18 02:44:31 -0400
commit2f633928cbba8a5858bb39b11e7219a41b0fbef5 (patch)
tree9a82f4b7f2c3afe4b0208d8e44ea61bae90a7d22 /drivers/net
parent5e226e4d9016daee170699f8a4188a5505021756 (diff)
parentbde4f8fa8db2abd5ac9c542d76012d0fedab050f (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/fec.c8
-rw-r--r--drivers/net/virtio_net.c22
2 files changed, 23 insertions, 7 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index 0fbf1bbbaee9..d7a3ea88eddb 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -1253,7 +1253,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev)
1253 1253
1254 /* Setup interrupt handlers. */ 1254 /* Setup interrupt handlers. */
1255 for (idp = id; idp->name; idp++) { 1255 for (idp = id; idp->name; idp++) {
1256 if (request_irq(idp->irq, idp->handler, 0, idp->name, dev) != 0) 1256 if (request_irq(idp->irq, idp->handler, IRQF_DISABLED, idp->name, dev) != 0)
1257 printk("FEC: Could not allocate %s IRQ(%d)!\n", idp->name, idp->irq); 1257 printk("FEC: Could not allocate %s IRQ(%d)!\n", idp->name, idp->irq);
1258 } 1258 }
1259 1259
@@ -1382,7 +1382,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev)
1382 1382
1383 /* Setup interrupt handlers. */ 1383 /* Setup interrupt handlers. */
1384 for (idp = id; idp->name; idp++) { 1384 for (idp = id; idp->name; idp++) {
1385 if (request_irq(b+idp->irq, fec_enet_interrupt, 0, idp->name, dev) != 0) 1385 if (request_irq(b+idp->irq, fec_enet_interrupt, IRQF_DISABLED, idp->name, dev) != 0)
1386 printk("FEC: Could not allocate %s IRQ(%d)!\n", idp->name, b+idp->irq); 1386 printk("FEC: Could not allocate %s IRQ(%d)!\n", idp->name, b+idp->irq);
1387 } 1387 }
1388 1388
@@ -1553,7 +1553,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev)
1553 1553
1554 /* Setup interrupt handlers. */ 1554 /* Setup interrupt handlers. */
1555 for (idp = id; idp->name; idp++) { 1555 for (idp = id; idp->name; idp++) {
1556 if (request_irq(b+idp->irq,fec_enet_interrupt,0,idp->name,dev)!=0) 1556 if (request_irq(b+idp->irq, fec_enet_interrupt, IRQF_DISABLED, idp->name,dev) != 0)
1557 printk("FEC: Could not allocate %s IRQ(%d)!\n", idp->name, b+idp->irq); 1557 printk("FEC: Could not allocate %s IRQ(%d)!\n", idp->name, b+idp->irq);
1558 } 1558 }
1559 1559
@@ -1680,7 +1680,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev)
1680 1680
1681 /* Setup interrupt handlers. */ 1681 /* Setup interrupt handlers. */
1682 for (idp = id; idp->name; idp++) { 1682 for (idp = id; idp->name; idp++) {
1683 if (request_irq(b+idp->irq,fec_enet_interrupt,0,idp->name,dev)!=0) 1683 if (request_irq(b+idp->irq, fec_enet_interrupt, IRQF_DISABLED, idp->name,dev) != 0)
1684 printk("FEC: Could not allocate %s IRQ(%d)!\n", 1684 printk("FEC: Could not allocate %s IRQ(%d)!\n",
1685 idp->name, b+idp->irq); 1685 idp->name, b+idp->irq);
1686 } 1686 }
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 19fd4cb0ddf8..b58472cf76f8 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -203,8 +203,11 @@ again:
203 if (received < budget) { 203 if (received < budget) {
204 netif_rx_complete(vi->dev, napi); 204 netif_rx_complete(vi->dev, napi);
205 if (unlikely(!vi->rvq->vq_ops->enable_cb(vi->rvq)) 205 if (unlikely(!vi->rvq->vq_ops->enable_cb(vi->rvq))
206 && netif_rx_reschedule(vi->dev, napi)) 206 && napi_schedule_prep(napi)) {
207 vi->rvq->vq_ops->disable_cb(vi->rvq);
208 __netif_rx_schedule(vi->dev, napi);
207 goto again; 209 goto again;
210 }
208 } 211 }
209 212
210 return received; 213 return received;
@@ -278,10 +281,11 @@ again:
278 pr_debug("%s: virtio not prepared to send\n", dev->name); 281 pr_debug("%s: virtio not prepared to send\n", dev->name);
279 netif_stop_queue(dev); 282 netif_stop_queue(dev);
280 283
281 /* Activate callback for using skbs: if this fails it 284 /* Activate callback for using skbs: if this returns false it
282 * means some were used in the meantime. */ 285 * means some were used in the meantime. */
283 if (unlikely(!vi->svq->vq_ops->enable_cb(vi->svq))) { 286 if (unlikely(!vi->svq->vq_ops->enable_cb(vi->svq))) {
284 printk("Unlikely: restart svq failed\n"); 287 printk("Unlikely: restart svq race\n");
288 vi->svq->vq_ops->disable_cb(vi->svq);
285 netif_start_queue(dev); 289 netif_start_queue(dev);
286 goto again; 290 goto again;
287 } 291 }
@@ -294,6 +298,15 @@ again:
294 return 0; 298 return 0;
295} 299}
296 300
301#ifdef CONFIG_NET_POLL_CONTROLLER
302static void virtnet_netpoll(struct net_device *dev)
303{
304 struct virtnet_info *vi = netdev_priv(dev);
305
306 napi_schedule(&vi->napi);
307}
308#endif
309
297static int virtnet_open(struct net_device *dev) 310static int virtnet_open(struct net_device *dev)
298{ 311{
299 struct virtnet_info *vi = netdev_priv(dev); 312 struct virtnet_info *vi = netdev_priv(dev);
@@ -336,6 +349,9 @@ static int virtnet_probe(struct virtio_device *vdev)
336 dev->stop = virtnet_close; 349 dev->stop = virtnet_close;
337 dev->hard_start_xmit = start_xmit; 350 dev->hard_start_xmit = start_xmit;
338 dev->features = NETIF_F_HIGHDMA; 351 dev->features = NETIF_F_HIGHDMA;
352#ifdef CONFIG_NET_POLL_CONTROLLER
353 dev->poll_controller = virtnet_netpoll;
354#endif
339 SET_NETDEV_DEV(dev, &vdev->dev); 355 SET_NETDEV_DEV(dev, &vdev->dev);
340 356
341 /* Do we support "hardware" checksums? */ 357 /* Do we support "hardware" checksums? */