diff -Nru linux-lts-backport-natty-2.6.38/debian/changelog linux-lts-backport-natty-2.6.38/debian/changelog --- linux-lts-backport-natty-2.6.38/debian/changelog 2011-02-07 06:12:29.000000000 -0500 +++ linux-lts-backport-natty-2.6.38/debian/changelog 2011-02-08 16:51:23.000000000 -0500 @@ -1,3 +1,14 @@ +linux-lts-backport-natty (2.6.38-2.29~lucid3) lucid; urgency=low + + * Patch virtio-net.c to add schedule check to napi_enable call + - Based on a patch from Bruce Rogers of Novell. + - His patch is purported to be distributed in SLES. + - http://kerneltrap.org/mailarchive/linux-netdev/2010/6/4/6278660 + * Tracking Bug + - LP: #579276 + + -- Ken Stailey Tue, 08 Feb 2011 12:33:57 -0500 + linux-lts-backport-natty (2.6.38-2.29~lucid1) lucid; urgency=low [ Andy Whitcroft ] diff -Nru linux-lts-backport-natty-2.6.38/debian.master/changelog linux-lts-backport-natty-2.6.38/debian.master/changelog --- linux-lts-backport-natty-2.6.38/debian.master/changelog 2011-02-07 05:49:44.000000000 -0500 +++ linux-lts-backport-natty-2.6.38/debian.master/changelog 2011-02-08 16:50:17.000000000 -0500 @@ -1,4 +1,15 @@ -linux (2.6.38-2.29) natty; urgency=low +linux-lts-backport-natty (2.6.38-2.29~lucid3) lucid; urgency=low + + * Patch virtio-net.c to add schedule check to napi_enable call + - Based on a patch from Bruce Rogers of Novell. + - His patch is purported to be distributed in SLES. + - http://kerneltrap.org/mailarchive/linux-netdev/2010/6/4/6278660 + * Tracking Bug + - LP: #579276 + + -- Ken Stailey Tue, 08 Feb 2011 12:33:57 -0500 + +linux-lts-backport-natty (2.6.38-2.29~lucid1) lucid; urgency=low [ Andy Whitcroft ] diff -Nru linux-lts-backport-natty-2.6.38/debian.natty/changelog linux-lts-backport-natty-2.6.38/debian.natty/changelog --- linux-lts-backport-natty-2.6.38/debian.natty/changelog 2011-02-07 05:49:44.000000000 -0500 +++ linux-lts-backport-natty-2.6.38/debian.natty/changelog 2011-02-08 16:50:01.000000000 -0500 @@ -1,3 +1,14 @@ +linux-lts-backport-natty (2.6.38-2.29~lucid3) lucid; urgency=low + + * Patch virtio-net.c to add schedule check to napi_enable call + - Based on a patch from Bruce Rogers of Novell. + - His patch is purported to be distributed in SLES. + - http://kerneltrap.org/mailarchive/linux-netdev/2010/6/4/6278660 + * Tracking Bug + - LP: #579276 + + -- Ken Stailey Tue, 08 Feb 2011 12:33:57 -0500 + linux-lts-backport-natty (2.6.38-2.29~lucid1) lucid; urgency=low [ Andy Whitcroft ] diff -Nru linux-lts-backport-natty-2.6.38/drivers/net/virtio_net.c linux-lts-backport-natty-2.6.38/drivers/net/virtio_net.c --- linux-lts-backport-natty-2.6.38/drivers/net/virtio_net.c 2011-01-27 05:07:06.000000000 -0500 +++ linux-lts-backport-natty-2.6.38/drivers/net/virtio_net.c 2011-02-08 16:50:56.000000000 -0500 @@ -446,6 +446,20 @@ } } +static void virtnet_napi_enable(struct virtnet_info *vi) +{ + napi_enable(&vi->napi); + + /* If all buffers were filled by other side before we napi_enabled, we + * won't get another interrupt, so process any outstanding packets + * now. virtnet_poll wants re-enable the queue, so we disable here. + * We synchronize against interrupts via NAPI_STATE_SCHED */ + if (napi_schedule_prep(&vi->napi)) { + virtqueue_disable_cb(vi->rvq); + __napi_schedule(&vi->napi); + } +} + static void refill_work(struct work_struct *work) { struct virtnet_info *vi; @@ -454,7 +468,7 @@ vi = container_of(work, struct virtnet_info, refill.work); napi_disable(&vi->napi); still_empty = !try_fill_recv(vi, GFP_KERNEL); - napi_enable(&vi->napi); + virtnet_napi_enable(vi); /* In theory, this can happen: if we don't get any buffers in * we will *never* try to fill again. */ @@ -638,16 +652,7 @@ { struct virtnet_info *vi = netdev_priv(dev); - napi_enable(&vi->napi); - - /* If all buffers were filled by other side before we napi_enabled, we - * won't get another interrupt, so process any outstanding packets - * now. virtnet_poll wants re-enable the queue, so we disable here. - * We synchronize against interrupts via NAPI_STATE_SCHED */ - if (napi_schedule_prep(&vi->napi)) { - virtqueue_disable_cb(vi->rvq); - __napi_schedule(&vi->napi); - } + virtnet_napi_enable(vi); return 0; }