summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2014-09-10 13:34:27 +0000
committertrasz <trasz@FreeBSD.org>2014-09-10 13:34:27 +0000
commit6cacb7cf778fd2c20de9f18c03dab6cfd10d015a (patch)
treec0dc7af29730264b4a3eb93eb9ff3cf11ab9f579 /sys/cam
parent9186ea6a594a8833c5023330ae1b2fe8a83196a5 (diff)
downloadFreeBSD-src-6cacb7cf778fd2c20de9f18c03dab6cfd10d015a.zip
FreeBSD-src-6cacb7cf778fd2c20de9f18c03dab6cfd10d015a.tar.gz
Make it possible to disable NOP-In PDUs by the iSCSI initiator by setting
kern.cam.ctl.iscsi.ping_timeout to 0. This fixes interoperability with some initiators that don't properly support NOP-Ins, namely iPXE/gPXE. Submitted by: Chen Wen <pokkys@gmail.com> MFC after: 1 week Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/ctl/ctl_frontend_iscsi.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/cam/ctl/ctl_frontend_iscsi.c b/sys/cam/ctl/ctl_frontend_iscsi.c
index d251789..247b4ee 100644
--- a/sys/cam/ctl/ctl_frontend_iscsi.c
+++ b/sys/cam/ctl/ctl_frontend_iscsi.c
@@ -1002,6 +1002,19 @@ cfiscsi_callout(void *context)
}
#endif
+ if (ping_timeout <= 0) {
+ /*
+ * Pings are disabled. Don't send NOP-In in this case;
+ * user might have disabled pings to work around problems
+ * with certain initiators that can't properly handle
+ * NOP-In, such as iPXE. Reset the timeout, to avoid
+ * triggering reconnection, should the user decide to
+ * reenable them.
+ */
+ cs->cs_timeout = 0;
+ return;
+ }
+
if (cs->cs_timeout >= ping_timeout) {
CFISCSI_SESSION_WARN(cs, "no ping reply (NOP-Out) after %d seconds; "
"dropping connection", ping_timeout);
OpenPOWER on IntegriCloud