From ac860c86e3be03d1e933611c179dc1fc6dd981cc Mon Sep 17 00:00:00 2001 From: Zhiyong Yang Date: Wed, 21 Mar 2018 11:03:41 +0800 Subject: [PATCH] net/virtio: add check for cvq Add checking for cvq to judge if virtio_ack_link_announce should be called. The existing code doesn't cause issue, and add the checking just to look more reasonable. Signed-off-by: Zhiyong Yang Reviewed-by: Jianfeng Tan Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 4a1971cd59..2ef213d1a5 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1296,7 +1296,8 @@ virtio_interrupt_handler(void *param) if (isr & VIRTIO_NET_S_ANNOUNCE) { virtio_notify_peers(dev); - virtio_ack_link_announce(dev); + if (hw->cvq) + virtio_ack_link_announce(dev); } } -- 2.20.1