Received: by 10.213.65.68 with SMTP id h4csp364270imn; Tue, 13 Mar 2018 06:53:22 -0700 (PDT) X-Google-Smtp-Source: AG47ELu9f61d9vQy3P67WjXiPCqLgI4unYH3IOjP02+aX6ZIdgJZcyoC3gmqe4yxdT94HGIsnCvp X-Received: by 10.99.165.22 with SMTP id n22mr564656pgf.53.1520949202439; Tue, 13 Mar 2018 06:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520949202; cv=none; d=google.com; s=arc-20160816; b=ZW8zxre6TjWQpXJDgP/WV0gC7qdeQzgeqChkZVR91ks7QxjA7sBiKm3VQ96AeGMkFw OC4hODV/+cPsRTcGw4cCpiMFNejM/mfMu/FDNmIw/qpBWYBTGDm8FQGm5QpiH0E9mp78 0hpYkxUygivUJtfcZSRg4AxJVvWgN9GGOqAqkYcWwSCEG/hvBvywCtsTcCqoEIcAUuXb UdFG0eH43YEZc1wPVBaNrpgbY+sKddklc6ZT8A/7ya75zZDIgzm7jD+aJu+G4QU94svj /0e5RuiQAmx974MXgGOUcMYdKnSCCKQT2Rs3GsFMRbKtqQStS/FI+gR1sF698HLr+tp3 +xIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=x4qFoyonwOa/v1kFSrygG4W9C40FL0DCBOquZEXodNM=; b=mH+UigRS4oHJyJ7AaWxKZzMwJhNtFpvmBSfZHhuU0w5JlJuX9Uzq2ewYwUIzRynB9r P+njBdq7sJvP6duPade5/mi7ELO7F372g+4DW0a09smo4H8S+FCpVLKHK6mQfCsoJRRC CHRStrDOF3Zkwetrtuxri9qnvkORRi5r38EPNRNqGIKcKjEMMIPUKJxp06M/8z08yZsV VNmSfIY5/TIj//NmpKtEi/+tU0IIr03BwnMlWFuKFRwLyTDuKvRqp2gpcXHZ2ajAygFP lb1yyBHDCXQg/mNCArl0nyM22uWE4eD/b88svQm2KsrvyRYfOTrBxL9Y+bYo8visFKhH /kDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=ncNw1pCb; 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=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1-v6si137460ple.654.2018.03.13.06.53.07; Tue, 13 Mar 2018 06:53:22 -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=@nxp.com header.s=selector1 header.b=ncNw1pCb; 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=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753124AbeCMNwS (ORCPT + 99 others); Tue, 13 Mar 2018 09:52:18 -0400 Received: from mail-he1eur01on0044.outbound.protection.outlook.com ([104.47.0.44]:54676 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752547AbeCMNwO (ORCPT ); Tue, 13 Mar 2018 09:52:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=x4qFoyonwOa/v1kFSrygG4W9C40FL0DCBOquZEXodNM=; b=ncNw1pCbwdzF1rPpmrUCCdB4BgVE4nUKXMW/FEhOPcOnadOUMj6zhvm2R9wF8qzeeHytEMd9Wy/HAu6irsRxUuYQbPQyGZGMcO/lZWpyKCCYRWSofG0hFXGRbqzT9LpLTi9oGrsPs243yEsrst64v1leR36u2a6rKTZ2p0+1r18= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=razvan.stefanescu@nxp.com; Received: from rhuath.am.freescale.net (192.88.168.1) by DB3PR04MB0747.eurprd04.prod.outlook.com (2a01:111:e400:9440::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.567.14; Tue, 13 Mar 2018 13:52:07 +0000 From: Razvan Stefanescu To: gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, agraf@suse.de, arnd@arndb.de, alexandru.marginean@nxp.com, ruxandra.radulescu@nxp.com, ioana.ciornei@nxp.com, laurentiu.tudor@nxp.com, stuyoder@gmail.com Subject: [PATCH v5 0/6] staging: Introduce DPAA2 Ethernet Switch driver Date: Tue, 13 Mar 2018 08:51:50 -0500 Message-Id: <20180313135156.3322-1-razvan.stefanescu@nxp.com> X-Mailer: git-send-email 2.8.3 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.88.168.1] X-ClientProxiedBy: DM3PR12CA0069.namprd12.prod.outlook.com (2603:10b6:0:57::13) To DB3PR04MB0747.eurprd04.prod.outlook.com (2a01:111:e400:9440::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d32936fd-8c96-406e-d5c0-08d588e99d6a X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:DB3PR04MB0747; X-Microsoft-Exchange-Diagnostics: 1;DB3PR04MB0747;3:bkWYMNMOcReiI8eN+pT0gLDAfhGMs3kWceNCBoTgUvZlzmBVk1145vUJ2Nig/vx+1dY5w2EeNoTiVSYu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SBT4HyrEVCyNoun1pfR836UVXUCRrY4MQXGZsSaJDDN5whKqwf/pD9zOApoxX+7qYQ5urMSxpmTwXHmdETN7zOZSgEMT24zonFGEm4WPWEJ8zdDxiN8Dp/8khZ80Om74/hiu84XkEUJFAgdK5HDZHXaAwOGmUzINVzeTI0dUD2Sz67G7gy4B44sMtw7zY4ukwjd1w4Gho/4+dpw1L7sqg1EQq/SMkLG4idPI3hryS2fJnQAF4lBYO2hpNrO2tmTZZ2XZ60knrSAg0ClGWLxKG1xEQ6c+NYpdsCJsIFkowVlei/aY6xhryNSS6T2F7o;4:dJuknfBIRUPB/Dm6Ni11/txqjtKU2BFI2JNJjUmHACazjxvtGfigqay7BhyoYeS4k6pNS8yiCwTi08P8AMjjomlKx8vac7Jc+pA1UXBu7liFp+C90aSlH2ou8lQIw5fmN983oA2+eP5zXUl57gQC4uG4K+gxhQieLf9bJ4WXPyCwjnhvN6lxP4dTrMiosuvTcbDHefL/vM+U87Mve3I59vWWOcfr4SrJehtg7AY8GtXFtNJSdKFJLGu9IQx0snwcWD3r9ELC2VQTA6N0ZWjjdu/dx+YJlsA6NxQOmRijICUxDmBxqH/j3nCipuAZ3pYW X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231221)(944501244)(52105095)(3002001)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:DB3PR04MB0747;BCL:0;PCL:0;RULEID:;SRVR:DB3PR04MB0747; X-Forefront-PRVS: 0610D16BBE X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(376002)(39380400002)(366004)(39860400002)(346002)(396003)(54534003)(189003)(199004)(1076002)(16526019)(186003)(6916009)(5660300001)(478600001)(50466002)(48376002)(3846002)(6116002)(8676002)(47776003)(6666003)(26005)(2906002)(7736002)(81156014)(66066001)(81166006)(6506007)(59450400001)(305945005)(386003)(25786009)(50226002)(52116002)(86362001)(8936002)(316002)(16586007)(39060400002)(36756003)(51416003)(106356001)(68736007)(6486002)(53936002)(2351001)(2361001)(4326008)(6512007)(97736004)(105586002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR04MB0747;H:rhuath.am.freescale.net;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DB3PR04MB0747;23:gPXo/b8BAch2OaEdapqOWFc5xiHj3S2D36HxUBxOi?= =?us-ascii?Q?O2UuhUFHnTJ/9WCjtE71ob2FrY9C9Bma9t8HVMAadZV3CSqrLRBJ7wCqonVc?= =?us-ascii?Q?IpuyyK7rsizw19y1yAGkV4BUVEQwFJxWTaQH+VEe0Lxu/G+c0V8nVoOLB1rr?= =?us-ascii?Q?FCYQF0jIFmrmND0GZt3mvmY9vJTLZClWFG5A4QJINlV9AYZj3VtD8juj2Kzv?= =?us-ascii?Q?NyCDoAbfm8VrcP0JcTQyVJT52Rs/KA4BgEmPJJm0lDBIz/Bb7z1PA6m4LLoQ?= =?us-ascii?Q?W/WRNlDqVa5eBT7QDaCKLBtUySstkd/M7WNYxvd6kotCOStTOOFrSHnUZaIW?= =?us-ascii?Q?gxAWx5LsslNQOhgUQuQkcMwFeYVG8uCrxBzSY8vDdVXFtEFP6Rl07CHdI2Wp?= =?us-ascii?Q?DIQtn5fR1TZ48YJbjUr26yIwxG0pz8kLQlPFjep1qc338+2zZ/nZbisRsjeL?= =?us-ascii?Q?vrINIs+ACSbf6UjNaaVvNsTUTQZivcjd1CfFBFnnVJtI6yHAit60FOvzoEH8?= =?us-ascii?Q?IGsPxI+lYQb1mDB4a+WwgwF4gankRZzrN6hIiXUueLsybeor8C0FFG4752qU?= =?us-ascii?Q?pKiArhv234jlPta2JhjDGxKdn8BovHir1KP245KXAN+b8W7LE1/69GRadzbn?= =?us-ascii?Q?LGRMe2wodcqIk09VlFMDRkbREA7tq4jt0w+4KYYHQgKcD+u+CsWQ+A/103GE?= =?us-ascii?Q?29x6x583oibTJfhBLNRLPyXaQQkYAhlRdtPobKGt/O4R8kyGhf+A77XB7e7q?= =?us-ascii?Q?e8fSOVRO3RD0rKJNANMg9yHIPWoEnwg06icl6l8bHFthTpLbEpb6e1fliwjO?= =?us-ascii?Q?9fGm+H3QfRqwb78QmwCavNSJltvjmgULVIltuFBoI9r5pEvbMRzlV9uFQBnr?= =?us-ascii?Q?AzNLji2TPyAHm+GfKR7kxWrgkfCqCR6Pzn7i3c8UzNvwI7yJ2EEIlkaffC6r?= =?us-ascii?Q?oAWs411vp7gwif0wOv1UHtazoO/pRC3HHJTxj3x90hWMRdKGFZvXEGpGyU1v?= =?us-ascii?Q?JEqTMsk3nChiiud6EyEt65hLZCD62TfGEgr1aaQPI3PAnOxZwvFIiiWbbH8k?= =?us-ascii?Q?9Nk/QyKJU83pjmWze9WDjqhMf+YqDDzc5yjLEKAD1dEMBVh/N0CphU+RvOPH?= =?us-ascii?Q?IkmIUOAImILXf5wvNXWDjUr0aMoBMzvKC/UU3Hdtpm39+MIEOMVCv7VhBq87?= =?us-ascii?Q?GiUFPIA9sFm2Gc=3D?= X-Microsoft-Antispam-Message-Info: IcbxiMk1Gh5J12/AAdDhfT6tc8H70zuJGvUbBFmGN/ShwHQyT+lmVR9nWbMKtn1lxK0tEgECsCqTaZXRfxZIO30Uw7Op47PQHzYelny4JoNPXn7X9GjVE8AfpDvu+nI9uJ6kVgR8qf8odgluZbTHsnHJ98g8LoJ2B82cnGPZ2U4z8cCAEiF4PYFn9z1SAmcJ X-Microsoft-Exchange-Diagnostics: 1;DB3PR04MB0747;6:RGZwwCEGgW1HjK6BWiN7qdsTniW/nT80vfg32QbTzs+AjjTJRgF8UoMfp9Glpkau1h90XaqnqY+wdcjT/aXIubeJR3wVjq4XETzQ+lG7dfFAUDF2ftYRKmw57OsLJAm7AS7tpXJ1GvvMBaDQmGxh8qPje8tg4eebP86tNj1v9pIupNA0sPmUQUJyEJuJgPU0gKYhCjcKaVKYjgOn80zF1O5+xYCsWHKByGRFM/bA9dRunS3mDvY5TLJq24KzpEkQPzfD97bLS85C/t8w1MG6VSNXWTl7iLB4ijyZOUGMUSTwdRfo/r1PKK2lJBEiAupOAo7ykNUH6/JUCl3dgA58OuryscjdMkOa2qmsl9NAmzk=;5:amyAHBIQIcq5ZxrkptcXAf0hpciwYbodr+KthZCV6xo9VrreXcmFlQbAHdIsUFTQZz35fQZI8tHKDNQevn1cJF5tygMrXek4iLg4852udWXAwFk7nwt4ZI+uWKshBhPLk7wOj9dqQnS17cm1iWRn994ti80Y9IbE5A/EN0UczJ8=;24:ZfieQ2/uWHxOHME7lRdDEO29CndbNyos+/9/UjElP40sPiX2vTkkD/sEtbSuiHNCL3CqJ6myhBtgmD2c0GcZQFDBwImrrlc1UMOZW1MrAr8=;7:P71B5s7uH4nPtF4YuY4M99oosKTu54EJ5YYsA5w4C6JrOkAYi03CxdgGzeNwRrJIknpvm2feokunUgPCW+sgMV6RmL00xfWEdiXMNZGXzb1JmEm9eNshNHPA1bn8CrjgPBMIESlXhMS+2e/xy9yQFFTJYkgVRrIEN65NHR5EsvaSmhf5S0/E271vxbiGYC56yaODn5X0oLR+uEBH1QMSHXibWdBICtjw7xEG9zWXqU/kdstDXPUnATnFM3QjauWu SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Mar 2018 13:52:07.2574 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d32936fd-8c96-406e-d5c0-08d588e99d6a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR04MB0747 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset introduces the Ethernet Switch Driver for Freescale/NXP SoCs with DPAA2 (DataPath Acceleration Architecture v2). The driver manages switch objects discovered on the fsl-mc bus. A description of the driver can be found in the associated README file. The patchset consists of: * A set of libraries containing APIs for configuring and controlling Management Complex (MC) switch objects * The DPAA2 Ethernet Switch driver * Patch adding ethtool support Limitations: * no support for control traffic to/from CPU * only DPSW ports can be added to a bridge Changelog: v2: addressed comments from Bogdan P. v3: addressed comments from Andrew L. (patch 3/6 updated) v4: adjust to moving MC-bus out of staging support adding/deleting multicast entries to/from FDB avoid triggering console stack traces due to benign MC errors refactor TCI setting code to avoid code duplication fix sparse warning v5: addresed comments from Andrew L. (patch 2/6 updated) replace ethsw_irq0_handler() with NULL do not allow adding ports of the same switch to multiple bridges Razvan Stefanescu (6): staging: fsl-dpaa2/ethsw: Add APIs for DPSW object staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver staging: fsl-dpaa2/ethsw: Add ethtool support staging: fsl-dpaa2/ethsw: Add maintainer for Ethernet Switch driver staging: fsl-dpaa2/ethsw: Add README staging: fsl-dpaa2/ethsw: Add TODO MAINTAINERS | 6 + drivers/staging/fsl-dpaa2/Kconfig | 8 + drivers/staging/fsl-dpaa2/Makefile | 1 + drivers/staging/fsl-dpaa2/ethsw/Makefile | 7 + drivers/staging/fsl-dpaa2/ethsw/README | 106 ++ drivers/staging/fsl-dpaa2/ethsw/TODO | 13 + drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h | 371 ++++++ drivers/staging/fsl-dpaa2/ethsw/dpsw.c | 1148 +++++++++++++++++ drivers/staging/fsl-dpaa2/ethsw/dpsw.h | 611 +++++++++ drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c | 206 +++ drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 1532 +++++++++++++++++++++++ drivers/staging/fsl-dpaa2/ethsw/ethsw.h | 91 ++ 12 files changed, 4100 insertions(+) create mode 100644 drivers/staging/fsl-dpaa2/ethsw/Makefile create mode 100644 drivers/staging/fsl-dpaa2/ethsw/README create mode 100644 drivers/staging/fsl-dpaa2/ethsw/TODO create mode 100644 drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h create mode 100644 drivers/staging/fsl-dpaa2/ethsw/dpsw.c create mode 100644 drivers/staging/fsl-dpaa2/ethsw/dpsw.h create mode 100644 drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c create mode 100644 drivers/staging/fsl-dpaa2/ethsw/ethsw.c create mode 100644 drivers/staging/fsl-dpaa2/ethsw/ethsw.h -- 1.9.1