Skip to content

Commit d50b1a8

Browse files
IoanaCiorneidavem330
authored andcommitted
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: Simon Horman <[email protected]> Signed-off-by: Ioana Ciornei <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7218e96 commit d50b1a8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ static int dpaa2_switch_port_add_vlan(struct ethsw_port_priv *port_priv,
289289
int err;
290290

291291
if (port_priv->vlans[vid]) {
292-
netdev_warn(netdev, "VLAN %d already configured\n", vid);
292+
netdev_err(netdev, "VLAN %d already configured\n", vid);
293293
return -EEXIST;
294294
}
295295

@@ -1774,8 +1774,10 @@ int dpaa2_switch_port_vlans_add(struct net_device *netdev,
17741774
/* Make sure that the VLAN is not already configured
17751775
* on the switch port
17761776
*/
1777-
if (port_priv->vlans[vlan->vid] & ETHSW_VLAN_MEMBER)
1777+
if (port_priv->vlans[vlan->vid] & ETHSW_VLAN_MEMBER) {
1778+
netdev_err(netdev, "VLAN %d already configured\n", vlan->vid);
17781779
return -EEXIST;
1780+
}
17791781

17801782
/* Check if there is space for a new VLAN */
17811783
err = dpsw_get_attributes(ethsw->mc_io, 0, ethsw->dpsw_handle,

0 commit comments

Comments
 (0)