]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/rds/send.c
PCI: Reprogram bridge prefetch registers on resume
[mirror_ubuntu-bionic-kernel.git] / net / rds / send.c
index f72466c63f0c5657a2f44e11ae432dd1457991cf..23f2d81e7967dacd42b8d4a98165714345b37ba0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006 Oracle.  All rights reserved.
+ * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -986,10 +986,15 @@ static int rds_send_mprds_hash(struct rds_sock *rs, struct rds_connection *conn)
        if (conn->c_npaths == 0 && hash != 0) {
                rds_send_ping(conn, 0);
 
-               if (conn->c_npaths == 0) {
-                       wait_event_interruptible(conn->c_hs_waitq,
-                                                (conn->c_npaths != 0));
-               }
+               /* The underlying connection is not up yet.  Need to wait
+                * until it is up to be sure that the non-zero c_path can be
+                * used.  But if we are interrupted, we have to use the zero
+                * c_path in case the connection ends up being non-MP capable.
+                */
+               if (conn->c_npaths == 0)
+                       if (wait_event_interruptible(conn->c_hs_waitq,
+                                                    conn->c_npaths != 0))
+                               hash = 0;
                if (conn->c_npaths == 1)
                        hash = 0;
        }