vDPA/ifcvf: get_driver_features from virtio registers
[linux-2.6-microblaze.git] / drivers / vdpa / ifcvf / ifcvf_main.c
index 1357c67..4588484 100644 (file)
@@ -410,7 +410,7 @@ static u64 ifcvf_vdpa_get_device_features(struct vdpa_device *vdpa_dev)
        u64 features;
 
        if (type == VIRTIO_ID_NET || type == VIRTIO_ID_BLOCK)
-               features = ifcvf_get_features(vf);
+               features = ifcvf_get_dev_features(vf);
        else {
                features = 0;
                IFCVF_ERR(pdev, "VIRTIO ID %u not supported\n", vf->dev_type);
@@ -428,7 +428,7 @@ static int ifcvf_vdpa_set_driver_features(struct vdpa_device *vdpa_dev, u64 feat
        if (ret)
                return ret;
 
-       vf->req_features = features;
+       ifcvf_set_driver_features(vf, features);
 
        return 0;
 }
@@ -436,8 +436,11 @@ static int ifcvf_vdpa_set_driver_features(struct vdpa_device *vdpa_dev, u64 feat
 static u64 ifcvf_vdpa_get_driver_features(struct vdpa_device *vdpa_dev)
 {
        struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev);
+       u64 features;
+
+       features = ifcvf_get_driver_features(vf);
 
-       return vf->req_features;
+       return features;
 }
 
 static u8 ifcvf_vdpa_get_status(struct vdpa_device *vdpa_dev)