]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: assign default CPU port to all ports
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Thu, 15 Jun 2017 19:06:54 +0000 (15:06 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Jun 2017 21:23:35 +0000 (17:23 -0400)
commite82084d9f856a2339be9450b0bf8e05e2e1606c3
treeef5cc0006c329b562f16f026b856b3c701ce5c06
parentc590f24159e3c10ee26b7070a3fb6fe74469c412
net: dsa: assign default CPU port to all ports

The current code only assigns the default cpu_dp to all user ports of
the switch to which the CPU port belongs. The user ports of the other
switches of the fabric thus don't have a default CPU port.

This patch fixes this by assigning the cpu_dp of all user ports of all
switches of the fabric when the tree is fully parsed.

Fixes: fda7c92e4eec ("net: dsa: Associate slave network device with CPU port")
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa2.c