From owner-svn-src-all@freebsd.org Sun Feb 4 08:22:12 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 08B9EEEF380; Sun, 4 Feb 2018 08:22:12 +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 AF6EB7325B; Sun, 4 Feb 2018 08:22:11 +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 A8E6117AF4; Sun, 4 Feb 2018 08:22:11 +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 w148MBg7067009; Sun, 4 Feb 2018 08:22:11 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w148MBdg067007; Sun, 4 Feb 2018 08:22:11 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201802040822.w148MBdg067007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 4 Feb 2018 08:22:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328838 - 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: 328838 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: Sun, 04 Feb 2018 08:22:12 -0000 Author: adrian Date: Sun Feb 4 08:22:11 2018 New Revision: 328838 URL: https://svnweb.freebsd.org/changeset/base/328838 Log: [arswitch] fix up issues on the AR8327. This correctly dumps the ethernet bridge contents on an AR8327 switch. Tested: * AP135 - QCA9550 + AR8327 ethernet switch: # etherswitchcfg atu dump [0] c0:3f:d5:7e:6f:45: portmask 0x00000004 [1] f6:b6:03:96:1e:ba: portmask 0x00000004 [2] 00:03:7f:11:38:4f: portmask 0x00000040 # arp -na ? (192.168.3.170) at 00:03:7f:11:38:4f on arge0 permanent [ethernet] ? (192.168.3.12) at c0:3f:d5:7e:6f:45 on arge0 expires in 1188 seconds [ethernet] ? (192.168.3.1) at f6:b6:03:96:1e:ba on arge0 expires in 1186 seconds [ethernet] Modified: head/sys/dev/etherswitch/arswitch/arswitch_8327.c head/sys/dev/etherswitch/arswitch/arswitchreg.h Modified: head/sys/dev/etherswitch/arswitch/arswitch_8327.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_8327.c Sun Feb 4 03:15:06 2018 (r328837) +++ head/sys/dev/etherswitch/arswitch/arswitch_8327.c Sun Feb 4 08:22:11 2018 (r328838) @@ -1151,12 +1151,12 @@ ar8327_atu_fetch_table(struct arswitch_softc *sc, ethe return (-1); /* MAC address */ - e->es_macaddr[5] = MS(ret1, AR8327_ATU_DATA1_MAC_ADDR5); - e->es_macaddr[4] = MS(ret1, AR8327_ATU_DATA1_MAC_ADDR4); - e->es_macaddr[3] = MS(ret0, AR8327_ATU_DATA0_MAC_ADDR3); - e->es_macaddr[2] = MS(ret0, AR8327_ATU_DATA0_MAC_ADDR2); - e->es_macaddr[1] = MS(ret0, AR8327_ATU_DATA0_MAC_ADDR1); - e->es_macaddr[0] = MS(ret0, AR8327_ATU_DATA0_MAC_ADDR0); + e->es_macaddr[5] = MS(ret0, AR8327_ATU_DATA0_MAC_ADDR3); + e->es_macaddr[4] = MS(ret0, AR8327_ATU_DATA0_MAC_ADDR2); + e->es_macaddr[3] = MS(ret0, AR8327_ATU_DATA0_MAC_ADDR1); + e->es_macaddr[2] = MS(ret0, AR8327_ATU_DATA0_MAC_ADDR0); + e->es_macaddr[0] = MS(ret1, AR8327_ATU_DATA1_MAC_ADDR5); + e->es_macaddr[1] = MS(ret1, AR8327_ATU_DATA1_MAC_ADDR4); /* Bitmask of ports this entry is for */ e->es_portmask = MS(ret1, AR8327_ATU_DATA1_DEST_PORT); Modified: head/sys/dev/etherswitch/arswitch/arswitchreg.h ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitchreg.h Sun Feb 4 03:15:06 2018 (r328837) +++ head/sys/dev/etherswitch/arswitch/arswitchreg.h Sun Feb 4 08:22:11 2018 (r328838) @@ -498,7 +498,7 @@ #define AR8327_ATU_DATA1_MAC_ADDR4 BITS(0, 8) #define AR8327_ATU_DATA1_MAC_ADDR4_S 0 #define AR8327_ATU_DATA1_MAC_ADDR5 BITS(8, 8) -#define AR8327_ATU_DATA1_MAC_ADDR5_S 0 +#define AR8327_ATU_DATA1_MAC_ADDR5_S 8 #define AR8327_ATU_DATA1_DEST_PORT BITS(16, 7) #define AR8327_ATU_DATA1_DEST_PORT_S 16 #define AR8327_ATU_DATA1_CROSS_PORT_STATE_EN BIT(23)