Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp253775ybi; Fri, 31 May 2019 00:36:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqymXuL5HYQIPzn2TG6RfgGF4hZ5XHn5F4ZdqDGSApYoR41A8AH6xiM//UweYZJKL/SCLx7j X-Received: by 2002:a17:90a:a608:: with SMTP id c8mr7135044pjq.37.1559288217483; Fri, 31 May 2019 00:36:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559288217; cv=none; d=google.com; s=arc-20160816; b=ZbPCUB9cE8UbRXC2IwpMCSSx8K+dFxtIvXhXt5SaGbvwq7uejl+/PwFhBbo2J8eXwa UxI2U2xtXrc7rxGTF/ESzSk2PaWRhknfyqxUslasmJVqLJ5tPD5ebSgF/IEx5nOZyGuA 07Z2zof9Pu2yHW2+EezS6fyF6rekC1TFITRfHA2VUsFw8vlUrDBAvrAP4zChHXbGMakx UEsSwhV3TfJSSnA5wmzm0YCCE1p2HOUHdGmjEFuWE+NjXB/Mu699rHYNwZxiT9JEC+rs B5Z+kBB0OJPd2aX4krGIwunbCDOWEWQ5jNitLofyHQ8fWtSjBPrENW0cv0m5c12fXjFm bpSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=s1a3ffK83MdLiV09gJmbZprosRcZAkmT+m5DPcFIxLc=; b=aE18+4w5B6JMZmrjFc7HIpR8ZmoRfaQEJ991OcoDbzSfmQ3+ZNI98BpoZGNl91ttAi gmHz5dIYCiwMOkvfsnY9REeje1W3TlfsKsHYwzgiZU0TZPa9uHRUrvQDSRl88lrvdXR1 BTzIwfbdNOFGItdAM1YOJViMOqDbXzLMPsR9b0r1sguBw5LdIw1vSJTgQ5D/v8Xlwgyc I5gVBe0r9yyTzDGEzmfaWaBpIi74TMtRWdXC4QwwLgYLrNWNRH8VcVUeT3DSMtyvlYAV rAfFwQ+7WpD2+Akn54ybl0ZiPp5kmuxy6wNqLAAWcOWpAaXlHzpqU4Jqd3w7O126cniC l5Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b=2AtMxCgT; 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 w21si4886130pgh.251.2019.05.31.00.36.39; Fri, 31 May 2019 00:36:57 -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=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b=2AtMxCgT; 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 S1726824AbfEaHfX (ORCPT + 99 others); Fri, 31 May 2019 03:35:23 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:37228 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbfEaHfW (ORCPT ); Fri, 31 May 2019 03:35:22 -0400 Received: by mail-wr1-f66.google.com with SMTP id h1so5786116wro.4 for ; Fri, 31 May 2019 00:35:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=s1a3ffK83MdLiV09gJmbZprosRcZAkmT+m5DPcFIxLc=; b=2AtMxCgTOMoBq7V9O7ebISL00QYFiROr5UX+WTKR05o5v0dVhtwpjUbP0ywuufRSCM wDJrYJeUH9R+b+Jdvioau1ENioD6Qribz6U8CFcxipGne2CTrxV7FayE/+IjMGzbs7SX hat2IjnZnc9/hU12Tz3ql2SJJ4CmSrTRqwc2Ywi1FDgNePgDQuCg/1TpHAB8T9FW1XkQ BZ74F01wprRlXAXSZRb926n11MZcEKM3+M7QFr1h61RYzqu4crdrThXgG8xILJTnynpq nlTSIfG/d7CdNzdl43AjcOOQJId5ugbuwo9Z/vckY4v1NUuqJxSv9gbzAaB5JEEJxXBV pypw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=s1a3ffK83MdLiV09gJmbZprosRcZAkmT+m5DPcFIxLc=; b=NBpc2ur7wlWXEmBd17TMo55c450k8ftlrVZ8bU67XJ8f4u5w+gQV9zwQZ725Hdnin/ CxneHXCPCOMFSmVBmnTkW4SS8yYdClT7QWkx42SoEL5uvpgHe5ayMFHZBCXXxX8Vyijr hTx/yphTGtB4gy0VYO0Ew/kEqsmFozuOjLly9M+mxEKxpXxcMdBzkDdkFl0w0/2ZPF+4 2o7fSq3ZwLmsvQ5OhRbmAgdGChfFnKcVx4kIAETEBnm+76crHTcU6PGZF62+JHeYeYmh 42vig32ZPIL0ylWs6TI+UA2lbpfnnnZFXgkUal0Mg+ECfvE44/9bSErxC78MEmD67w/i 5JdA== X-Gm-Message-State: APjAAAVbZTOcd0Vkk78Th6/KXu3B0/+mxuWY9XB9IdUh/jkOFKMZZyaP dCcsD45jqTSpTxwCHGH3oTKLNnDbBsc= X-Received: by 2002:adf:dc04:: with SMTP id t4mr5714889wri.126.1559288121099; Fri, 31 May 2019 00:35:21 -0700 (PDT) Received: from cobook.home (nikaet.starlink.ru. [94.141.168.29]) by smtp.gmail.com with ESMTPSA id g5sm6021418wrp.29.2019.05.31.00.35.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 May 2019 00:35:20 -0700 (PDT) From: Nikita Yushchenko To: Andrew Lunn , Vivien Didelot , Florian Fainelli Cc: "David S. Miller" , Heiner Kallweit , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Russell King , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Healy , Nikita Yushchenko Subject: [PATCH] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0 Date: Fri, 31 May 2019 10:35:14 +0300 Message-Id: <20190531073514.2171-1-nikita.yoush@cogentembedded.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 28414db979b0..6b77fde5f0e4 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -1392,7 +1392,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.11.0