From c9e5777ede291cc8a5e9166e6c1979174b545c96 Mon Sep 17 00:00:00 2001 From: Dariusz Stojaczyk Date: Wed, 1 Aug 2018 11:56:16 +0200 Subject: [PATCH] virtio: clarify feature negotiation failure Change-Id: Ifb1566033569af0b3cf4a9dfbc8094a9883c7622 Signed-off-by: Dariusz Stojaczyk Reviewed-on: https://review.gerrithub.io/420980 Tested-by: SPDK CI Jenkins Chandler-Test-Pool: SPDK Automated Test System Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- lib/virtio/virtio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/virtio/virtio.c b/lib/virtio/virtio.c index 511803ed25..b03034cffc 100644 --- a/lib/virtio/virtio.c +++ b/lib/virtio/virtio.c @@ -266,6 +266,9 @@ virtio_negotiate_features(struct virtio_dev *dev, uint64_t req_features) virtio_dev_set_status(dev, VIRTIO_CONFIG_S_FEATURES_OK); if (!(virtio_dev_get_status(dev) & VIRTIO_CONFIG_S_FEATURES_OK)) { SPDK_ERRLOG("failed to set FEATURES_OK status!\n"); + /* either the device failed, or we offered some features that + * depend on other, not offered features. + */ return -EINVAL; }