search for: virtio_cread_le_featur

Displaying 3 results from an estimated 3 matches for "virtio_cread_le_featur".

2020 Aug 05
0
[PATCH v3 28/38] virtio_config: add virtio_cread_le_feature
...include/linux/virtio_config.h index 5b5196fec899..cc7a2b1fd7b2 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h @@ -555,4 +555,14 @@ static inline void virtio_cwrite64(struct virtio_device *vdev, _r; \ }) +/* Conditional config space accessors. */ +#define virtio_cread_le_feature(vdev, fbit, structname, member, ptr) \ + ({ \ + int _r = 0; \ + if (!virtio_has_feature(vdev, fbit)) \ + _r = -ENOENT; \ + else \ + virtio_cread_le((vdev), structname, member, ptr); \ + _r; \ + }) #endif /* _LINUX_VIRTIO_CONFIG_H */ -- MST
2020 Aug 05
0
[PATCH v3 36/38] virtio-iommu: convert to LE accessors
...{ ret = -EINVAL; @@ -1022,25 +1022,25 @@ static int viommu_probe(struct virtio_device *vdev) viommu->last_domain = ~0U; /* Optional features */ - virtio_cread_feature(vdev, VIRTIO_IOMMU_F_INPUT_RANGE, - struct virtio_iommu_config, input_range.start, - &input_start); + virtio_cread_le_feature(vdev, VIRTIO_IOMMU_F_INPUT_RANGE, + struct virtio_iommu_config, input_range.start, + &input_start); - virtio_cread_feature(vdev, VIRTIO_IOMMU_F_INPUT_RANGE, - struct virtio_iommu_config, input_range.end, - &input_end); + virtio_cread_le_feature(vdev, VIRTIO_IOMMU_F_IN...
2020 Aug 11
1
[GIT PULL] virtio: features, fixes
...x endian-ness of config space virtio_config: cread/write cleanup virtio_config: rewrite using _Generic virtio_config: disallow native type fields (again) virtio_config: LE config space accessors virtio_caif: correct tags for config space fields virtio_config: add virtio_cread_le_feature virtio_balloon: use LE config space accesses virtio_input: convert to LE accessors virtio_fs: convert to LE accessors virtio_crypto: convert to LE accessors virtio_pmem: convert to LE accessors drm/virtio: convert to LE accessors virtio_mem: convert to LE...