Commit 965b5350 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin

virtio_scsi: correct tags for config space fields

Tag config space fields as having virtio endian-ness.
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
parent a28feb85
...@@ -746,14 +746,14 @@ static struct scsi_host_template virtscsi_host_template = { ...@@ -746,14 +746,14 @@ static struct scsi_host_template virtscsi_host_template = {
#define virtscsi_config_get(vdev, fld) \ #define virtscsi_config_get(vdev, fld) \
({ \ ({ \
typeof(((struct virtio_scsi_config *)0)->fld) __val; \ __virtio_native_type(struct virtio_scsi_config, fld) __val; \
virtio_cread(vdev, struct virtio_scsi_config, fld, &__val); \ virtio_cread(vdev, struct virtio_scsi_config, fld, &__val); \
__val; \ __val; \
}) })
#define virtscsi_config_set(vdev, fld, val) \ #define virtscsi_config_set(vdev, fld, val) \
do { \ do { \
typeof(((struct virtio_scsi_config *)0)->fld) __val = (val); \ __virtio_native_type(struct virtio_scsi_config, fld) __val = (val); \
virtio_cwrite(vdev, struct virtio_scsi_config, fld, &__val); \ virtio_cwrite(vdev, struct virtio_scsi_config, fld, &__val); \
} while(0) } while(0)
......
...@@ -103,16 +103,16 @@ struct virtio_scsi_event { ...@@ -103,16 +103,16 @@ struct virtio_scsi_event {
} __attribute__((packed)); } __attribute__((packed));
struct virtio_scsi_config { struct virtio_scsi_config {
__u32 num_queues; __virtio32 num_queues;
__u32 seg_max; __virtio32 seg_max;
__u32 max_sectors; __virtio32 max_sectors;
__u32 cmd_per_lun; __virtio32 cmd_per_lun;
__u32 event_info_size; __virtio32 event_info_size;
__u32 sense_size; __virtio32 sense_size;
__u32 cdb_size; __virtio32 cdb_size;
__u16 max_channel; __virtio16 max_channel;
__u16 max_target; __virtio16 max_target;
__u32 max_lun; __virtio32 max_lun;
} __attribute__((packed)); } __attribute__((packed));
/* Feature Bits */ /* Feature Bits */
......
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