Displaying 12 results from an estimated 12 matches for "secondary_wwnn".
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
2017 Jan 16
2
[PATCH 2/2] virtio_scsi: Implement fc_host
...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(struct virtio_scsi_config, secondary_wwpn));
Is the endianness correct for big-endian host here?
Thanks,
Paolo
2017 Jan 16
2
[PATCH 2/2] virtio_scsi: Implement fc_host
...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(struct virtio_scsi_config, secondary_wwpn));
Is the endianness correct for big-endian host here?
Thanks,
Paolo
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 26
1
[PATCH v2 2/2] virtio_scsi: Implement fc_host
...+ offsetof(struct virtio_scsi_config, primary_wwnn),
> + &node_name, 8);
> + virtio_cread_bytes(vdev,
> + offsetof(struct virtio_scsi_config, primary_wwpn),
> + &port_name, 8);
> + } else {
> + virtio_cread_bytes(vdev,
> + offsetof(struct virtio_scsi_config, secondary_wwnn),
> + &node_name, 8);
> + virtio_cread_bytes(vdev,
> + offsetof(struct virtio_scsi_config, secondary_wwpn),
> + &port_name, 8);
> + }
This is racy, isn't it? You need to wrap this in a generation check
otherwise read can race with primary_active changing.
And you...
2017 Jan 26
1
[PATCH v2 2/2] virtio_scsi: Implement fc_host
...+ offsetof(struct virtio_scsi_config, primary_wwnn),
> + &node_name, 8);
> + virtio_cread_bytes(vdev,
> + offsetof(struct virtio_scsi_config, primary_wwpn),
> + &port_name, 8);
> + } else {
> + virtio_cread_bytes(vdev,
> + offsetof(struct virtio_scsi_config, secondary_wwnn),
> + &node_name, 8);
> + virtio_cread_bytes(vdev,
> + offsetof(struct virtio_scsi_config, secondary_wwpn),
> + &port_name, 8);
> + }
This is racy, isn't it? You need to wrap this in a generation check
otherwise read can race with primary_active changing.
And you...
2017 Jan 16
0
[PATCH 2/2] virtio_scsi: Implement fc_host
...dev,
> > + 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(struct virtio_scsi_config, secondary_wwpn));
>
> Is the endianness correct for big-endian 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...
2017 Jan 26
0
[PATCH v2 1/2] virtio_scsi: Add fc_host definitions
...index cc18ef8..a26fb31 100644
--- a/include/uapi/linux/virtio_scsi.h
+++ b/include/uapi/linux/virtio_scsi.h
@@ -113,6 +113,11 @@ struct virtio_scsi_config {
__u16 max_channel;
__u16 max_target;
__u32 max_lun;
+ __u8 primary_wwpn[8];
+ __u8 primary_wwnn[8];
+ __u8 secondary_wwpn[8];
+ __u8 secondary_wwnn[8];
+ __u8 primary_active;
} __attribute__((packed));
/* Feature Bits */
@@ -120,6 +125,7 @@ struct virtio_scsi_config {
#define VIRTIO_SCSI_F_HOTPLUG 1
#define VIRTIO_SCSI_F_CHANGE 2
#define VIRTIO_SCSI_F_T10_PI 3
+#define VIRTIO_SCSI_F_...
2017 Jan 16
0
[PATCH 2/2] virtio_scsi: Implement fc_host
...get(vdev, primary_active)) {
+ 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(struct virtio_scsi_config, secondary_wwpn));
+ }
+ fc_host_node_name(shost) = node_name;
+ fc_host_port_name(shost) = port_name;
+ fc_host_port_type(shost) = FC_PORTTYPE_NPORT;
+ fc_host_port_state(shost) = FC_PORTSTATE_ONLINE;
+}
+
static int vi...
2017 Jan 26
0
[PATCH v2 2/2] virtio_scsi: Implement fc_host
...ve)) {
+ virtio_cread_bytes(vdev,
+ offsetof(struct virtio_scsi_config, primary_wwnn),
+ &node_name, 8);
+ virtio_cread_bytes(vdev,
+ offsetof(struct virtio_scsi_config, primary_wwpn),
+ &port_name, 8);
+ } else {
+ virtio_cread_bytes(vdev,
+ offsetof(struct virtio_scsi_config, secondary_wwnn),
+ &node_name, 8);
+ virtio_cread_bytes(vdev,
+ offsetof(struct virtio_scsi_config, secondary_wwpn),
+ &port_name, 8);
+ }
+ fc_host_node_name(shost) = wwn_to_u64(node_name);
+ fc_host_port_name(shost) = wwn_to_u64(port_name);
+ fc_host_port_type(shost) = FC_PORTTYPE_NPORT;
+ fc_hos...