]> 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)
commiteac5139daa8cfffdac2f550d52b7919289277afa
treeef5cc0006c329b562f16f026b856b3c701ce5c06
parenta1ec194a5048a2f5e72679f9cfcba23ecbebbdfd
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: a6d2804a874d ("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