From d66a906bc20f1976f098872711b161562275b30b Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Thu, 19 May 2016 14:57:37 +0000 Subject: 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 --- sys/dev/iscsi/iscsi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sys/dev/iscsi/iscsi.c') 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); } -- cgit v1.2.3