Displaying 5 results from an estimated 5 matches for "0cd".
Did you mean:
03d
2017 Jan 17
2
[PATCH 2/2] virtio_scsi: Implement fc_host
...rrectly.
I was suspicious about it because they are defined as "u8 x[8]" in the
virtio_scsi_config struct. So you would need to read with
virtio_cread_bytes and pass the result to wwn_to_u64.
For example, if you have 0x500123456789abcd this would be
0x50 0x01 0x23 0x45 0x67 0x89 0xab 0cd
in virtio_scsi_config, and then virtio_cread64 would read it as a
little-endian u64, 0xcdab896745230150. Maybe your QEMU patch is also
writing things as little-endian 64-bit integers, rather than 8-element
arrays of bytes?
Paolo
> Maybe we should use u64 in struct virtio_scsi_config as well?
2017 Jan 17
2
[PATCH 2/2] virtio_scsi: Implement fc_host
...rrectly.
I was suspicious about it because they are defined as "u8 x[8]" in the
virtio_scsi_config struct. So you would need to read with
virtio_cread_bytes and pass the result to wwn_to_u64.
For example, if you have 0x500123456789abcd this would be
0x50 0x01 0x23 0x45 0x67 0x89 0xab 0cd
in virtio_scsi_config, and then virtio_cread64 would read it as a
little-endian u64, 0xcdab896745230150. Maybe your QEMU patch is also
writing things as little-endian 64-bit integers, rather than 8-element
arrays of bytes?
Paolo
> Maybe we should use u64 in struct virtio_scsi_config as well?
2017 Jan 16
2
[PATCH 2/2] virtio_scsi: Implement fc_host
On 16/01/2017 17:04, Fam Zheng wrote:
> + node_name = virtio_cread64(vdev,
> + offsetof(struct virtio_scsi_config, primary_wwnn));
> + port_name = virtio_cread64(vdev,
> + offsetof(struct virtio_scsi_config, primary_wwpn));
> + } else {
> + node_name = virtio_cread64(vdev,
> + offsetof(struct virtio_scsi_config, secondary_wwnn));
> + port_name =
2017 Jan 17
0
[PATCH 2/2] virtio_scsi: Implement fc_host
...ut it because they are defined as "u8 x[8]" in the
> virtio_scsi_config struct. So you would need to read with
> virtio_cread_bytes and pass the result to wwn_to_u64.
>
> For example, if you have 0x500123456789abcd this would be
>
> 0x50 0x01 0x23 0x45 0x67 0x89 0xab 0cd
>
> in virtio_scsi_config, and then virtio_cread64 would read it as a
> little-endian u64, 0xcdab896745230150. Maybe your QEMU patch is also
> writing things as little-endian 64-bit integers, rather than 8-element
> arrays of bytes?
Yes, they all used 64-bit integers in a "le...
2017 Jan 16
2
[PATCH 2/2] virtio_scsi: Implement fc_host
On 16/01/2017 17:04, Fam Zheng wrote:
> + node_name = virtio_cread64(vdev,
> + offsetof(struct virtio_scsi_config, primary_wwnn));
> + port_name = virtio_cread64(vdev,
> + offsetof(struct virtio_scsi_config, primary_wwpn));
> + } else {
> + node_name = virtio_cread64(vdev,
> + offsetof(struct virtio_scsi_config, secondary_wwnn));
> + port_name =