Date: Wed, 25 Dec 2019 11:26:38 +0000 (UTC) From: Ganbold Tsagaankhuu <ganbold@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r356075 - head/sys/dev/etherswitch/e6000sw Message-ID: <201912251126.xBPBQc0g009987@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ganbold Date: Wed Dec 25 11:26:38 2019 New Revision: 356075 URL: https://svnweb.freebsd.org/changeset/base/356075 Log: Fix panic when running etherswitchcfg port command. Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c ============================================================================== --- head/sys/dev/etherswitch/e6000sw/e6000sw.c Wed Dec 25 09:34:16 2019 (r356074) +++ head/sys/dev/etherswitch/e6000sw/e6000sw.c Wed Dec 25 11:26:38 2019 (r356075) @@ -849,6 +849,8 @@ e6000sw_setport(device_t dev, etherswitch_port_t *p) if (!e6000sw_is_portenabled(sc, p->es_port)) return (0); + E6000SW_LOCK(sc); + /* Port flags. */ reg = e6000sw_readreg(sc, REG_PORT(sc, p->es_port), PORT_CONTROL2); if (p->es_flags & ETHERSWITCH_PORT_DROPTAGGED) @@ -862,7 +864,6 @@ e6000sw_setport(device_t dev, etherswitch_port_t *p) e6000sw_writereg(sc, REG_PORT(sc, p->es_port), PORT_CONTROL2, reg); err = 0; - E6000SW_LOCK(sc); if (p->es_pvid != 0) e6000sw_set_pvid(sc, p->es_port, p->es_pvid); if (e6000sw_is_phyport(sc, p->es_port)) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912251126.xBPBQc0g009987>