From patchwork Wed Jan 4 13:06:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Schultz X-Patchwork-Id: 3555 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp5137977wrt; Wed, 4 Jan 2023 05:17:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXu9ETkNaz8G552cSguKdd+P3HGH523VEuuQONUrag54roUHOtN+LgZmhOQrBPIWRsgY81Er X-Received: by 2002:aa7:d653:0:b0:47e:15ec:155e with SMTP id v19-20020aa7d653000000b0047e15ec155emr39056583edr.26.1672838230740; Wed, 04 Jan 2023 05:17:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672838230; cv=none; d=google.com; s=arc-20160816; b=t6QJR/aTekRDwGyjcKb6SWSB1rj+s7YzK2VOBG9hM9xCPyx0NQjDN3EwE1LGO9Yq4g y0y3YSpDOmfzWMxhsPMfj7lZ0je0Hh4/miMdqvx5LIsOL+eBl00yNiCQEdTCccTlZ9k6 M9UU9nZQU+kyT4fCQDces+WdkyHH0RDlmPVFTP00S1Xk1ossnj5zJkKIDCD8jpWQ39Q0 39Bg9vFuO9xOv60gQCAkDwCyqxPLRtwL0ZdRg9cO3Kzhb5NTcgwhv78hVGhD/yRJ/3GO Y62OT2fi5Q4LAMPZOI1w7JtJradxVOH0ybBGZaProUQT2hagdLTeqXj41jdX/whMOwzx m0mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:message-id:date:subject:cc:to:from; bh=QCKGvn3Dd0dw0rtTNrNw0+vWjwXMsYNahqYa4V4ScuE=; b=Gs/48bWB78HJ2LELu8z9Xq0jTJILZmwekk5qiQCVPCenOe/Jz4o5DID2xBsIs5jEdC asWxFcgegLSLy8Iv6CKaPYacimi8feeR/K/jIbZdsyyHViGbtbXeUQwtV7OVsohZ+9ld kOzH856u88ic2RsswrkdHRAXrET8RnW++NstYXpDOqpzfMCjE6XFEFulaZ2sdwUhn1J7 szpILIDR9GknWu3Xcpgiv+aokUJ08NDXevcH3MG1kWJSZW5o2FrzVVoIrn0Gy94O5SWJ nrCbWfCxtGUwgWzNUjEXgwJ2twWaAGXafBAPsBugO6on87I//LnUwq3z951nHF3jcUIw mpGg== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bc3-20020a056402204300b0046311e80ebcsi27390315edb.151.2023.01.04.05.16.44; Wed, 04 Jan 2023 05:17:10 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239495AbjADNJp (ORCPT + 99 others); Wed, 4 Jan 2023 08:09:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239480AbjADNIq (ORCPT ); Wed, 4 Jan 2023 08:08:46 -0500 Received: from mailout-taastrup.gigahost.dk (mailout-taastrup.gigahost.dk [46.183.139.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 137AB34773; Wed, 4 Jan 2023 05:07:41 -0800 (PST) Received: from mailout.gigahost.dk (mailout.gigahost.dk [89.186.169.112]) by mailout-taastrup.gigahost.dk (Postfix) with ESMTP id 8913818838C8; Wed, 4 Jan 2023 13:07:37 +0000 (UTC) Received: from smtp.gigahost.dk (smtp.gigahost.dk [89.186.169.109]) by mailout.gigahost.dk (Postfix) with ESMTP id 67F59250007B; Wed, 4 Jan 2023 13:07:37 +0000 (UTC) Received: by smtp.gigahost.dk (Postfix, from userid 1000) id 5B4689EC000D; Wed, 4 Jan 2023 13:07:37 +0000 (UTC) X-Screener-Id: 413d8c6ce5bf6eab4824d0abaab02863e8e3f662 Received: from fujitsu.vestervang (2-104-116-184-cable.dk.customer.tdc.net [2.104.116.184]) by smtp.gigahost.dk (Postfix) with ESMTPSA id 1508791201E3; Wed, 4 Jan 2023 13:07:37 +0000 (UTC) From: "Hans J. Schultz" To: davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, "Hans J. Schultz" , Andrew Lunn , Florian Fainelli , Vladimir Oltean , Eric Dumazet , Paolo Abeni , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 net-next 0/3] mv88e6xxx: Add MAB offload support Date: Wed, 4 Jan 2023 14:06:00 +0100 Message-Id: <20230104130603.1624945-1-netdev@kapio-technology.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Organization: Westermo Network Technologies AB X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754098020443442861?= X-GMAIL-MSGID: =?utf-8?q?1754098020443442861?= This patchset adds MAB [1] offload support in mv88e6xxx. Patch #1: Correct default return value for mv88e6xxx_port_bridge_flags. Patch #2: Change chip lock handling in ATU interrupt handler. Patch #3: The MAB implementation for mv88e6xxx. LOG: V2: -FID reading patch already applied, so dropped here. [1] -Patch #2 here as separate patch instead of part of MAB implementation patch. -Check if fid is MV88E6XXX_FID_STANDALONE, and not if fid is zero, as that is the correct check. Do not report an error. [1] https://git.kernel.org/netdev/net-next/c/4bf24ad09bc0 Hans J. Schultz (3): net: dsa: mv88e6xxx: change default return of mv88e6xxx_port_bridge_flags net: dsa: mv88e6xxx: disable hold of chip lock for handling net: dsa: mv88e6xxx: mac-auth/MAB implementation drivers/net/dsa/mv88e6xxx/Makefile | 1 + drivers/net/dsa/mv88e6xxx/chip.c | 20 +++--- drivers/net/dsa/mv88e6xxx/chip.h | 15 +++++ drivers/net/dsa/mv88e6xxx/global1_atu.c | 22 +++++-- drivers/net/dsa/mv88e6xxx/switchdev.c | 83 +++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/switchdev.h | 19 ++++++ 6 files changed, 147 insertions(+), 13 deletions(-) create mode 100644 drivers/net/dsa/mv88e6xxx/switchdev.c create mode 100644 drivers/net/dsa/mv88e6xxx/switchdev.h