Commit b13a5407 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin

virtio_crypto: convert to LE accessors

Virtio crypto is modern-only. Use LE accessors for config space.
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 2c0349ec
...@@ -204,8 +204,8 @@ static int virtcrypto_update_status(struct virtio_crypto *vcrypto) ...@@ -204,8 +204,8 @@ static int virtcrypto_update_status(struct virtio_crypto *vcrypto)
u32 status; u32 status;
int err; int err;
virtio_cread(vcrypto->vdev, virtio_cread_le(vcrypto->vdev,
struct virtio_crypto_config, status, &status); struct virtio_crypto_config, status, &status);
/* /*
* Unknown status bits would be a host error and the driver * Unknown status bits would be a host error and the driver
...@@ -323,31 +323,31 @@ static int virtcrypto_probe(struct virtio_device *vdev) ...@@ -323,31 +323,31 @@ static int virtcrypto_probe(struct virtio_device *vdev)
if (!vcrypto) if (!vcrypto)
return -ENOMEM; return -ENOMEM;
virtio_cread(vdev, struct virtio_crypto_config, virtio_cread_le(vdev, struct virtio_crypto_config,
max_dataqueues, &max_data_queues); max_dataqueues, &max_data_queues);
if (max_data_queues < 1) if (max_data_queues < 1)
max_data_queues = 1; max_data_queues = 1;
virtio_cread(vdev, struct virtio_crypto_config, virtio_cread_le(vdev, struct virtio_crypto_config,
max_cipher_key_len, &max_cipher_key_len); max_cipher_key_len, &max_cipher_key_len);
virtio_cread(vdev, struct virtio_crypto_config, virtio_cread_le(vdev, struct virtio_crypto_config,
max_auth_key_len, &max_auth_key_len); max_auth_key_len, &max_auth_key_len);
virtio_cread(vdev, struct virtio_crypto_config, virtio_cread_le(vdev, struct virtio_crypto_config,
max_size, &max_size); max_size, &max_size);
virtio_cread(vdev, struct virtio_crypto_config, virtio_cread_le(vdev, struct virtio_crypto_config,
crypto_services, &crypto_services); crypto_services, &crypto_services);
virtio_cread(vdev, struct virtio_crypto_config, virtio_cread_le(vdev, struct virtio_crypto_config,
cipher_algo_l, &cipher_algo_l); cipher_algo_l, &cipher_algo_l);
virtio_cread(vdev, struct virtio_crypto_config, virtio_cread_le(vdev, struct virtio_crypto_config,
cipher_algo_h, &cipher_algo_h); cipher_algo_h, &cipher_algo_h);
virtio_cread(vdev, struct virtio_crypto_config, virtio_cread_le(vdev, struct virtio_crypto_config,
hash_algo, &hash_algo); hash_algo, &hash_algo);
virtio_cread(vdev, struct virtio_crypto_config, virtio_cread_le(vdev, struct virtio_crypto_config,
mac_algo_l, &mac_algo_l); mac_algo_l, &mac_algo_l);
virtio_cread(vdev, struct virtio_crypto_config, virtio_cread_le(vdev, struct virtio_crypto_config,
mac_algo_h, &mac_algo_h); mac_algo_h, &mac_algo_h);
virtio_cread(vdev, struct virtio_crypto_config, virtio_cread_le(vdev, struct virtio_crypto_config,
aead_algo, &aead_algo); aead_algo, &aead_algo);
/* Add virtio crypto device to global table */ /* Add virtio crypto device to global table */
err = virtcrypto_devmgr_add_dev(vcrypto); err = virtcrypto_devmgr_add_dev(vcrypto);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment