diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2018-08-03 14:08:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-08-03 15:11:43 -0400 |
commit | 2104bc0ab0eee8a4768dd80df8ed42eb591543bc (patch) | |
tree | 2592895a75b636bd7d5dd6dd7f76f35e22c86f5c | |
parent | 723a00436adc2ab474a2501c18a8e72ea1fc73f1 (diff) |
net: dsa: bcm_sf2: Allow targeting CPU ports for CFP rules
ds->enabled_port_mask only contains a bitmask of user-facing enabled
ports, we also need to allow programming CFP rules that target CPU ports
(e.g: ports 5 and 8).
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/dsa/bcm_sf2_cfp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/dsa/bcm_sf2_cfp.c b/drivers/net/dsa/bcm_sf2_cfp.c index b89acaee12d4..1e37b65aab93 100644 --- a/drivers/net/dsa/bcm_sf2_cfp.c +++ b/drivers/net/dsa/bcm_sf2_cfp.c | |||
@@ -755,7 +755,8 @@ static int bcm_sf2_cfp_rule_set(struct dsa_switch *ds, int port, | |||
755 | port_num = fs->ring_cookie / SF2_NUM_EGRESS_QUEUES; | 755 | port_num = fs->ring_cookie / SF2_NUM_EGRESS_QUEUES; |
756 | 756 | ||
757 | if (fs->ring_cookie == RX_CLS_FLOW_DISC || | 757 | if (fs->ring_cookie == RX_CLS_FLOW_DISC || |
758 | !dsa_is_user_port(ds, port_num) || | 758 | !(dsa_is_user_port(ds, port_num) || |
759 | dsa_is_cpu_port(ds, port_num)) || | ||
759 | port_num >= priv->hw_params.num_ports) | 760 | port_num >= priv->hw_params.num_ports) |
760 | return -EINVAL; | 761 | return -EINVAL; |
761 | /* | 762 | /* |