Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2246794ybd; Mon, 24 Jun 2019 03:14:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxzOoLqVcETpecKjqnm28kWbqVNHuoUe4uNT/9pyiGixnV2bppSnVFVjgcKHtY1gbNU8FN2 X-Received: by 2002:a17:90a:bb01:: with SMTP id u1mr23407176pjr.92.1561371279867; Mon, 24 Jun 2019 03:14:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561371279; cv=none; d=google.com; s=arc-20160816; b=pRG4+8zQxXZcA5NXcLaaHvAqNbE2BkNAua7IpL8OveEkCtA1I2RPc/ZbivSV5OOVa/ +YAzqB477fJTvXK8VXsq8TazIopm6+TTp6lZ137Ie1hpmkmH76OKzReggButmyE6VXTc H+xHUpyNXeIXSFlaZ9b5+zrNH3O/Dy9BI63vuGM8vYs5iYF0zfYaYNjL2D2Gc0k/oHv4 CeJVDFfmLfUgrrcySvVFWvYewFEfsraS34nLVzXM3BBQlmC9cA00IIjYpeKU6DL0dITu OkoG7XCzDSNsI7MrgGI2UME9zkdHjFOnAhHEGFRfnkzRk6ibhunSKRLRaFkKuKhnayKg Kq0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9AGQlX+6NVS8C58ReXp02tPwTvPz80PYCu+hi1UnjrY=; b=qin8fpYEugPnVAb/JD1D0UPN4QsULvmNPH9GlGVmK7b/5NUEBYHYBJYnapzs2G0vhi kfxi6cgPHcWj04bkaLz2FjaMNDXvuEjqsZKbQV6eFeQo40RROb4K+2vEghOaV1o9A0// jZP2Lw1UjhKVsIi5cjkJ11LN9EAy5L0Cl9jZn5Nm/i457suOA2nYbm/41BNXrSDeQBnE Rw5YI90se7pWdVFF0XY7sCz9aGECbHwA7ztEaieynZPL0COMnua8ioYZxFLCzdmGXJ7U u0AsE8MteAGL57Oj69RvFM0tia58oCZ7aeMNJ94/S4/cK/PfasdJoSzijtxOnWuUUDIR jFSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fDwtgCPF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h125si10416040pfb.176.2019.06.24.03.14.23; Mon, 24 Jun 2019 03:14:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fDwtgCPF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730264AbfFXKNf (ORCPT + 99 others); Mon, 24 Jun 2019 06:13:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:50434 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729927AbfFXKNe (ORCPT ); Mon, 24 Jun 2019 06:13:34 -0400 Received: from localhost (f4.8f.5177.ip4.static.sl-reverse.com [119.81.143.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EC1CD208E3; Mon, 24 Jun 2019 10:13:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561371213; bh=/HOzZ3tUCI58Vzm6Y/06mjVC11/HSZIq3LWJHbOOqJU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fDwtgCPF5Sa2dRLAWAnS+yD/0L0GNJy7O9c5RtSTGhwSJ97njRe9exxcPXOsn7rCr 4lZNj1Fotc//qan3kGLnZr+1zPilthqKS2PAHfZkaTXlxZAodYVfUga2RaG9dLCjOp IsufxfZk74PQvVujGxkMyJVdJtU4JgAkWFTdIU1U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nikita Yushchenko , Vivien Didelot , "David S. Miller" , Sasha Levin Subject: [PATCH 5.1 063/121] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0 Date: Mon, 24 Jun 2019 17:56:35 +0800 Message-Id: <20190624092323.999051754@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190624092320.652599624@linuxfoundation.org> References: <20190624092320.652599624@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ 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 720f1dde2c2d..ae750ab9a4d7 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -1517,7 +1517,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