From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: [PATCH v2 net-next 4/6] net: dsa: mv88e6xxx: Print offending port when vlan check fails Date: Tue, 7 Nov 2017 00:02:29 +0100 Message-ID: <1510009351-21875-5-git-send-email-andrew@lunn.ch> References: <1510009351-21875-1-git-send-email-andrew@lunn.ch> Cc: netdev , Vivien Didelot , Florian Fainelli , Andrew Lunn To: David Miller Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:45267 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752331AbdKFXEe (ORCPT ); Mon, 6 Nov 2017 18:04:34 -0500 In-Reply-To: <1510009351-21875-1-git-send-email-andrew@lunn.ch> Sender: netdev-owner@vger.kernel.org List-ID: When testing if a VLAN is one more than one bridge, we print an error message that the VLAN is already in use somewhere else. Print both the new port which would like the VLAN, and the port which already has it, to aid debugging. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 420621c759e4..0a4a740ebea6 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -1151,8 +1151,8 @@ static int mv88e6xxx_port_check_hw_vlan(struct dsa_switch *ds, int port, if (!dsa_to_port(ds, i)->bridge_dev) continue; - dev_err(ds->dev, "p%d: hw VLAN %d already used by %s\n", - port, vlan.vid, + dev_err(ds->dev, "p%d: hw VLAN %d already used by port %d in %s\n", + port, vlan.vid, i, netdev_name(dsa_to_port(ds, i)->bridge_dev)); err = -EOPNOTSUPP; goto unlock; -- 2.15.0