Date: Mon, 5 Feb 2018 07:05:29 +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: r328873 - head/sys/dev/etherswitch/arswitch Message-ID: <201802050705.w1575T9K051468@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Mon Feb 5 07:05:28 2018 New Revision: 328873 URL: https://svnweb.freebsd.org/changeset/base/328873 Log: [arswitch] Enable ATU dump support for the AR9340. This indeed uses the same registers as the AR8216 and later chips. There seems to be an issue with ARP requests being sent out from the CPU through this switch here, so figuring that out is next. Learning works fine on the AR8327 ethernet switch on the /other/ gigabit ethernet port, so I don't think it's the network stack or ethernet driver. Tested: * DB120 - AR9340 SOC + ethernet switch (and other bits.) Modified: head/sys/dev/etherswitch/arswitch/arswitch_9340.c Modified: head/sys/dev/etherswitch/arswitch/arswitch_9340.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_9340.c Mon Feb 5 07:03:45 2018 (r328872) +++ head/sys/dev/etherswitch/arswitch/arswitch_9340.c Mon Feb 5 07:05:28 2018 (r328873) @@ -120,6 +120,11 @@ ar9340_hw_global_setup(struct arswitch_softc *sc) arswitch_modifyreg(sc->sc_dev, AR934X_REG_FLOOD_MASK, AR934X_FLOOD_MASK_MC_DP(0), AR934X_FLOOD_MASK_MC_DP(0)); +#if 0 + arswitch_modifyreg(sc->sc_dev, AR934X_REG_FLOOD_MASK, + AR934X_FLOOD_MASK_UC_DP(0), + AR934X_FLOOD_MASK_UC_DP(0)); +#endif /* Enable MIB counters */ arswitch_modifyreg(sc->sc_dev, AR8X16_REG_MIB_FUNC0, @@ -183,16 +188,6 @@ ar9340_hw_global_setup(struct arswitch_softc *sc) return (0); } -static int -ar9340_atu_fetch_table(struct arswitch_softc *sc, etherswitch_atu_entry_t *e, - int atu_fetch_op) -{ - - /* XXX TODO */ - return (ENXIO); -} - - /* * The AR9340 switch probes (almost) the same as the AR7240 on-chip switch. * @@ -223,7 +218,12 @@ ar9340_attach(struct arswitch_softc *sc) sc->hal.arswitch_hw_setup = ar9340_hw_setup; sc->hal.arswitch_hw_global_setup = ar9340_hw_global_setup; sc->hal.arswitch_atu_learn_default = ar9340_atu_learn_default; - sc->hal.arswitch_atu_fetch_table = ar9340_atu_fetch_table; + /* + * Note: the ar9340 table fetch code/registers matche + * the ar8216/ar8316 for now because we're not supporting + * static entry programming that includes any of the extra + * bits in the AR9340. + */ /* Set the switch vlan capabilities. */ sc->info.es_vlan_caps = ETHERSWITCH_VLAN_DOT1Q |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802050705.w1575T9K051468>