Skip to content

Commit 19aeeb9

Browse files
committed
Merge branch 'dsa-setup-stage'
Vivien Didelot says: ==================== net: dsa: setup stage When probing a DSA switch, there is basically two stages. The first stage is the parsing of the switch device, from either device tree or platform data. It fetches the DSA tree to which it belongs, and validates its ports. The switch device is then added to the tree, and the second stage is called if this was the last switch of the tree. The second stage is the setup of the tree, which validates that the tree is complete, sets up the routing tables, the default CPU port for user ports, sets up the switch drivers and finally the master interfaces, which makes the whole switch fabric functional. This patch series covers the second setup stage. The setup and teardown of a switch tree have been separated into logical steps, and the probing of a switch now simply parses and adds a switch to a tree. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents b2d0f5d + b4fbb34 commit 19aeeb9

File tree

6 files changed

+280
-363
lines changed

6 files changed

+280
-363
lines changed

include/net/dsa.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ struct dsa_switch_tree {
122122
struct kref refcount;
123123

124124
/* Has this tree been applied to the hardware? */
125-
bool applied;
125+
bool setup;
126126

127127
/*
128128
* Configuration data for the platform device that owns
@@ -190,7 +190,7 @@ struct dsa_port {
190190
struct dsa_switch *ds;
191191
unsigned int index;
192192
const char *name;
193-
struct dsa_port *cpu_dp;
193+
const struct dsa_port *cpu_dp;
194194
struct device_node *dn;
195195
unsigned int ageing_time;
196196
u8 stp_state;

0 commit comments

Comments
 (0)