Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Feb 2018 05:51:38 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r328871 - head/sys/dev/etherswitch/arswitch
Message-ID:  <201802050551.w155pcwx013786@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Mon Feb  5 05:51:37 2018
New Revision: 328871
URL: https://svnweb.freebsd.org/changeset/base/328871

Log:
  [arswitch] Break out of the loop upon any error, not just -1.
  
  This fixes the AR9340 "unimplemented" thingy for now.

Modified:
  head/sys/dev/etherswitch/arswitch/arswitch.c

Modified: head/sys/dev/etherswitch/arswitch/arswitch.c
==============================================================================
--- head/sys/dev/etherswitch/arswitch/arswitch.c	Mon Feb  5 05:02:01 2018	(r328870)
+++ head/sys/dev/etherswitch/arswitch/arswitch.c	Mon Feb  5 05:51:37 2018	(r328871)
@@ -1187,7 +1187,7 @@ arswitch_atu_fetch_table(device_t dev, etherswitch_atu
 	err = sc->hal.arswitch_atu_fetch_table(sc, NULL, 0);
 
 	/* fetch - ideally yes we'd fetch into a separate table then switch */
-	while (err != -1 && nitems < sc->atu.size) {
+	while (err == 0 && nitems < sc->atu.size) {
 		err = sc->hal.arswitch_atu_fetch_table(sc,
 		    &sc->atu.entries[nitems], 1);
 		if (err == 0) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802050551.w155pcwx013786>