Date: Tue, 10 Apr 2018 08:35:43 +0000 (UTC) From: Marcin Wojtas <mw@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332354 - head/sys/dev/etherswitch/e6000sw Message-ID: <201804100835.w3A8ZhVD012719@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mw Date: Tue Apr 10 08:35:43 2018 New Revision: 332354 URL: https://svnweb.freebsd.org/changeset/base/332354 Log: Improve detection of addressing mode in e6000sw Some devices cannot rely on the switch MDIO address passed in the DTB for specifying single/multi-chip addressing mode. Introduce new property "single-chip-addressing" which added to DTS will force single-chip mode. Submitted by: Michal Mazur <mkm@semihalf.com> Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D14800 Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c ============================================================================== --- head/sys/dev/etherswitch/e6000sw/e6000sw.c Tue Apr 10 08:19:14 2018 (r332353) +++ head/sys/dev/etherswitch/e6000sw/e6000sw.c Tue Apr 10 08:35:43 2018 (r332354) @@ -213,7 +213,9 @@ e6000sw_probe(device_t dev) if (OF_getencprop(sc->node, "reg", &sc->sw_addr, sizeof(sc->sw_addr)) < 0) return (ENXIO); - if (sc->sw_addr != 0 && (sc->sw_addr % 2) == 0) + + if (!OF_hasprop(sc->node, "single-chip-addressing") && + (sc->sw_addr != 0 && (sc->sw_addr % 2) == 0)) sc->multi_chip = true; /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804100835.w3A8ZhVD012719>