Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp981035rwd; Wed, 31 May 2023 08:00:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5XPrHEk85LcNG4F0Wf7LDOx0QRvUIhq6eNpLEzk0iKwYzRVVDJwZA4p09q9j1s54GtN1+P X-Received: by 2002:a05:6a00:8ca:b0:64d:6a78:1575 with SMTP id s10-20020a056a0008ca00b0064d6a781575mr5574450pfu.30.1685545247168; Wed, 31 May 2023 08:00:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685545247; cv=none; d=google.com; s=arc-20160816; b=DZlMRXcng+RLWaHcLfwcQ3pB8VV3QVh5YbRYj0aFrden3a0PKeUsptWPtJadQoGKwO HPtS5sduqLUcIlry/zqO1meon1y+LLKzqXGcLEd2rawJ/TCtZTe7bYy4VHR32TyCw/k3 AmBBNDySYnptNLp7DQ36SBDzrF+kPQYgOMrLNz+tzaw2htHrGWJspVd73WZDIfbRHMhl Ylpdz43XQ5zOaXNV7sYSZ2ZmnkvTQgNTQLqz0fEtNaIdc+Q1TBuOUa89iInYTKjQkdwB z/C6OrV4iOMy2iC/NFk5pFeX8oTfSsJECI6ulyM9838XJYnP0tg416p5BowvGRH+lYoS vRog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=Q5MncjXbUhGj9SPEdiG5OjpwELpZmxsuNDM0CyWnhpo=; b=04C6ink9UGmM+AEg+jfoEDOxbyczWUL7jUgt6EpzD6ncXXvk/FgCwie+m/wygcMTxf 2AwrhuGnGh90BHHA35I8+bfTrXOckLhHsCiYpppJ4xsq4x9Fw9aDaXDCWOb5IrVqmaw8 B2OZXe92sOqJ/bxU+eUZun2kLJYAl9WjOmKDZkJIwc1ATcUfJQ9hrEfbo8nlMXD3FISu fR9+XhMH8CzOWXuJYSGMGeWnHB238+Df1YmHtP5qamsTJREQ1Yzi2y9qgxwZGnTv+jqb LjwmftEYy9adjM7aDpSwxvmys9THexl//g8Q/tqJHvpPS81Y3gN0thvACCuD6C3MgWyr pGIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=Jet+87ef; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q5-20020aa79605000000b00643bc9d1245si508342pfg.314.2023.05.31.08.00.32; Wed, 31 May 2023 08:00:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=Jet+87ef; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237133AbjEaOiw (ORCPT + 99 others); Wed, 31 May 2023 10:38:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236722AbjEaOiv (ORCPT ); Wed, 31 May 2023 10:38:51 -0400 Received: from mta-64-226.siemens.flowmailer.net (mta-64-226.siemens.flowmailer.net [185.136.64.226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3767D98 for ; Wed, 31 May 2023 07:38:48 -0700 (PDT) Received: by mta-64-226.siemens.flowmailer.net with ESMTPSA id 20230531143844c395c61cb0bd186de3 for ; Wed, 31 May 2023 16:38:44 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=alexander.sverdlin@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc; bh=Q5MncjXbUhGj9SPEdiG5OjpwELpZmxsuNDM0CyWnhpo=; b=Jet+87efV8bUdoa02xDT4dcyiIkIgPVfZh8m+0Y0+qs4fZ75RPUTbxk1zcXpexpFERIRQx LBejygdXaqbtjc9SfsSJg/FgOGaGDCyiBI1Z2RvxH9J9cRfWSkdi8WyER757m36r109J/EUf Fq3Iuy99Dh0jkdwahvxNB+hR1Jgic=; From: "A. Sverdlin" To: netdev@vger.kernel.org Cc: Alexander Sverdlin , Vladimir Oltean , Andrew Lunn , Florian Fainelli , linux-kernel@vger.kernel.org, Egil Hjelmeland Subject: [PATCH] net: dsa: lan9303: allow vid != 0 in port_fdb_{add|del} methods Date: Wed, 31 May 2023 16:38:26 +0200 Message-Id: <20230531143826.477267-1-alexander.sverdlin@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-456497:519-21489:flowmailer X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Sverdlin LAN9303 doesn't associate FDB (ALR) entries with VLANs, it has just one global Address Logic Resolution table [1]. Ignore VID in port_fdb_{add|del} methods, go on with the global table. This is the same semantics as hellcreek or RZ/N1 implement. Visible symptoms: LAN9303_MDIO 5b050000.ethernet-1:00: port 2 failed to delete 00:xx:xx:xx:xx:cf vid 1 from fdb: -2 LAN9303_MDIO 5b050000.ethernet-1:00: port 2 failed to add 00:xx:xx:xx:xx:cf vid 1 to fdb: -95 [1] https://ww1.microchip.com/downloads/en/DeviceDoc/00002308A.pdf Fixes: 0620427ea0d6 ("net: dsa: lan9303: Add fdb/mdb manipulation") Signed-off-by: Alexander Sverdlin --- drivers/net/dsa/lan9303-core.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c index cbe831875347..c0215a8770f4 100644 --- a/drivers/net/dsa/lan9303-core.c +++ b/drivers/net/dsa/lan9303-core.c @@ -1188,8 +1188,6 @@ static int lan9303_port_fdb_add(struct dsa_switch *ds, int port, struct lan9303 *chip = ds->priv; dev_dbg(chip->dev, "%s(%d, %pM, %d)\n", __func__, port, addr, vid); - if (vid) - return -EOPNOTSUPP; return lan9303_alr_add_port(chip, addr, port, false); } @@ -1201,8 +1199,6 @@ static int lan9303_port_fdb_del(struct dsa_switch *ds, int port, struct lan9303 *chip = ds->priv; dev_dbg(chip->dev, "%s(%d, %pM, %d)\n", __func__, port, addr, vid); - if (vid) - return -EOPNOTSUPP; lan9303_alr_del_port(chip, addr, port); return 0; -- 2.40.1