Skip to content
Permalink
Browse files

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
  • Loading branch information...
mw mw
mw authored and mw committed Apr 10, 2018
1 parent 72609e5 commit 879cf7c79fa3a9a665515dc5f832a185f8927295
Showing with 3 additions and 1 deletion.
  1. +3 −1 sys/dev/etherswitch/e6000sw/e6000sw.c
@@ -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;

/*

0 comments on commit 879cf7c

Please sign in to comment.
You can’t perform that action at this time.