Skip to content

Commit

Permalink
Merge branch 'dsa-parsing-stage'
Browse files Browse the repository at this point in the history
Vivien Didelot says:

====================
net: dsa: parsing stage

When registering 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 first parsing stage. It fixes the type of
the switch and tree indexes to unsigned int, simplifies the tree
reference counting and the switch and CPU ports parsing.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Nov 5, 2017
2 parents 9524846 + 7354fcb commit 6c49b5e
Show file tree
Hide file tree
Showing 3 changed files with 179 additions and 140 deletions.
4 changes: 2 additions & 2 deletions include/net/dsa.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ struct dsa_switch_tree {
struct raw_notifier_head nh;

/* Tree identifier */
u32 tree;
unsigned int index;

/* Number of switches attached to this tree */
struct kref refcount;
Expand Down Expand Up @@ -209,7 +209,7 @@ struct dsa_switch {
* Parent switch tree, and switch index.
*/
struct dsa_switch_tree *dst;
int index;
unsigned int index;

/* Listener for switch fabric events */
struct notifier_block nb;
Expand Down
Loading

0 comments on commit 6c49b5e

Please sign in to comment.