From: <vikas.chaudhary@qlogic.com>
To: jbottomley@parallels.com, michaelc@cs.wisc.edu
Cc: linux-scsi@vger.kernel.org, vikas.chaudhary@qlogic.com,
lalit.chandivade@qlogic.com,
Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Subject: [PATCH 6/8] qla4xxx: Add support for ISCSI_PARAM_LOCAL_IPADDR sysfs attr
Date: Fri, 22 Nov 2013 05:28:22 -0500 [thread overview]
Message-ID: <1385116104-19784-7-git-send-email-vikas.chaudhary@qlogic.com> (raw)
In-Reply-To: <1385116104-19784-1-git-send-email-vikas.chaudhary@qlogic.com>
From: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
drivers/scsi/qla4xxx/ql4_os.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index aa438f2..4181758 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)
case ISCSI_PARAM_EXP_STATSN:
case ISCSI_PARAM_DISCOVERY_PARENT_IDX:
case ISCSI_PARAM_DISCOVERY_PARENT_TYPE:
+ case ISCSI_PARAM_LOCAL_IPADDR:
return S_IRUGO;
default:
return 0;
@@ -3619,6 +3620,7 @@ static void qla4xxx_copy_to_sess_conn_params(struct iscsi_conn *conn,
unsigned long options = 0;
uint16_t ddb_link;
uint16_t disc_parent;
+ char ip_addr[DDB_IPADDR_LEN];
options = le16_to_cpu(fw_ddb_entry->options);
conn->is_fw_assigned_ipv6 = test_bit(OPT_IS_FW_ASSIGNED_IPV6, &options);
@@ -3700,6 +3702,14 @@ static void qla4xxx_copy_to_sess_conn_params(struct iscsi_conn *conn,
iscsi_set_param(conn->cls_conn, ISCSI_PARAM_TARGET_ALIAS,
(char *)fw_ddb_entry->iscsi_alias, 0);
+
+ options = le16_to_cpu(fw_ddb_entry->options);
+ if (options & DDB_OPT_IPV6_DEVICE) {
+ memset(ip_addr, 0, sizeof(ip_addr));
+ sprintf(ip_addr, "%pI6", fw_ddb_entry->link_local_ipv6_addr);
+ iscsi_set_param(conn->cls_conn, ISCSI_PARAM_LOCAL_IPADDR,
+ (char *)ip_addr, 0);
+ }
}
static void qla4xxx_copy_fwddb_param(struct scsi_qla_host *ha,
--
1.8.2.GIT
next prev parent reply other threads:[~2013-11-22 11:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-22 10:28 [PATCH 0/8] qla4xxx: 5.04.00-k3: Updates for scsi "misc" branch vikas.chaudhary
2013-11-22 10:28 ` [PATCH 1/8] qla4xxx: Added support for Diagnostics MBOX command vikas.chaudhary
2013-11-22 10:28 ` [PATCH 2/8] scsi_transport_iscsi: Add host statistics support vikas.chaudhary
2013-11-22 10:28 ` [PATCH 3/8] qla4xxx: " vikas.chaudhary
2013-11-22 10:28 ` [PATCH 4/8] scsi_transport_iscsi: Export ISCSI_PARAM_LOCAL_IPADDR attr for iscsi_connection vikas.chaudhary
2013-11-22 10:28 ` [PATCH 5/8] libiscsi: Add local_ipaddr parameter in iscsi_conn struct vikas.chaudhary
2013-11-22 10:28 ` vikas.chaudhary [this message]
2013-11-22 10:28 ` [PATCH 7/8] qla4xxx: Recreate chap data list during get chap operation vikas.chaudhary
2013-11-22 10:28 ` [PATCH 8/8] qla4xxx: Update driver version to 5.04.00-k3 vikas.chaudhary
2013-12-17 7:23 ` [PATCH 0/8] qla4xxx: 5.04.00-k3: Updates for scsi "misc" branch Mike Christie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1385116104-19784-7-git-send-email-vikas.chaudhary@qlogic.com \
--to=vikas.chaudhary@qlogic.com \
--cc=adheer.chandravanshi@qlogic.com \
--cc=jbottomley@parallels.com \
--cc=lalit.chandivade@qlogic.com \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).