From owner-svn-src-all@freebsd.org Mon Feb 5 05:51:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97FBCEF3CC5; Mon, 5 Feb 2018 05:51:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47EDD83CCC; Mon, 5 Feb 2018 05:51:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 42BC524996; Mon, 5 Feb 2018 05:51:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w155pc9T013787; Mon, 5 Feb 2018 05:51:38 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w155pcwx013786; Mon, 5 Feb 2018 05:51:38 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201802050551.w155pcwx013786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 5 Feb 2018 05:51:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328871 - head/sys/dev/etherswitch/arswitch X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/dev/etherswitch/arswitch X-SVN-Commit-Revision: 328871 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Feb 2018 05:51:38 -0000 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) {