diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2011-10-11 18:55:11 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-10-20 11:13:55 -0400 |
commit | 2d63673b4d469cf2ddba309a916090b54e31cc35 (patch) | |
tree | c6d4b607abcf218f5d51f3d298be0230a72dab80 | |
parent | 00c31889f7513e9ffa6b2b4de8ad6d7f59a61c80 (diff) |
[SCSI] iscsi class: fix vlan configuration
Userspace was sending the priority/id part of the vlan tag
and sysfs was displaying the id in the vlan file. This
renames the vlan sysfs file to vlan_id to reflect that it
was showing the id and to match the vlan_priority file.
This also adds a ISCSI_NET_PARAM_VLAN_TAG iscsi nl command
to relfect that we are sending down the vlan/priority
part of the tag.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 4 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_iscsi.c | 6 | ||||
-rw-r--r-- | include/scsi/iscsi_if.h | 9 |
3 files changed, 10 insertions, 9 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index ce20dab75369..ba6a8f3ee6fa 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -718,7 +718,7 @@ static void qla4xxx_set_ipv6(struct scsi_qla_host *ha, | |||
718 | qla4xxx_destroy_ipv6_iface(ha); | 718 | qla4xxx_destroy_ipv6_iface(ha); |
719 | } | 719 | } |
720 | break; | 720 | break; |
721 | case ISCSI_NET_PARAM_VLAN_ID: | 721 | case ISCSI_NET_PARAM_VLAN_TAG: |
722 | if (iface_param->len != sizeof(init_fw_cb->ipv6_vlan_tag)) | 722 | if (iface_param->len != sizeof(init_fw_cb->ipv6_vlan_tag)) |
723 | break; | 723 | break; |
724 | init_fw_cb->ipv6_vlan_tag = | 724 | init_fw_cb->ipv6_vlan_tag = |
@@ -790,7 +790,7 @@ static void qla4xxx_set_ipv4(struct scsi_qla_host *ha, | |||
790 | qla4xxx_destroy_ipv4_iface(ha); | 790 | qla4xxx_destroy_ipv4_iface(ha); |
791 | } | 791 | } |
792 | break; | 792 | break; |
793 | case ISCSI_NET_PARAM_VLAN_ID: | 793 | case ISCSI_NET_PARAM_VLAN_TAG: |
794 | if (iface_param->len != sizeof(init_fw_cb->ipv4_vlan_tag)) | 794 | if (iface_param->len != sizeof(init_fw_cb->ipv4_vlan_tag)) |
795 | break; | 795 | break; |
796 | init_fw_cb->ipv4_vlan_tag = | 796 | init_fw_cb->ipv4_vlan_tag = |
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 142a09a3afbf..1bcd65a509e6 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c | |||
@@ -322,7 +322,7 @@ iscsi_iface_net_attr(ipv6_iface, link_local_autocfg, | |||
322 | 322 | ||
323 | /* common read only iface attribute */ | 323 | /* common read only iface attribute */ |
324 | iscsi_iface_net_attr(iface, enabled, ISCSI_NET_PARAM_IFACE_ENABLE); | 324 | iscsi_iface_net_attr(iface, enabled, ISCSI_NET_PARAM_IFACE_ENABLE); |
325 | iscsi_iface_net_attr(iface, vlan, ISCSI_NET_PARAM_VLAN_ID); | 325 | iscsi_iface_net_attr(iface, vlan_id, ISCSI_NET_PARAM_VLAN_ID); |
326 | iscsi_iface_net_attr(iface, vlan_priority, ISCSI_NET_PARAM_VLAN_PRIORITY); | 326 | iscsi_iface_net_attr(iface, vlan_priority, ISCSI_NET_PARAM_VLAN_PRIORITY); |
327 | iscsi_iface_net_attr(iface, vlan_enabled, ISCSI_NET_PARAM_VLAN_ENABLED); | 327 | iscsi_iface_net_attr(iface, vlan_enabled, ISCSI_NET_PARAM_VLAN_ENABLED); |
328 | iscsi_iface_net_attr(iface, mtu, ISCSI_NET_PARAM_MTU); | 328 | iscsi_iface_net_attr(iface, mtu, ISCSI_NET_PARAM_MTU); |
@@ -338,7 +338,7 @@ static mode_t iscsi_iface_attr_is_visible(struct kobject *kobj, | |||
338 | 338 | ||
339 | if (attr == &dev_attr_iface_enabled.attr) | 339 | if (attr == &dev_attr_iface_enabled.attr) |
340 | param = ISCSI_NET_PARAM_IFACE_ENABLE; | 340 | param = ISCSI_NET_PARAM_IFACE_ENABLE; |
341 | else if (attr == &dev_attr_iface_vlan.attr) | 341 | else if (attr == &dev_attr_iface_vlan_id.attr) |
342 | param = ISCSI_NET_PARAM_VLAN_ID; | 342 | param = ISCSI_NET_PARAM_VLAN_ID; |
343 | else if (attr == &dev_attr_iface_vlan_priority.attr) | 343 | else if (attr == &dev_attr_iface_vlan_priority.attr) |
344 | param = ISCSI_NET_PARAM_VLAN_PRIORITY; | 344 | param = ISCSI_NET_PARAM_VLAN_PRIORITY; |
@@ -382,7 +382,7 @@ static mode_t iscsi_iface_attr_is_visible(struct kobject *kobj, | |||
382 | 382 | ||
383 | static struct attribute *iscsi_iface_attrs[] = { | 383 | static struct attribute *iscsi_iface_attrs[] = { |
384 | &dev_attr_iface_enabled.attr, | 384 | &dev_attr_iface_enabled.attr, |
385 | &dev_attr_iface_vlan.attr, | 385 | &dev_attr_iface_vlan_id.attr, |
386 | &dev_attr_iface_vlan_priority.attr, | 386 | &dev_attr_iface_vlan_priority.attr, |
387 | &dev_attr_iface_vlan_enabled.attr, | 387 | &dev_attr_iface_vlan_enabled.attr, |
388 | &dev_attr_ipv4_iface_ipaddress.attr, | 388 | &dev_attr_ipv4_iface_ipaddress.attr, |
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index 706a1bb1c59b..2703e3bedbf5 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
@@ -311,10 +311,11 @@ enum iscsi_net_param { | |||
311 | ISCSI_NET_PARAM_VLAN_ID = 13, | 311 | ISCSI_NET_PARAM_VLAN_ID = 13, |
312 | ISCSI_NET_PARAM_VLAN_PRIORITY = 14, | 312 | ISCSI_NET_PARAM_VLAN_PRIORITY = 14, |
313 | ISCSI_NET_PARAM_VLAN_ENABLED = 15, | 313 | ISCSI_NET_PARAM_VLAN_ENABLED = 15, |
314 | ISCSI_NET_PARAM_IFACE_TYPE = 16, | 314 | ISCSI_NET_PARAM_VLAN_TAG = 16, |
315 | ISCSI_NET_PARAM_IFACE_NAME = 17, | 315 | ISCSI_NET_PARAM_IFACE_TYPE = 17, |
316 | ISCSI_NET_PARAM_MTU = 18, | 316 | ISCSI_NET_PARAM_IFACE_NAME = 18, |
317 | ISCSI_NET_PARAM_PORT = 19, | 317 | ISCSI_NET_PARAM_MTU = 19, |
318 | ISCSI_NET_PARAM_PORT = 20, | ||
318 | }; | 319 | }; |
319 | 320 | ||
320 | enum iscsi_conn_state { | 321 | enum iscsi_conn_state { |