Deleted Added
full compact
ctl_frontend_iscsi.c (270891) ctl_frontend_iscsi.c (271618)
1/*-
2 * Copyright (c) 2012 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Edward Tomasz Napierala under sponsorship
6 * from the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*-
2 * Copyright (c) 2012 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Edward Tomasz Napierala under sponsorship
6 * from the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c 270891 2014-08-31 20:47:10Z trasz $
29 * $FreeBSD: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c 271618 2014-09-15 11:35:14Z trasz $
30 */
31
32/*
33 * CTL frontend for the iSCSI protocol.
34 */
35
36#include <sys/cdefs.h>
30 */
31
32/*
33 * CTL frontend for the iSCSI protocol.
34 */
35
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c 270891 2014-08-31 20:47:10Z trasz $");
37__FBSDID("$FreeBSD: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c 271618 2014-09-15 11:35:14Z trasz $");
38
39#include <sys/param.h>
40#include <sys/capability.h>
41#include <sys/condvar.h>
42#include <sys/file.h>
43#include <sys/kernel.h>
44#include <sys/kthread.h>
45#include <sys/lock.h>

--- 955 unchanged lines hidden (view full) ---

1001 CFISCSI_SESSION_WARN(cs, "login timed out after "
1002 "%d seconds; dropping connection", cs->cs_timeout);
1003 cfiscsi_session_terminate(cs);
1004 }
1005 return;
1006 }
1007#endif
1008
38
39#include <sys/param.h>
40#include <sys/capability.h>
41#include <sys/condvar.h>
42#include <sys/file.h>
43#include <sys/kernel.h>
44#include <sys/kthread.h>
45#include <sys/lock.h>

--- 955 unchanged lines hidden (view full) ---

1001 CFISCSI_SESSION_WARN(cs, "login timed out after "
1002 "%d seconds; dropping connection", cs->cs_timeout);
1003 cfiscsi_session_terminate(cs);
1004 }
1005 return;
1006 }
1007#endif
1008
1009 if (ping_timeout <= 0) {
1010 /*
1011 * Pings are disabled. Don't send NOP-In in this case;
1012 * user might have disabled pings to work around problems
1013 * with certain initiators that can't properly handle
1014 * NOP-In, such as iPXE. Reset the timeout, to avoid
1015 * triggering reconnection, should the user decide to
1016 * reenable them.
1017 */
1018 cs->cs_timeout = 0;
1019 return;
1020 }
1021
1009 if (cs->cs_timeout >= ping_timeout) {
1010 CFISCSI_SESSION_WARN(cs, "no ping reply (NOP-Out) after %d seconds; "
1011 "dropping connection", ping_timeout);
1012 cfiscsi_session_terminate(cs);
1013 return;
1014 }
1015
1016 /*

--- 1855 unchanged lines hidden ---
1022 if (cs->cs_timeout >= ping_timeout) {
1023 CFISCSI_SESSION_WARN(cs, "no ping reply (NOP-Out) after %d seconds; "
1024 "dropping connection", ping_timeout);
1025 cfiscsi_session_terminate(cs);
1026 return;
1027 }
1028
1029 /*

--- 1855 unchanged lines hidden ---