diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2016-05-09 13:22:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-09 14:26:12 -0400 |
commit | b0745e87943b40734e6c341dcf47a6ec80ee4346 (patch) | |
tree | c745847c711cc0906c14a4fd4f880e35a19b0bcf /drivers/net/dsa/mv88e6171.c | |
parent | 709643aa626ec8f0bd678be79187beefffae32c7 (diff) | |
download | linux-b0745e87943b40734e6c341dcf47a6ec80ee4346.tar.bz2 |
net: dsa: mv88e6xxx: factorize GLOBAL_MONITOR_CONTROL setup
All switch drivers configure the GLOBAL_MONITOR_CONTROL register with
slightly changes.
Assume the setup of the upstream port, and configure it as the port to
which ingress and egress and ARP monitor frames are to be sent.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6171.c')
-rw-r--r-- | drivers/net/dsa/mv88e6171.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/net/dsa/mv88e6171.c b/drivers/net/dsa/mv88e6171.c index 6c8554ce24e6..a848aefb4c74 100644 --- a/drivers/net/dsa/mv88e6171.c +++ b/drivers/net/dsa/mv88e6171.c @@ -61,21 +61,6 @@ static const char *mv88e6171_drv_probe(struct device *dsa_dev, static int mv88e6171_setup_global(struct dsa_switch *ds) { struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); - u32 upstream_port = dsa_upstream_port(ds); - int ret; - u32 reg; - - /* Configure the upstream port, and configure the upstream - * port as the port to which ingress and egress monitor frames - * are to be sent. - */ - reg = upstream_port << GLOBAL_MONITOR_CONTROL_INGRESS_SHIFT | - upstream_port << GLOBAL_MONITOR_CONTROL_EGRESS_SHIFT | - upstream_port << GLOBAL_MONITOR_CONTROL_ARP_SHIFT | - upstream_port << GLOBAL_MONITOR_CONTROL_MIRROR_SHIFT; - ret = mv88e6xxx_reg_write(ps, REG_GLOBAL, GLOBAL_MONITOR_CONTROL, reg); - if (ret) - return ret; /* Disable remote management for now, and set the switch's * DSA device number. |