Messages in this thread Patch in this message | | | From | Sherry Sun <> | Subject | [PATCH 4/5] misc: vop: set VIRTIO_F_ACCESS_PLATFORM for nocoherent platform | Date | Fri, 25 Sep 2020 15:26:29 +0800 |
| |
Set VIRTIO_F_ACCESS_PLATFORM feature for nocoherent platform, since it needs the DMA API for virtio.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com> Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com> --- drivers/misc/mic/vop/vop_main.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/drivers/misc/mic/vop/vop_main.c b/drivers/misc/mic/vop/vop_main.c index d3645122c983..d609f0dc6124 100644 --- a/drivers/misc/mic/vop/vop_main.c +++ b/drivers/misc/mic/vop/vop_main.c @@ -125,6 +125,9 @@ static void vop_transport_features(struct virtio_device *vdev) * creates virtio rings on preallocated memory. */ __virtio_clear_bit(vdev, VIRTIO_F_RING_PACKED); + + if (!dev_is_dma_coherent(vdev->dev.parent)) + __virtio_set_bit(vdev, VIRTIO_F_ACCESS_PLATFORM); } static int vop_finalize_features(struct virtio_device *vdev) -- 2.17.1
| |