virtio-net: on tx, only call napi_disable if tx napi is on
authorWillem de Bruijn <willemb@google.com>
Tue, 25 Apr 2017 19:59:17 +0000 (15:59 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Apr 2017 18:50:06 +0000 (14:50 -0400)
commit78a57b482aa53b040fbc2b2ef0208b54f004161b
tree66f453e70af121cbe5bd0965c3a59b61ec5f6bcd
parent1f7fe5d492a4f3f7ed74b8e15548ced38f5a59be
virtio-net: on tx, only call napi_disable if tx napi is on

As of tx napi, device down (`ip link set dev $dev down`) hangs unless
tx napi is enabled. Else napi_enable is not called, so napi_disable
will spin on test_and_set_bit NAPI_STATE_SCHED.

Only call napi_disable if tx napi is enabled.

Fixes: 5a719c2552ca ("virtio-net: transmit napi")
Reported-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c