Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[linux-2.6-microblaze.git] / drivers / vhost / net.c
index eea902b..531a00d 100644 (file)
@@ -73,7 +73,7 @@ enum {
        VHOST_NET_FEATURES = VHOST_FEATURES |
                         (1ULL << VHOST_NET_F_VIRTIO_NET_HDR) |
                         (1ULL << VIRTIO_NET_F_MRG_RXBUF) |
-                        (1ULL << VIRTIO_F_IOMMU_PLATFORM)
+                        (1ULL << VIRTIO_F_ACCESS_PLATFORM)
 };
 
 enum {
@@ -1615,21 +1615,6 @@ done:
        return err;
 }
 
-static int vhost_net_set_backend_features(struct vhost_net *n, u64 features)
-{
-       int i;
-
-       mutex_lock(&n->dev.mutex);
-       for (i = 0; i < VHOST_NET_VQ_MAX; ++i) {
-               mutex_lock(&n->vqs[i].vq.mutex);
-               n->vqs[i].vq.acked_backend_features = features;
-               mutex_unlock(&n->vqs[i].vq.mutex);
-       }
-       mutex_unlock(&n->dev.mutex);
-
-       return 0;
-}
-
 static int vhost_net_set_features(struct vhost_net *n, u64 features)
 {
        size_t vhost_hlen, sock_hlen, hdr_len;
@@ -1653,7 +1638,7 @@ static int vhost_net_set_features(struct vhost_net *n, u64 features)
            !vhost_log_access_ok(&n->dev))
                goto out_unlock;
 
-       if ((features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))) {
+       if ((features & (1ULL << VIRTIO_F_ACCESS_PLATFORM))) {
                if (vhost_init_device_iotlb(&n->dev, true))
                        goto out_unlock;
        }
@@ -1730,7 +1715,8 @@ static long vhost_net_ioctl(struct file *f, unsigned int ioctl,
                        return -EFAULT;
                if (features & ~VHOST_NET_BACKEND_FEATURES)
                        return -EOPNOTSUPP;
-               return vhost_net_set_backend_features(n, features);
+               vhost_set_backend_features(&n->dev, features);
+               return 0;
        case VHOST_RESET_OWNER:
                return vhost_net_reset_owner(n);
        case VHOST_SET_OWNER: