From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 831CAC31E4B for ; Fri, 14 Jun 2019 20:33:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 50B1D2084D for ; Fri, 14 Jun 2019 20:33:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560544415; bh=jeaNWuI05inyN5HcOjRsqx9ljew0ue6FHMDc9e2tx5g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ZS/2xMZOab+BIhEfDBvzouOYaggMkwExHfWSZhqs0N+ZBk951a1lI6Vl6BSKBZeOw n8y52N+sZ7bn6ZWollsAo0dVic7eyGvV86EmVvls+L1qkj1HRY2IxEvFg4jeBC4kjU brSTaO8ZfOOy09HB887p/52w1sjB2qie5H9H3Ong= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727625AbfFNUa1 (ORCPT ); Fri, 14 Jun 2019 16:30:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:53418 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727620AbfFNUa1 (ORCPT ); Fri, 14 Jun 2019 16:30:27 -0400 Received: from sasha-vm.mshome.net (unknown [131.107.159.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9A87D2184E; Fri, 14 Jun 2019 20:30:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560544226; bh=jeaNWuI05inyN5HcOjRsqx9ljew0ue6FHMDc9e2tx5g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U0pwmIQNT3CzqFtKGN8xdafC6XIcyiwo72h7t22+CC7CL6bw9rLer1ggF69unDqaw eIbP1h5cg9u8bkhoM5fJgTtrGm3I6oxX5iXmivBKkElp22Yq04cn9JGNohOE/fczLq 1F0nLqfs0kHOLwRq2jzUaENQ+Ys7sQwBoWrHaoJM= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nikita Yushchenko , Vivien Didelot , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.14 12/27] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0 Date: Fri, 14 Jun 2019 16:30:01 -0400 Message-Id: <20190614203018.27686-12-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190614203018.27686-1-sashal@kernel.org> References: <20190614203018.27686-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Nikita Yushchenko [ Upstream commit 62394708f3e01c9f2be6be74eb6305bae1ed924f ] When non-bridged, non-vlan'ed mv88e6xxx port is moving down, error message is logged: failed to kill vid 0081/0 for device eth_cu_1000_4 This is caused by call from __vlan_vid_del() with vin set to zero, over call chain this results into _mv88e6xxx_port_vlan_del() called with vid=0, and mv88e6xxx_vtu_get() called from there returns -EINVAL. On symmetric path moving port up, call goes through mv88e6xxx_port_vlan_prepare() that calls mv88e6xxx_port_check_hw_vlan() that returns -EOPNOTSUPP for zero vid. This patch changes mv88e6xxx_vtu_get() to also return -EOPNOTSUPP for zero vid, then this error code is explicitly cleared in dsa_slave_vlan_rx_kill_vid() and error message is no longer logged. Signed-off-by: Nikita Yushchenko Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 172b13012e10..086603de1859 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -1075,7 +1075,7 @@ static int mv88e6xxx_vtu_get(struct mv88e6xxx_chip *chip, u16 vid, int err; if (!vid) - return -EINVAL; + return -EOPNOTSUPP; entry->vid = vid - 1; entry->valid = false; -- 2.20.1