diff options
author | Or Gerlitz <ogerlitz@mellanox.com> | 2013-08-08 06:44:29 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-08-26 10:53:49 -0400 |
commit | 6a06a4b8cff89b91cb04d3b44242658df1b3e851 (patch) | |
tree | ec62488048174098e8a95faf83ef1958c02bf2de /drivers/scsi/libiscsi.c | |
parent | e1e819cc9608760e9b5d094f8198c33238b01336 (diff) |
[SCSI] IB/iser: Add Discovery support
To run discovery over iSER we need to advertize the CAP_TEXT_NEGO capability
towards user space. Also need to make sure the login RX buffer is posted when
SendTargets TEXT PDUs are sent. For that end, we use a setting of the
ISCSI_PARAM_DISCOVERY_SESS iscsi param as an indication that this is
discovery session.
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/libiscsi.c')
-rw-r--r-- | drivers/scsi/libiscsi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index f75761726c7f..e3995612ea76 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -3170,6 +3170,7 @@ int iscsi_set_param(struct iscsi_cls_conn *cls_conn, | |||
3170 | { | 3170 | { |
3171 | struct iscsi_conn *conn = cls_conn->dd_data; | 3171 | struct iscsi_conn *conn = cls_conn->dd_data; |
3172 | struct iscsi_session *session = conn->session; | 3172 | struct iscsi_session *session = conn->session; |
3173 | int val; | ||
3173 | 3174 | ||
3174 | switch(param) { | 3175 | switch(param) { |
3175 | case ISCSI_PARAM_FAST_ABORT: | 3176 | case ISCSI_PARAM_FAST_ABORT: |
@@ -3264,6 +3265,10 @@ int iscsi_set_param(struct iscsi_cls_conn *cls_conn, | |||
3264 | case ISCSI_PARAM_DISCOVERY_PARENT_TYPE: | 3265 | case ISCSI_PARAM_DISCOVERY_PARENT_TYPE: |
3265 | return iscsi_switch_str_param(&session->discovery_parent_type, | 3266 | return iscsi_switch_str_param(&session->discovery_parent_type, |
3266 | buf); | 3267 | buf); |
3268 | case ISCSI_PARAM_DISCOVERY_SESS: | ||
3269 | sscanf(buf, "%d", &val); | ||
3270 | session->discovery_sess = !!val; | ||
3271 | break; | ||
3267 | default: | 3272 | default: |
3268 | return -ENOSYS; | 3273 | return -ENOSYS; |
3269 | } | 3274 | } |