Commit d50b1a8c authored by Ioana Ciornei's avatar Ioana Ciornei Committed by David S. Miller

dpaa2-switch: print an error when the vlan is already configured

Print a netdev error when we hit a case in which a specific VLAN is
already configured on the port. While at it, change the already existing
netdev_warn into an _err for consistency purposes.
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7218e963
...@@ -289,7 +289,7 @@ static int dpaa2_switch_port_add_vlan(struct ethsw_port_priv *port_priv, ...@@ -289,7 +289,7 @@ static int dpaa2_switch_port_add_vlan(struct ethsw_port_priv *port_priv,
int err; int err;
if (port_priv->vlans[vid]) { if (port_priv->vlans[vid]) {
netdev_warn(netdev, "VLAN %d already configured\n", vid); netdev_err(netdev, "VLAN %d already configured\n", vid);
return -EEXIST; return -EEXIST;
} }
...@@ -1774,8 +1774,10 @@ int dpaa2_switch_port_vlans_add(struct net_device *netdev, ...@@ -1774,8 +1774,10 @@ int dpaa2_switch_port_vlans_add(struct net_device *netdev,
/* Make sure that the VLAN is not already configured /* Make sure that the VLAN is not already configured
* on the switch port * on the switch port
*/ */
if (port_priv->vlans[vlan->vid] & ETHSW_VLAN_MEMBER) if (port_priv->vlans[vlan->vid] & ETHSW_VLAN_MEMBER) {
netdev_err(netdev, "VLAN %d already configured\n", vlan->vid);
return -EEXIST; return -EEXIST;
}
/* Check if there is space for a new VLAN */ /* Check if there is space for a new VLAN */
err = dpsw_get_attributes(ethsw->mc_io, 0, ethsw->dpsw_handle, err = dpsw_get_attributes(ethsw->mc_io, 0, ethsw->dpsw_handle,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment