aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/iscsi/iscsi.c
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2016-05-19 14:57:37 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2016-05-19 14:57:37 +0000
commitd66a906bc20f1976f098872711b161562275b30b (patch)
treeede728b497e1d893482add8fb9d12445dbe25334 /sys/dev/iscsi/iscsi.c
parent78a89597fe48bef2bc074c827018bc4f4a5d142c (diff)
downloadsrc-d66a906bc20f1976f098872711b161562275b30b.tar.gz
src-d66a906bc20f1976f098872711b161562275b30b.zip
Make ICL proxy use kernel code for handling iSCSI sequence numbers
for PDUs to/from iscsid(8). This fixes StatSN for Logout PDUs sent by iscsi_session_logout(). MFC after: 1 month Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=300211
Diffstat (limited to 'sys/dev/iscsi/iscsi.c')
-rw-r--r--sys/dev/iscsi/iscsi.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c
index e8c59e761c3a..eae6eaaebe95 100644
--- a/sys/dev/iscsi/iscsi.c
+++ b/sys/dev/iscsi/iscsi.c
@@ -713,6 +713,8 @@ iscsi_receive_callback(struct icl_pdu *response)
ISCSI_SESSION_LOCK(is);
+ iscsi_pdu_update_statsn(response);
+
#ifdef ICL_KERNEL_PROXY
if (is->is_login_phase) {
if (is->is_login_pdu == NULL)
@@ -725,8 +727,6 @@ iscsi_receive_callback(struct icl_pdu *response)
}
#endif
- iscsi_pdu_update_statsn(response);
-
/*
* The handling routine is responsible for freeing the PDU
* when it's no longer needed.
@@ -1620,9 +1620,7 @@ iscsi_ioctl_daemon_send(struct iscsi_softc *sc,
KASSERT(error == 0, ("icl_pdu_append_data(..., M_WAITOK) failed"));
free(data, M_ISCSI);
}
- ISCSI_SESSION_LOCK(is);
- icl_pdu_queue(ip);
- ISCSI_SESSION_UNLOCK(is);
+ iscsi_pdu_queue(ip);
return (0);
}