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 C0EC3C31E4E for ; Fri, 14 Jun 2019 20:32:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E7AA21841 for ; Fri, 14 Jun 2019 20:32:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560544321; bh=RAAjmpNtKl3dcwPPtQ6DsSF5L3wkALcUxwx4JUzlU1s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=EdCPSC0F5nXj8JYIsjSfhWW19J8VQAf0znXEmEoYC3CzcXCaHiLLSpvkm1S7T8H1L /JHPEl2HXd641sX5lxnEc7umuR9842edseOAScM4OaUdYsxqKFb6r5uk/twPp0bVaH +CnSLJ8CLCKLYo91CSdjyNOiX3+2pXgNS8+GND10= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727913AbfFNUar (ORCPT ); Fri, 14 Jun 2019 16:30:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:53932 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727824AbfFNUan (ORCPT ); Fri, 14 Jun 2019 16:30:43 -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 5D3BF2184B; Fri, 14 Jun 2019 20:30:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560544242; bh=RAAjmpNtKl3dcwPPtQ6DsSF5L3wkALcUxwx4JUzlU1s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=udXeWZK9sEu4BeeRvGcyPygKRolFsy94GFph6TIBhJirB+vxSl4VycdQvrke7j6/4 lSq6MUU2zcnBO6HT4gSJJ/Q9IIvwtvwEc6BQ3Gw69IQjKYlCoIf39p9EflYiG6FNnS K0Az/u8uxUbSidKV86dZZcI3mV85D40FlXWdYrEQ= 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.9 08/18] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0 Date: Fri, 14 Jun 2019 16:30:24 -0400 Message-Id: <20190614203037.27910-8-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190614203037.27910-1-sashal@kernel.org> References: <20190614203037.27910-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 dc510069d37b..2edd193c96ab 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -1742,7 +1742,7 @@ static int _mv88e6xxx_vtu_get(struct mv88e6xxx_chip *chip, u16 vid, int err; if (!vid) - return -EINVAL; + return -EOPNOTSUPP; err = _mv88e6xxx_vtu_vid_write(chip, vid - 1); if (err) -- 2.20.1