diff options
author | Adheer Chandravanshi <adheer.chandravanshi@qlogic.com> | 2013-11-22 05:28:22 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-12-19 23:56:27 -0500 |
commit | fb734ee3eff40c1374e23be6eaf666681e6137ac (patch) | |
tree | c3b3e30ca6c8b99c7b520d361bf4b0fec95d3a7c /drivers/scsi | |
parent | ae56ff4084129c7d8a5bf946d48602f551bff2f5 (diff) |
[SCSI] qla4xxx: Add support for ISCSI_PARAM_LOCAL_IPADDR sysfs attr
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
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')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 295b8d401bc4..9b8a2c342b5d 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -421,6 +421,7 @@ static umode_t qla4_attr_is_visible(int param_type, int param) | |||
421 | case ISCSI_PARAM_EXP_STATSN: | 421 | case ISCSI_PARAM_EXP_STATSN: |
422 | case ISCSI_PARAM_DISCOVERY_PARENT_IDX: | 422 | case ISCSI_PARAM_DISCOVERY_PARENT_IDX: |
423 | case ISCSI_PARAM_DISCOVERY_PARENT_TYPE: | 423 | case ISCSI_PARAM_DISCOVERY_PARENT_TYPE: |
424 | case ISCSI_PARAM_LOCAL_IPADDR: | ||
424 | return S_IRUGO; | 425 | return S_IRUGO; |
425 | default: | 426 | default: |
426 | return 0; | 427 | return 0; |
@@ -3622,6 +3623,7 @@ static void qla4xxx_copy_to_sess_conn_params(struct iscsi_conn *conn, | |||
3622 | unsigned long options = 0; | 3623 | unsigned long options = 0; |
3623 | uint16_t ddb_link; | 3624 | uint16_t ddb_link; |
3624 | uint16_t disc_parent; | 3625 | uint16_t disc_parent; |
3626 | char ip_addr[DDB_IPADDR_LEN]; | ||
3625 | 3627 | ||
3626 | options = le16_to_cpu(fw_ddb_entry->options); | 3628 | options = le16_to_cpu(fw_ddb_entry->options); |
3627 | conn->is_fw_assigned_ipv6 = test_bit(OPT_IS_FW_ASSIGNED_IPV6, &options); | 3629 | conn->is_fw_assigned_ipv6 = test_bit(OPT_IS_FW_ASSIGNED_IPV6, &options); |
@@ -3703,6 +3705,14 @@ static void qla4xxx_copy_to_sess_conn_params(struct iscsi_conn *conn, | |||
3703 | 3705 | ||
3704 | iscsi_set_param(conn->cls_conn, ISCSI_PARAM_TARGET_ALIAS, | 3706 | iscsi_set_param(conn->cls_conn, ISCSI_PARAM_TARGET_ALIAS, |
3705 | (char *)fw_ddb_entry->iscsi_alias, 0); | 3707 | (char *)fw_ddb_entry->iscsi_alias, 0); |
3708 | |||
3709 | options = le16_to_cpu(fw_ddb_entry->options); | ||
3710 | if (options & DDB_OPT_IPV6_DEVICE) { | ||
3711 | memset(ip_addr, 0, sizeof(ip_addr)); | ||
3712 | sprintf(ip_addr, "%pI6", fw_ddb_entry->link_local_ipv6_addr); | ||
3713 | iscsi_set_param(conn->cls_conn, ISCSI_PARAM_LOCAL_IPADDR, | ||
3714 | (char *)ip_addr, 0); | ||
3715 | } | ||
3706 | } | 3716 | } |
3707 | 3717 | ||
3708 | static void qla4xxx_copy_fwddb_param(struct scsi_qla_host *ha, | 3718 | static void qla4xxx_copy_fwddb_param(struct scsi_qla_host *ha, |