Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

src: Pull up following revision(s) (requested by mlelstv in tick...



details:   https://anonhg.NetBSD.org/src/rev/5ab46e96d2a9
branches:  netbsd-8
changeset: 317975:5ab46e96d2a9
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Mon Apr 09 15:58:52 2018 +0000
description:
Pull up following revision(s) (requested by mlelstv in ticket #709):
        sys/dev/iscsi/iscsi_send.c: revision 1.37 via patch
        sys/dev/iscsi/iscsi_rcv.c: revision 1.25 via patch
Return temporary errors when the session is trying to recover the last
connection. The scsipi layer will retry.
Add sanity check.

diffstat:

 sys/dev/iscsi/iscsi_rcv.c  |  7 ++++++-
 sys/dev/iscsi/iscsi_send.c |  7 +++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diffs (42 lines):

diff -r 1b0ed13208e5 -r 5ab46e96d2a9 sys/dev/iscsi/iscsi_rcv.c
--- a/sys/dev/iscsi/iscsi_rcv.c Mon Apr 09 13:40:46 2018 +0000
+++ b/sys/dev/iscsi/iscsi_rcv.c Mon Apr 09 15:58:52 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iscsi_rcv.c,v 1.23 2016/12/25 06:55:28 mlelstv Exp $   */
+/*     $NetBSD: iscsi_rcv.c,v 1.23.8.1 2018/04/09 15:58:52 bouyer Exp $        */
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -737,6 +737,11 @@
                return -1;
        }
 
+       if (req_ccb->flags & CCBF_COMPLETE) {
+               DEBOUT(("Possibly duplicate command response (tagged as COMPLETE)\n"));
+               return -1;
+       }
+
        if (req_ccb->pdu_waiting != NULL) {
                ccb_timeout_start(req_ccb, COMMAND_TIMEOUT);
                req_ccb->num_timeouts = 0;
diff -r 1b0ed13208e5 -r 5ab46e96d2a9 sys/dev/iscsi/iscsi_send.c
--- a/sys/dev/iscsi/iscsi_send.c        Mon Apr 09 13:40:46 2018 +0000
+++ b/sys/dev/iscsi/iscsi_send.c        Mon Apr 09 15:58:52 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iscsi_send.c,v 1.34.6.1 2017/12/21 19:17:43 snj Exp $  */
+/*     $NetBSD: iscsi_send.c,v 1.34.6.2 2018/04/09 15:58:52 bouyer Exp $       */
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -1485,7 +1485,10 @@
        conn = assign_connection(session, waitok);
 
        if (conn == NULL || conn->terminating || conn->state != ST_FULL_FEATURE) {
-               xs->error = XS_SELTIMEOUT;
+               if (session->terminating)
+                       xs->error = XS_SELTIMEOUT;
+               else
+                       xs->error = XS_BUSY;
                DEBC(conn, 10, ("run_xfer on dead connection\n"));
                scsipi_done(xs);
                unref_session(session);



Home | Main Index | Thread Index | Old Index