Skip to content

Commit

Permalink
Improve detection of addressing mode in e6000sw
Browse files Browse the repository at this point in the history
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
  • Loading branch information
wojtas-marcin committed Apr 10, 2018
1 parent 72609e5 commit 879cf7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sys/dev/etherswitch/e6000sw/e6000sw.c
Expand Up @@ -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;

/*
Expand Down

0 comments on commit 879cf7c

Please sign in to comment.