Displaying 20 results from an estimated 66 matches for "virtio_scsi_config".
Did you mean:
virtio_pci_config
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 = virtio_cread64(vdev,
> + offsetof(s...
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 = virtio_cread64(vdev,
> + offsetof(s...
2017 Jan 26
6
[PATCH v2 0/2] virtio-scsi: Implement FC_HOST feature
v2: Fix endianness of WWNN/WWPN. [Paolo]
This series implements the proposed fc_host feature of virtio-scsi.
The first patch updates the data structure changes according to the spec
proposal; the second patch actually implements the operations.
Fam Zheng (2):
virtio_scsi: Add fc_host definitions
virtio_scsi: Implement fc_host
drivers/scsi/virtio_scsi.c | 60
2017 Jan 26
6
[PATCH v2 0/2] virtio-scsi: Implement FC_HOST feature
v2: Fix endianness of WWNN/WWPN. [Paolo]
This series implements the proposed fc_host feature of virtio-scsi.
The first patch updates the data structure changes according to the spec
proposal; the second patch actually implements the operations.
Fam Zheng (2):
virtio_scsi: Add fc_host definitions
virtio_scsi: Implement fc_host
drivers/scsi/virtio_scsi.c | 60
2020 Aug 03
0
[PATCH v2 16/24] virtio_scsi: correct tags for config space fields
...irtio_scsi.c b/drivers/scsi/virtio_scsi.c
index 0e0910c5b942..c36aeb9a1330 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -746,14 +746,14 @@ static struct scsi_host_template virtscsi_host_template = {
#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); \
__val; \
})
#define virtscsi_config_set(vdev, fld, val) \
do { \
- typeof(((struct virtio_scsi_config *)0)->fld) __val = (val);...
2020 Aug 05
0
[PATCH v3 16/38] virtio_scsi: correct tags for config space fields
...irtio_scsi.c b/drivers/scsi/virtio_scsi.c
index 0e0910c5b942..c36aeb9a1330 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -746,14 +746,14 @@ static struct scsi_host_template virtscsi_host_template = {
#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); \
__val; \
})
#define virtscsi_config_set(vdev, fld, val) \
do { \
- typeof(((struct virtio_scsi_config *)0)->fld) __val = (val);...
2017 Jan 17
2
[PATCH 2/2] virtio_scsi: Implement fc_host
...host here?
>
> I think so. The fc_host sysfs uses u64 to represent port_name and node_name,
> this patch does the same, so using virtio_* helpers for these fields should
> handle the endianness correctly.
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....
2017 Jan 17
2
[PATCH 2/2] virtio_scsi: Implement fc_host
...host here?
>
> I think so. The fc_host sysfs uses u64 to represent port_name and node_name,
> this patch does the same, so using virtio_* helpers for these fields should
> handle the endianness correctly.
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....
2017 Jan 26
1
[PATCH v2 2/2] virtio_scsi: Implement fc_host
...t_node_name = 1,
> + .show_host_port_name = 1,
> + .show_host_port_type = 1,
> + .show_host_port_state = 1,
> +};
> +
> +static struct scsi_transport_template *virtscsi_fc_transport_template;
> +
> #define virtscsi_config_get(vdev, fld) \
> ({ \
> typeof(((struct virtio_scsi_config *)0)->fld) __val; \
> @@ -956,15 +966,42 @@ static int virtscsi_init(struct virtio_device *vdev,
> return err;
> }
>
> +static void virtscsi_update_fc_host_attrs(struct virtio_device *vdev)
> +{
> + struct Scsi_Host *shost = vdev->priv;
> + u8 node_name[8], port_n...
2017 Jan 26
1
[PATCH v2 2/2] virtio_scsi: Implement fc_host
...t_node_name = 1,
> + .show_host_port_name = 1,
> + .show_host_port_type = 1,
> + .show_host_port_state = 1,
> +};
> +
> +static struct scsi_transport_template *virtscsi_fc_transport_template;
> +
> #define virtscsi_config_get(vdev, fld) \
> ({ \
> typeof(((struct virtio_scsi_config *)0)->fld) __val; \
> @@ -956,15 +966,42 @@ static int virtscsi_init(struct virtio_device *vdev,
> return err;
> }
>
> +static void virtscsi_update_fc_host_attrs(struct virtio_device *vdev)
> +{
> + struct Scsi_Host *shost = vdev->priv;
> + u8 node_name[8], port_n...
2017 Jan 16
9
[PATCH 0/2] virtio-scsi: Implement FC_HOST feature
This series implements the proposed fc_host feature of virtio-scsi.
The first patch updates the data structure changes according to the spec
proposal; the second patch actually implements the operations.
Fam Zheng (2):
virtio_scsi: Add fc_host definitions
virtio_scsi: Implement fc_host
drivers/scsi/virtio_scsi.c | 55 +++++++++++++++++++++++++++++++++++++++-
2017 Jan 16
9
[PATCH 0/2] virtio-scsi: Implement FC_HOST feature
This series implements the proposed fc_host feature of virtio-scsi.
The first patch updates the data structure changes according to the spec
proposal; the second patch actually implements the operations.
Fam Zheng (2):
virtio_scsi: Add fc_host definitions
virtio_scsi: Implement fc_host
drivers/scsi/virtio_scsi.c | 55 +++++++++++++++++++++++++++++++++++++++-
2017 Jan 16
0
[PATCH 2/2] virtio_scsi: Implement fc_host
On Mon, 01/16 17:45, Paolo Bonzini wrote:
>
>
> 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 = virtio_cre...
2017 Jan 16
0
[PATCH 2/2] virtio_scsi: Implement fc_host
...tion_template virtscsi_fc_template = {
+ .show_host_node_name = 1,
+ .show_host_port_name = 1,
+ .show_host_port_type = 1,
+ .show_host_port_state = 1,
+};
+
+static struct scsi_transport_template *virtscsi_fc_transport_template;
+
#define virtscsi_config_get(vdev, fld) \
({ \
typeof(((struct virtio_scsi_config *)0)->fld) __val; \
@@ -956,15 +966,38 @@ static int virtscsi_init(struct virtio_device *vdev,
return err;
}
+static void virtscsi_update_fc_host_attrs(struct virtio_device *vdev)
+{
+ struct Scsi_Host *shost = vdev->priv;
+ u64 node_name, port_name;
+
+ if (virtscsi_config_get(vdev, pri...
2017 Jan 26
0
[PATCH v2 2/2] virtio_scsi: Implement fc_host
...tion_template virtscsi_fc_template = {
+ .show_host_node_name = 1,
+ .show_host_port_name = 1,
+ .show_host_port_type = 1,
+ .show_host_port_state = 1,
+};
+
+static struct scsi_transport_template *virtscsi_fc_transport_template;
+
#define virtscsi_config_get(vdev, fld) \
({ \
typeof(((struct virtio_scsi_config *)0)->fld) __val; \
@@ -956,15 +966,42 @@ static int virtscsi_init(struct virtio_device *vdev,
return err;
}
+static void virtscsi_update_fc_host_attrs(struct virtio_device *vdev)
+{
+ struct Scsi_Host *shost = vdev->priv;
+ u8 node_name[8], port_name[8];
+
+ if (virtscsi_config_get(vdev...
2012 Jul 03
2
[PATCH v2] virtio-scsi: hotplug support for virtio-scsi
..._SIZE(features),
.driver.name = KBUILD_MODNAME,
.driver.owner = THIS_MODULE,
.id_table = id_table,
diff --git a/include/linux/virtio_scsi.h b/include/linux/virtio_scsi.h
index 8ddeafd..dc8d305 100644
--- a/include/linux/virtio_scsi.h
+++ b/include/linux/virtio_scsi.h
@@ -69,6 +69,10 @@ struct virtio_scsi_config {
u32 max_lun;
} __packed;
+/* Feature Bits */
+#define VIRTIO_SCSI_F_INOUT 0
+#define VIRTIO_SCSI_F_HOTPLUG 1
+
/* Response codes */
#define VIRTIO_SCSI_S_OK 0
#define VIRTIO_SCSI_S_OVERRUN 1
@@ -105,6 +109,11 @@ st...
2012 Jul 03
2
[PATCH v2] virtio-scsi: hotplug support for virtio-scsi
..._SIZE(features),
.driver.name = KBUILD_MODNAME,
.driver.owner = THIS_MODULE,
.id_table = id_table,
diff --git a/include/linux/virtio_scsi.h b/include/linux/virtio_scsi.h
index 8ddeafd..dc8d305 100644
--- a/include/linux/virtio_scsi.h
+++ b/include/linux/virtio_scsi.h
@@ -69,6 +69,10 @@ struct virtio_scsi_config {
u32 max_lun;
} __packed;
+/* Feature Bits */
+#define VIRTIO_SCSI_F_INOUT 0
+#define VIRTIO_SCSI_F_HOTPLUG 1
+
/* Response codes */
#define VIRTIO_SCSI_S_OK 0
#define VIRTIO_SCSI_S_OVERRUN 1
@@ -105,6 +109,11 @@ st...
2012 Jul 05
1
[PATCH v3] virtio-scsi: hotplug support for virtio-scsi
..._SIZE(features),
.driver.name = KBUILD_MODNAME,
.driver.owner = THIS_MODULE,
.id_table = id_table,
diff --git a/include/linux/virtio_scsi.h b/include/linux/virtio_scsi.h
index 8ddeafd..dc8d305 100644
--- a/include/linux/virtio_scsi.h
+++ b/include/linux/virtio_scsi.h
@@ -69,6 +69,10 @@ struct virtio_scsi_config {
u32 max_lun;
} __packed;
+/* Feature Bits */
+#define VIRTIO_SCSI_F_INOUT 0
+#define VIRTIO_SCSI_F_HOTPLUG 1
+
/* Response codes */
#define VIRTIO_SCSI_S_OK 0
#define VIRTIO_SCSI_S_OVERRUN 1
@@ -105,6 +109,11 @@ st...
2012 Jul 05
1
[PATCH v3] virtio-scsi: hotplug support for virtio-scsi
..._SIZE(features),
.driver.name = KBUILD_MODNAME,
.driver.owner = THIS_MODULE,
.id_table = id_table,
diff --git a/include/linux/virtio_scsi.h b/include/linux/virtio_scsi.h
index 8ddeafd..dc8d305 100644
--- a/include/linux/virtio_scsi.h
+++ b/include/linux/virtio_scsi.h
@@ -69,6 +69,10 @@ struct virtio_scsi_config {
u32 max_lun;
} __packed;
+/* Feature Bits */
+#define VIRTIO_SCSI_F_INOUT 0
+#define VIRTIO_SCSI_F_HOTPLUG 1
+
/* Response codes */
#define VIRTIO_SCSI_S_OK 0
#define VIRTIO_SCSI_S_OVERRUN 1
@@ -105,6 +109,11 @@ st...
2017 Jan 17
0
[PATCH 2/2] virtio_scsi: Implement fc_host
...hink so. The fc_host sysfs uses u64 to represent port_name and node_name,
> > this patch does the same, so using virtio_* helpers for these fields should
> > handle the endianness correctly.
>
> 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
>...