summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2019-01-30 13:36:57 +0000
committerDamjan Marion <dmarion@me.com>2019-01-30 19:49:30 +0000
commit0e2bc63ba99b1ea62dc6f316491fad0b5c206cfa (patch)
tree2ab88d019977e56cd6fe1b1799e47b3ab273baa3 /src/vnet
parent37029305c671f4e2d091d6f6c22142634e409043 (diff)
virtio: fix the device order (legacy or modern)
Change-Id: I60f88d50f062b004e6dea487bd627d303d0a5e75 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/devices/virtio/pci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/devices/virtio/pci.c b/src/vnet/devices/virtio/pci.c
index 0ff453eb204..a90dca47218 100644
--- a/src/vnet/devices/virtio/pci.c
+++ b/src/vnet/devices/virtio/pci.c
@@ -646,15 +646,15 @@ virtio_pci_read_caps (vlib_main_t * vm, virtio_if_t * vif)
pos = cap.cap_next;
}
- if (!pci_cfg)
- clib_error_return (error, "modern virtio pci device found");
-
if (common_cfg == 0 || notify_base == 0 || dev_cfg == 0 || isr == 0)
{
virtio_log_debug (vim, vif, "legacy virtio pci device found");
return error;
}
+ if (!pci_cfg)
+ clib_error_return (error, "modern virtio pci device found");
+
virtio_log_debug (vim, vif, "transitional virtio pci device found");
return error;
}