svn commit: r328871 - head/sys/dev/etherswitch/arswitch

Adrian Chadd adrian at FreeBSD.org
Mon Feb 5 05:51:38 UTC 2018


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) {


More information about the svn-src-all mailing list