Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp137934imb; Thu, 28 Feb 2019 18:44:13 -0800 (PST) X-Google-Smtp-Source: APXvYqxYFkYfSim7iomraQAARjE2CSXMrM9a5i3CJUHgmIQHh3sv+G2ll0LbCog85CVCbX8ZXWfA X-Received: by 2002:a17:902:2f03:: with SMTP id s3mr2839819plb.277.1551408253244; Thu, 28 Feb 2019 18:44:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551408253; cv=none; d=google.com; s=arc-20160816; b=WEHaBSHzH1Hzpr5Tiay7O/V6kZreP3VAyPzDVn17t36XmoHJcb7Oa3aehwtiS3Wos4 QC9bJP3UF5lmzcY3DC2YT2dKSSYS2qAnfcRVPzsZRYKCSY5o1+nE784dOvRXHUKvGFcT PBDA+kZk6IG0qzhXuYlIoFxGLLNxch68XzXNluDWNcO9MyxMNzYKS2S0DGLOQ/Nk3lOj DY2XjWrzFbZcS26jXNfoAL0C1lVaOBQXbxYrgeCPcqYS8YTICUkQ73re0YEtpv6JbAfL Oum/BUZYt0QEEsBzNQ/82sAsifHIO0p20A3AB8hjs+l94o/sAsCW9hisOzCpQXTJmuoU wCfg== 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=cfeWYDhvrY7EVRmRpIjDOElTmvmNnMw6E+QdE24yh/E=; b=nCb8W3N8k19gUHRcs+vI1FTNUfo4oill6yclX5RWNCmoTB5t0pargSJ7Lhd6/jFlHD kXlfeT9lxsNzRQ1iRf86cHoouTrZgzK0rTMzpIDxbJZuCTcLgFVk0Db5HpnhS2+oTptD viOgvEyOeI9B+I0+ieoTA5gEdoGMOdCOeqBqv/B7Hdb2YaExSq9VCKdFf9CMfzHVqdiI Gcw6NaoBj3Sqxdl57yk/cDJ1Uy/ruo92A7ddCKytoEoc6mV/OnxMBZ5CVdJYGG7z3eKe YUyH5zz2imUQ8zRxrVYJkE0hAJRdZDXpsF27mwcltPjYA3G66qmqoNMRPYYCeDZBNfTK 6/fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nfWwrqtQ; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f3si19680421pld.358.2019.02.28.18.43.25; Thu, 28 Feb 2019 18:44:13 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=nfWwrqtQ; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728807AbfB1Xtw (ORCPT + 99 others); Thu, 28 Feb 2019 18:49:52 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:38743 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbfB1Xtv (ORCPT ); Thu, 28 Feb 2019 18:49:51 -0500 Received: by mail-pg1-f196.google.com with SMTP id m2so10488631pgl.5; Thu, 28 Feb 2019 15:49:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=cfeWYDhvrY7EVRmRpIjDOElTmvmNnMw6E+QdE24yh/E=; b=nfWwrqtQvbDAzHdIGV8h5jIBUStU7xeay5fYDOjqTpEfu+1jqv96nKnrcfv+3yEESP 07Wylj6B/lu3d/qIc5hZBt+7ItmK1jqlhE0hgcEDGMR+3EZdY3j6ThjxdnUu2xnVxE0F DD0d69gUVH0BdArMD52BHlrxWBxW6CQUshG7e/f0BB4CdjBF796O5QGTXAAl5/e7owVq wqbgEL8Hmna0xbBid1bmmZkU5/2ovviz9EHpif/0z7RDn0JKS13mIn5ZWeEO6y+ynZ4i 5iUGkupQ6yPziOSQgUy98VM+Oz8v3dhwOaH7BpOL67WY0zgZVynrrKNxI3BLURJjTja7 zVOQ== 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=cfeWYDhvrY7EVRmRpIjDOElTmvmNnMw6E+QdE24yh/E=; b=HXeKIMrz7O5rJlQ+832ssR9ePUvuMgs5O6MWhth0mpMEqfq5qSQXgq/vbJcqig154q qDjWzqNMqbEHSsZ4dswQ1FB1pui/KH5gPCz4jq4KMk7CzUNA/I974LJuUMMsznyr9DhM mE4RwYUXCGVZuYYL1swDEsMD75ZlC1a2ssK+blCVMolXTiRDnWZi4hIu9UU14n7/6WwV pv9LAEbT6rVv3cPf0UwFJ05b5ktJFUmnXl3H9wsgX5zPlHJF+jn8CPuU5gK/jS0Jm0zJ rVZ4n4VjREVxuRZ7r0RefiBs8i1l+JsqUlIg3PZrYhUBEHjiomMAADsI4TB/BaJE+Zwo mFFw== X-Gm-Message-State: APjAAAXeKE2xXr54l6Fa9oRBezMbFVIH9lRnM/pGg0plG4xlPOSXKo87 /bEcnIwu/OHfuGJ6KfAE5KOfRCEp X-Received: by 2002:a63:e310:: with SMTP id f16mr1746826pgh.93.1551397789653; Thu, 28 Feb 2019 15:49:49 -0800 (PST) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id q207sm24090667pgq.88.2019.02.28.15.49.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Feb 2019 15:49:48 -0800 (PST) From: Florian Fainelli To: netdev@vger.kernel.org Cc: Heiner Kallweit , Florian Fainelli , Andrew Lunn , Vivien Didelot , "David S. Miller" , linux-kernel@vger.kernel.org (open list) Subject: [PATCH net-next] net: dsa: Do not configure VLAN ID 0 Date: Thu, 28 Feb 2019 15:49:36 -0800 Message-Id: <20190228234936.1593-1-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Because we skip the prepare phase, we would not get a chance to have the port_vlan_prepare() callback return -EOPNOTSUPP and tell us about that. This causes problems with mv88e6xxx which specifically checks for VLAN ID = 0. Turns out we do not actually need to program that VLAN ID since it should be the default one for switches anyway. Reported-by: Heiner Kallweit Fixes: 061f6a505ac3 ("net: dsa: Add ndo_vlan_rx_{add, kill}_vid implementation") Signed-off-by: Florian Fainelli --- net/dsa/slave.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 1808a2cd6872..ec54d579645a 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -996,6 +996,9 @@ static int dsa_slave_vlan_rx_add_vid(struct net_device *dev, __be16 proto, struct bridge_vlan_info info; int ret; + if (vid == 0) + return 0; + /* Check for a possible bridge VLAN entry now since there is no * need to emulate the switchdev prepare + commit phase. */ @@ -1029,6 +1032,9 @@ static int dsa_slave_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, struct bridge_vlan_info info; int ret; + if (vid == 0) + return 0; + /* Check for a possible bridge VLAN entry now since there is no * need to emulate the switchdev prepare + commit phase. */ -- 2.17.1