summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmatthew <jmatthew@openbsd.org>2014-04-07 08:43:54 +0000
committerjmatthew <jmatthew@openbsd.org>2014-04-07 08:43:54 +0000
commitafb98d16c404a34455e6a67729bf3e0d333c5fa1 (patch)
treec27994d54579b7fdcac50b37b79705efaae7a8f5
parentAdd axen(4) wherever axe(4) is. (diff)
downloadwireguard-openbsd-afb98d16c404a34455e6a67729bf3e0d333c5fa1.tar.xz
wireguard-openbsd-afb98d16c404a34455e6a67729bf3e0d333c5fa1.zip
When iterating through fabric ports, start at our own port ID. It doesn't
matter if we don't see ourselves, and if we pick another starting point, the first port we see might disappear half way through (I have seen this happen), which makes it more complicated to identify when we're back at the start.
-rw-r--r--sys/dev/ic/qla.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/ic/qla.c b/sys/dev/ic/qla.c
index ba933226db3..172fb8acf97 100644
--- a/sys/dev/ic/qla.c
+++ b/sys/dev/ic/qla.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qla.c,v 1.34 2014/04/07 00:38:43 jmatthew Exp $ */
+/* $OpenBSD: qla.c,v 1.35 2014/04/07 08:43:54 jmatthew Exp $ */
/*
* Copyright (c) 2011 David Gwynne <dlg@openbsd.org>
@@ -548,8 +548,9 @@ qla_attach(struct qla_softc *sc)
if (qla_update_fabric(sc) == 0) {
u_int32_t firstport = 0xffffffff;
- u_int32_t lastport = 0;
+ u_int32_t lastport;
+ lastport = sc->sc_port_id;
do {
port = qla_next_fabric_port(sc, &firstport,
&lastport);