diff options
author | Vikas Chaudhary <vikas.chaudhary@qlogic.com> | 2011-08-01 06:26:13 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-08-27 10:36:29 -0400 |
commit | 943c157b7934a3b9fcf5290328be3b84d1a1a104 (patch) | |
tree | 3ff9f296e1e73072d6b3dbb8c58c621863865746 /drivers/scsi/qla4xxx | |
parent | 8c7d40fb6b51ef37df64af0e6add35baaf48896c (diff) |
[SCSI] qla4xxx: Added support to update mtu
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla4xxx')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_def.h | 1 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_mbx.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 12 |
3 files changed, 15 insertions, 0 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h index 30efb6c6594c..90dc621a926a 100644 --- a/drivers/scsi/qla4xxx/ql4_def.h +++ b/drivers/scsi/qla4xxx/ql4_def.h | |||
@@ -343,6 +343,7 @@ struct ipaddress_config { | |||
343 | struct in6_addr ipv6_addr0; | 343 | struct in6_addr ipv6_addr0; |
344 | struct in6_addr ipv6_addr1; | 344 | struct in6_addr ipv6_addr1; |
345 | struct in6_addr ipv6_default_router_addr; | 345 | struct in6_addr ipv6_default_router_addr; |
346 | uint16_t eth_mtu_size; | ||
346 | }; | 347 | }; |
347 | 348 | ||
348 | #define QL4_CHAP_MAX_NAME_LEN 256 | 349 | #define QL4_CHAP_MAX_NAME_LEN 256 |
diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c index 72ec7e092296..8741cfa98427 100644 --- a/drivers/scsi/qla4xxx/ql4_mbx.c +++ b/drivers/scsi/qla4xxx/ql4_mbx.c | |||
@@ -333,6 +333,8 @@ qla4xxx_update_local_ip(struct scsi_qla_host *ha, | |||
333 | ha->ip_config.ipv4_options = le16_to_cpu(init_fw_cb->ipv4_ip_opts); | 333 | ha->ip_config.ipv4_options = le16_to_cpu(init_fw_cb->ipv4_ip_opts); |
334 | ha->ip_config.ipv4_addr_state = | 334 | ha->ip_config.ipv4_addr_state = |
335 | le16_to_cpu(init_fw_cb->ipv4_addr_state); | 335 | le16_to_cpu(init_fw_cb->ipv4_addr_state); |
336 | ha->ip_config.eth_mtu_size = | ||
337 | le16_to_cpu(init_fw_cb->eth_mtu_size); | ||
336 | 338 | ||
337 | if (ha->acb_version == ACB_SUPPORTED) { | 339 | if (ha->acb_version == ACB_SUPPORTED) { |
338 | ha->ip_config.ipv6_options = le16_to_cpu(init_fw_cb->ipv6_opts); | 340 | ha->ip_config.ipv6_options = le16_to_cpu(init_fw_cb->ipv6_opts); |
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 15355f95f560..58a270b74b2a 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -230,6 +230,7 @@ static mode_t ql4_attr_is_visible(int param_type, int param) | |||
230 | case ISCSI_NET_PARAM_VLAN_ID: | 230 | case ISCSI_NET_PARAM_VLAN_ID: |
231 | case ISCSI_NET_PARAM_VLAN_PRIORITY: | 231 | case ISCSI_NET_PARAM_VLAN_PRIORITY: |
232 | case ISCSI_NET_PARAM_VLAN_ENABLED: | 232 | case ISCSI_NET_PARAM_VLAN_ENABLED: |
233 | case ISCSI_NET_PARAM_MTU: | ||
233 | return S_IRUGO; | 234 | return S_IRUGO; |
234 | default: | 235 | default: |
235 | return 0; | 236 | return 0; |
@@ -335,6 +336,9 @@ static int qla4xxx_get_iface_param(struct iscsi_iface *iface, | |||
335 | IPV6_OPT_VLAN_TAGGING_ENABLE) ? | 336 | IPV6_OPT_VLAN_TAGGING_ENABLE) ? |
336 | "enabled" : "disabled"); | 337 | "enabled" : "disabled"); |
337 | break; | 338 | break; |
339 | case ISCSI_NET_PARAM_MTU: | ||
340 | len = sprintf(buf, "%d\n", ha->ip_config.eth_mtu_size); | ||
341 | break; | ||
338 | default: | 342 | default: |
339 | len = -ENOSYS; | 343 | len = -ENOSYS; |
340 | } | 344 | } |
@@ -718,6 +722,10 @@ static void qla4xxx_set_ipv6(struct scsi_qla_host *ha, | |||
718 | init_fw_cb->ipv6_opts &= | 722 | init_fw_cb->ipv6_opts &= |
719 | cpu_to_le16(~IPV6_OPT_VLAN_TAGGING_ENABLE); | 723 | cpu_to_le16(~IPV6_OPT_VLAN_TAGGING_ENABLE); |
720 | break; | 724 | break; |
725 | case ISCSI_NET_PARAM_MTU: | ||
726 | init_fw_cb->eth_mtu_size = | ||
727 | cpu_to_le16(*(uint16_t *)iface_param->value); | ||
728 | break; | ||
721 | default: | 729 | default: |
722 | ql4_printk(KERN_ERR, ha, "Unknown IPv6 param = %d\n", | 730 | ql4_printk(KERN_ERR, ha, "Unknown IPv6 param = %d\n", |
723 | iface_param->param); | 731 | iface_param->param); |
@@ -778,6 +786,10 @@ static void qla4xxx_set_ipv4(struct scsi_qla_host *ha, | |||
778 | init_fw_cb->ipv4_ip_opts &= | 786 | init_fw_cb->ipv4_ip_opts &= |
779 | cpu_to_le16(~IPOPT_VLAN_TAGGING_ENABLE); | 787 | cpu_to_le16(~IPOPT_VLAN_TAGGING_ENABLE); |
780 | break; | 788 | break; |
789 | case ISCSI_NET_PARAM_MTU: | ||
790 | init_fw_cb->eth_mtu_size = | ||
791 | cpu_to_le16(*(uint16_t *)iface_param->value); | ||
792 | break; | ||
781 | default: | 793 | default: |
782 | ql4_printk(KERN_ERR, ha, "Unknown IPv4 param = %d\n", | 794 | ql4_printk(KERN_ERR, ha, "Unknown IPv4 param = %d\n", |
783 | iface_param->param); | 795 | iface_param->param); |