projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
net: dsa: Centralise getting switch id
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
net
/
dsa
/
mv88e6xxx.c
diff --git
a/drivers/net/dsa/mv88e6xxx.c
b/drivers/net/dsa/mv88e6xxx.c
index 038802229e328572fc7774c565d1c9e644e64cad..13572cc24c6dc42a308e4bc0b660f3c0f673e48d 100644
(file)
--- a/
drivers/net/dsa/mv88e6xxx.c
+++ b/
drivers/net/dsa/mv88e6xxx.c
@@
-1152,6
+1152,8
@@
int mv88e6xxx_setup_common(struct dsa_switch *ds)
mutex_init(&ps->stats_mutex);
mutex_init(&ps->phy_mutex);
+ ps->id = REG_READ(REG_PORT(0), 0x03) & 0xfff0;
+
ps->fid_mask = (1 << DSA_MAX_PORTS) - 1;
INIT_WORK(&ps->bridge_work, mv88e6xxx_bridge_work);