aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/iscsi/iscsi.c
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2016-05-20 17:38:51 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2016-05-20 17:38:51 +0000
commit906a424b26cf9d9bbe8ddaf30199d1c1c5dc565c (patch)
tree5fa2e6399b16bf2d2e0fd2608aeec8ce0bc70f32 /sys/dev/iscsi/iscsi.c
parentdd8214827f2354e4a8a8ddc4d4a6d34cde0e1e3a (diff)
downloadsrc-906a424b26cf9d9bbe8ddaf30199d1c1c5dc565c.tar.gz
src-906a424b26cf9d9bbe8ddaf30199d1c1c5dc565c.zip
Call the ICL module's handoff method even when using ICL proxy.
The upcoming iSER code uses this. MFC after: 1 month Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=300315
Diffstat (limited to 'sys/dev/iscsi/iscsi.c')
-rw-r--r--sys/dev/iscsi/iscsi.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c
index eae6eaaebe95..85ecdc0b87e3 100644
--- a/sys/dev/iscsi/iscsi.c
+++ b/sys/dev/iscsi/iscsi.c
@@ -1415,21 +1415,17 @@ iscsi_ioctl_daemon_handoff(struct iscsi_softc *sc,
ISCSI_SESSION_UNLOCK(is);
-#ifdef ICL_KERNEL_PROXY
- if (handoff->idh_socket != 0) {
-#endif
- /*
- * Handoff without using ICL proxy.
- */
- error = icl_conn_handoff(ic, handoff->idh_socket);
- if (error != 0) {
- sx_sunlock(&sc->sc_lock);
- iscsi_session_terminate(is);
- return (error);
- }
-#ifdef ICL_KERNEL_PROXY
+ /*
+ * If we're going through the proxy, the idh_socket will be 0,
+ * and the ICL module can simply ignore this call. It can also
+ * use it to determine it's no longer in the Login phase.
+ */
+ error = icl_conn_handoff(ic, handoff->idh_socket);
+ if (error != 0) {
+ sx_sunlock(&sc->sc_lock);
+ iscsi_session_terminate(is);
+ return (error);
}
-#endif
sx_sunlock(&sc->sc_lock);