diff options
author | Adheer Chandravanshi <adheer.chandravanshi@qlogic.com> | 2013-11-22 05:28:21 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-12-19 23:56:26 -0500 |
commit | ae56ff4084129c7d8a5bf946d48602f551bff2f5 (patch) | |
tree | af848c429dd8e254d89e2c0035476f1430a7661c /drivers/scsi | |
parent | 5af62f240b4bf6a79ffe71d570b7b1e2765ea0d0 (diff) |
[SCSI] libiscsi: Add local_ipaddr parameter in iscsi_conn struct
Add local_ipaddr param and support get/set operations on it.
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/libiscsi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index e3995612ea76..40462415291e 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -2945,6 +2945,7 @@ void iscsi_conn_teardown(struct iscsi_cls_conn *cls_conn) | |||
2945 | free_pages((unsigned long) conn->data, | 2945 | free_pages((unsigned long) conn->data, |
2946 | get_order(ISCSI_DEF_MAX_RECV_SEG_LEN)); | 2946 | get_order(ISCSI_DEF_MAX_RECV_SEG_LEN)); |
2947 | kfree(conn->persistent_address); | 2947 | kfree(conn->persistent_address); |
2948 | kfree(conn->local_ipaddr); | ||
2948 | kfifo_in(&session->cmdpool.queue, (void*)&conn->login_task, | 2949 | kfifo_in(&session->cmdpool.queue, (void*)&conn->login_task, |
2949 | sizeof(void*)); | 2950 | sizeof(void*)); |
2950 | if (session->leadconn == conn) | 2951 | if (session->leadconn == conn) |
@@ -3269,6 +3270,8 @@ int iscsi_set_param(struct iscsi_cls_conn *cls_conn, | |||
3269 | sscanf(buf, "%d", &val); | 3270 | sscanf(buf, "%d", &val); |
3270 | session->discovery_sess = !!val; | 3271 | session->discovery_sess = !!val; |
3271 | break; | 3272 | break; |
3273 | case ISCSI_PARAM_LOCAL_IPADDR: | ||
3274 | return iscsi_switch_str_param(&conn->local_ipaddr, buf); | ||
3272 | default: | 3275 | default: |
3273 | return -ENOSYS; | 3276 | return -ENOSYS; |
3274 | } | 3277 | } |
@@ -3542,6 +3545,9 @@ int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn, | |||
3542 | case ISCSI_PARAM_TCP_RECV_WSF: | 3545 | case ISCSI_PARAM_TCP_RECV_WSF: |
3543 | len = sprintf(buf, "%u\n", conn->tcp_recv_wsf); | 3546 | len = sprintf(buf, "%u\n", conn->tcp_recv_wsf); |
3544 | break; | 3547 | break; |
3548 | case ISCSI_PARAM_LOCAL_IPADDR: | ||
3549 | len = sprintf(buf, "%s\n", conn->local_ipaddr); | ||
3550 | break; | ||
3545 | default: | 3551 | default: |
3546 | return -ENOSYS; | 3552 | return -ENOSYS; |
3547 | } | 3553 | } |