isert: Fix discovery over RDMA

Commit r5655: isert: Handle login pdu reception in more robust way

Broke discovery over RDMA. Fix it, as well as tidy up a few error prints in that area

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5660 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Yan Burman
2014-07-03 12:43:16 +00:00
parent cb54772490
commit 6432ad6263
+4 -4
View File
@@ -753,7 +753,7 @@ int isert_login_req_rx(struct iscsi_cmnd *login_req)
TRACE_ENTRY();
if (!dev) {
PRINT_ERROR("Received PDU %p on invalid connection\n",
PRINT_ERROR("Received PDU %p on invalid connection",
login_req);
res = -EINVAL;
goto out;
@@ -761,6 +761,7 @@ int isert_login_req_rx(struct iscsi_cmnd *login_req)
switch (dev->state) {
case CS_INIT:
case CS_RSP_FINISHED:
if (dev->login_req != NULL) {
sBUG();
res = -EINVAL;
@@ -775,9 +776,8 @@ int isert_login_req_rx(struct iscsi_cmnd *login_req)
case CS_REQ_FINISHED:
case CS_RSP_BHS:
case CS_RSP_DATA:
case CS_RSP_FINISHED:
PRINT_WARNING("%s",
"Received login PDU while handling previous one\n");
PRINT_WARNING("Received login PDU while handling previous one. State:%d",
dev->state);
res = -EINVAL;
goto out;