aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi/be_iscsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/be2iscsi/be_iscsi.c')
-rw-r--r--drivers/scsi/be2iscsi/be_iscsi.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
index eaaa8813067d..868cc5590145 100644
--- a/drivers/scsi/be2iscsi/be_iscsi.c
+++ b/drivers/scsi/be2iscsi/be_iscsi.c
@@ -210,28 +210,20 @@ int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,
210} 210}
211 211
212/** 212/**
213 * beiscsi_conn_get_param - get the iscsi parameter 213 * beiscsi_ep_get_param - get the iscsi parameter
214 * @cls_conn: pointer to iscsi cls conn 214 * @ep: pointer to iscsi ep
215 * @param: parameter type identifier 215 * @param: parameter type identifier
216 * @buf: buffer pointer 216 * @buf: buffer pointer
217 * 217 *
218 * returns iscsi parameter 218 * returns iscsi parameter
219 */ 219 */
220int beiscsi_conn_get_param(struct iscsi_cls_conn *cls_conn, 220int beiscsi_ep_get_param(struct iscsi_endpoint *ep,
221 enum iscsi_param param, char *buf) 221 enum iscsi_param param, char *buf)
222{ 222{
223 struct beiscsi_endpoint *beiscsi_ep; 223 struct beiscsi_endpoint *beiscsi_ep = ep->dd_data;
224 struct iscsi_conn *conn = cls_conn->dd_data;
225 struct beiscsi_conn *beiscsi_conn = conn->dd_data;
226 int len = 0; 224 int len = 0;
227 225
228 SE_DEBUG(DBG_LVL_8, "In beiscsi_conn_get_param, param= %d\n", param); 226 SE_DEBUG(DBG_LVL_8, "In beiscsi_conn_get_param, param= %d\n", param);
229 beiscsi_ep = beiscsi_conn->ep;
230 if (!beiscsi_ep) {
231 SE_DEBUG(DBG_LVL_1,
232 "In beiscsi_conn_get_param , no beiscsi_ep\n");
233 return -ENODEV;
234 }
235 227
236 switch (param) { 228 switch (param) {
237 case ISCSI_PARAM_CONN_PORT: 229 case ISCSI_PARAM_CONN_PORT:
@@ -244,7 +236,7 @@ int beiscsi_conn_get_param(struct iscsi_cls_conn *cls_conn,
244 len = sprintf(buf, "%pI6\n", &beiscsi_ep->dst6_addr); 236 len = sprintf(buf, "%pI6\n", &beiscsi_ep->dst6_addr);
245 break; 237 break;
246 default: 238 default:
247 return iscsi_conn_get_param(cls_conn, param, buf); 239 return -ENOSYS;
248 } 240 }
249 return len; 241 return len;
250} 242}