Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759989AbbLCLLd (ORCPT ); Thu, 3 Dec 2015 06:11:33 -0500 Received: from mail-bn1on0096.outbound.protection.outlook.com ([157.56.110.96]:7536 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1759909AbbLCLL0 (ORCPT ); Thu, 3 Dec 2015 06:11:26 -0500 Authentication-Results: spf=none (sender IP is 192.88.168.50) smtp.helo=tx30smr01.am.freescale.net; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none;freescale.mail.onmicrosoft.com; dmarc=none action=none header.from=; From: <> To: CC: , , , , , , , , , , Madalin Bucur Subject: [net-next v5 0/8] dpaa_eth: Add the Freescale DPAA Ethernet driver Date: Thu, 3 Dec 2015 14:08:58 +0200 Message-ID: <1449144546-25438-1-git-send-email-madalin.bucur@freescale.com> X-Mailer: git-send-email 1.5.6.5 Reply-To: X-EOPAttributedMessage: 0 X-Matching-Connectors: 130936146842753075;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD035;1:WCDB3iKzpSOLlu8CfuxvUHZoG7fe98mE5lyKvnz6PrVAiNQ4OKsJbpYbcYgb16nEDeoG3w0UmbJOOcp8Bk1bpOIU4yYFZNJLjmUzsZQWCAeLhwWo6B+Rkn3YdZbp6Y/8WsI30w0ObKkpeNk/XG1m6KrVJp/t1Uph8C7cGWtW8zpCm9iDNstMbpVCwNqxDmXAGBaugPdCqtisZ5ebhMDK7yOkCSw4JRVXuG8h1s/M1Pb6H/ZR2Ak9pLC+w4k4eEOPG7DqJAZrR3EfbP/j1Vwd2dk2rJGuY5zUluvb582b3Vma/qNUeZWT3MToBq7eCUErAL8M67Mr30uMznedOuL4U3x1cvrfIL7oOTcgxEyubRn/lfnQ9963s8eiQZ88CNR2mdynRhI/IJsc85jvZmBvAJyM3o3mHo7P5EogX9n/rNKHRZcvZS3Du6rAw++w7Y9mfVaJnca/lTAmD5Y3tBdMdliaRBZYvCP2yPfTYBwLom4= X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2970300002)(428002)(189002)(199003)(36756003)(50466002)(47776003)(960300001)(11100500001)(5003940100001)(50226001)(48376002)(107886002)(78992003)(189998001)(5001960100002)(110136002)(5005630100001)(229853001)(2351001)(50986999)(105586002)(586003)(106466001)(97736004)(1220700001)(81156007)(53806999)(101416001)(19580395003)(19580405001)(43066003)(6806005)(33646002)(1096002)(104016004)(49486002)(15975445007)(5008740100001)(4001430100002)(77096005)(87936001)(60522002);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR0301MB2115;H:tx30smr01.am.freescale.net;FPR:;SPF:None;PTR:InfoDomainNonexistent;MX:0;A:0;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;BLUPR0301MB2115;2:6nIDhZ0fHb3ZAy5tS+uwzu2Ltv/GpMtXwpZxEL7x3OPwCIvcN9uEDLB5Wkdb3ojdfqKyHy4FiFZuT3j5fT5t3LjmU84yeeEbn5RYjDYsn4enBFfq8U995G5ekHkvkdRvbGsmzP70abqbbnIo4PqL4A==;3:OUR3LKkayoh5deS+ePvCz6GgB6jB7vp68JiLaXjx7P8DJLuu4GHL+5WGNI4YUJce4JAYvrHtA9ceHSiIu0cpJTEetOu4yX8kTi5OJJIMzBRw4I+Yx/6O3KZmpY0bkAGpanvDcaMXlUCoR3NkoBL8y5RY7jc//GnToKa5dNkIB9R4JpvAdYbPNuQzp48/wPCMBazXIi7DQhhYKF9B1so65hXDv5xX3lNQUNRhW3qkOYY=;25:8vYlT9TUohoj05YhZlaGpQHQ5xXjG5bgDJK4YlHkZJal4zGJ+ew6kbjNZ3uoT+Au7JhGyVYTZSB7iLXCcepq8LL1ADi0idba0JvHYX0HYZfT0MwwH3IpqvJzKQSCyqRiIrycUauIlW4dOnJ/SMzOIMrJWAzJFfbNy2L4OTizf5nN4hfG/1jPrvKm6Pi8f7+g+QuA/DQCv/zcwppWtVQKQKjIyqWbHIAbco3K5ua8CQvGUr5Bs+/itUJ7glhDhcHQRjjVsM+JYRE8pRngOWjr+g== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0301MB2115; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(101931422205132); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(3002001)(10201501046);SRVR:BLUPR0301MB2115;BCL:0;PCL:0;RULEID:(400006);SRVR:BLUPR0301MB2115; X-Microsoft-Exchange-Diagnostics: 1;BLUPR0301MB2115;4:ZNu2gtwW9OiKIAi2sHfg4MvInE6Q2E3D2WJZqnDPgXvjHwLUr3MN/oi61I2Lc9jKwhiVtmf0M05mVfeZDy55DiB4mmUT7514KdqCbvammtfEIYSA4i0jsYyRhYIzlm3eZL6+Qszzy0Icx4BF6MMO90wlqpUgltP6ZoOcdTAJ112ibLUYSmRTc/H5nRRaHLCvv6EV1sbmfvO0BG4D5ymoJapjEsTff4+FmOl3cf2fiVR5ZFQs41SprWFO8SLk9KgRhymg5kZf8fOsNgttuirgBAoHpmQHdCL+00ireGUspxEvS5L0B3451WHK0LlNebIVYgJOpXx6Hofaf8jAShSe5VN0sSSeR5fHeCLbk5FD3lb+kceOQXrWLWmpM3W8lXbAWPryoQchOM32ZzU+1WLHjtdnj+WxGmFyyOF8g3q0pG1CcDYh7oeLu8p+BU3JV4F6 X-Forefront-PRVS: 077929D941 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR0301MB2115;23:yvGLih/uPPm5VUXi10uJQHyYVjeQggnd9E8d5AW?= =?us-ascii?Q?mukK7UO+xz3kUy8VM7bugNnTWfLNXZmTbEoWLO0BzeoB6GBJU1K3lt3AXK7t?= =?us-ascii?Q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Uy8PW/gAit8ohp1Xq?= =?us-ascii?Q?s6x1V/I0HHhABpLb4Q5/+bHMlu2f9o3yV7rIBHF2nGnwTndz29tuWIHhPVDU?= =?us-ascii?Q?+c0jJlHpi69RLShL/V2z4ztsYYa5EsVyD2g3EQ2gPHXMWTkFG0Qcm40oC7nP?= =?us-ascii?Q?6/V3JI8gcLYCdtCmBZF69kyBkl83IuEwGYA+Q9cbgUBKCqQs60gZk4CsuKYX?= =?us-ascii?Q?iNQhR/JApZdvmMCw=3D?= X-Microsoft-Exchange-Diagnostics: 1;BLUPR0301MB2115;5:X88oertyhB90jr9nlS6NVXKgUKI6HT35mvuBGDz7p9tV1wdPOPctiGA7Yut3jYRc/grS4IUwCDMxR4bV39Wr/hMfxGhsVPD5hj+xWMeuM/rPOVpDUkFpCEFqrIY/BaCPUrnfrqirNzHWoSX0VFu8XWBMLibIZJpn6IosOWJJ5VA=;24:Z833PKR9lIlt3fE4nL1iLEHpWlxz856GDPE8bXRkjuIM+IzXjtatgecuZPVxtuJiRurBiOefEbIIn8K6rhEzbJsfrpmKt/yzNb1vrvLvgBk= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2015 11:11:19.8448 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0301MB2115 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7333 Lines: 171 From: Madalin Bucur This patch series adds the Ethernet driver for the Freescale QorIQ Data Path Acceleration Architecture (DPAA). This version includes changes following the feedback received on previous versions from Eric Dumazet, Bob Cochran, Joe Perches, Paul Bolle, Joakim Tjernlund, Scott Wood, David Miller - thank you. Together with the driver a managed version of alloc_percpu is provided that simplifies the release of per-CPU memory. The Freescale DPAA architecture consists in a series of hardware blocks that support the Ethernet connectivity. The Ethernet driver depends upon the following drivers that are currently in the Linux kernel or in review (the underlying drivers are not inter-dependent): - Peripheral Access Memory Unit (PAMU) drivers/iommu/fsl_* - Frame Manager (FMan) drivers/net/ethernet/freescale/fman - Queue Manager (QMan), Buffer Manager (BMan) drivers/soc/fsl/qbman dpaa_eth interfaces mapping to FMan MACs: dpaa_eth /eth0\ ... /ethN\ driver | | | | ------------- ---- ----------- ---- ------------- -Ports / Tx Rx \ ... / Tx Rx \ FMan | | | | -MACs | MAC0 | | MACN | / dtsec0 \ ... / dtsecN \ (or tgec) / \ / \(or memac) --------- -------------- --- -------------- --------- FMan, FMan Port, FMan SP, FMan MURAM drivers --------------------------------------------------------- FMan HW blocks: MURAM, MACs, Ports, SP --------------------------------------------------------- dpaa_eth relation to QMan, FMan: ________________________________ dpaa_eth / eth0 \ driver / \ --------- -^- -^- -^- --- --------- QMan driver / \ / \ / \ \ / | BMan | |Rx | |Rx | |Tx | |Tx | | driver | --------- |Dfl| |Err| |Cnf| |FQs| | | QMan HW |FQ | |FQ | |FQ | | | | | / \ / \ / \ \ / | | --------- --- --- --- -v- --------- | FMan QMI | | | FMan HW FMan BMI | BMan HW | ----------------------- -------- where the acronyms used above (and in the code) are: DPAA = Data Path Acceleration Architecture FMan = DPAA Frame Manager QMan = DPAA Queue Manager BMan = DPAA Buffers Manager QMI = QMan interface in FMan BMI = BMan interface in FMan FMan SP = FMan Storage Profiles MURAM = Multi-user RAM in FMan FQ = QMan Frame Queue Rx Dfl FQ = default reception FQ Rx Err FQ = Rx error frames FQ Tx Cnf FQ = Tx confirmation FQ Tx FQs = transmission frame queues dtsec = datapath three speed Ethernet controller (10/100/1000 Mbps) tgec = ten gigabit Ethernet controller (10 Gbps) memac = multirate Ethernet MAC (10/100/1000/10000) The latest FMan driver patches were submitted by Igal Liberman: https://patchwork.ozlabs.org/project/netdev/list/?submitter=64715&state=* The latest Q/BMan drivers were submitted by Roy Pledge: https://patchwork.ozlabs.org/project/linuxppc-dev/list/?submitter=66331&state=* Changes from v4: - addressed feedback from Scott Wood and Joe Perches - fixed spelling - fixed leak of uninitialized stack to userspace - fix prints - replace raw_cpu_ptr() with this_cpu_ptr() - remove _s from the end of structure names - remove underscores at start of functions, goto labels - remove likely in error paths - use container_of() instead of open casts - remove priv from the driver name - move return type on same line with function name - drop DPA_READ_SKB_PTR/DPA_WRITE_SKB_PTR Changes from v3: - removed bogus delay and comment in .ndo_stop implementation - addressed minor issues reported by David Miller Changes from v2: - removed debugfs, moved exports to ethtool statistics - removed congestion groups Kconfig params Changes from v1: - bpool level Kconfig options removed - print format using pr_fmt, cleaned up prints - __hot/__cold removed - gratuitous unlikely() removed - code style aligned, consistent spacing for declarations - comment formatting The complete patch set based on the latest net-next/master kernel can be found in the public git at: http://git.freescale.com/git/cgit.cgi/ppc/upstream/linux.git under the tag ldup_public_git_20151202: http://git.freescale.com/git/cgit.cgi/ppc/upstream/linux.git/tag/?h=ldup_public_git_20151202 There is one u-boot patch that one needs to make sure it's applied to align u-boot to the latest device tree binding document specification used by the FMan driver. Please make sure your u-boot includes this patch: commit 97a8d010e029111e5711a45264a726bedbeb24c4 Author: Igal Liberman Date: Tue Aug 18 14:47:05 2015 +0300 net/fman: Support both new and legacy FMan Compatibles The patch was included in u-boot in v2015.10-rc3. Madalin Bucur (8): devres: add devm_alloc_percpu() dpaa_eth: add support for DPAA Ethernet dpaa_eth: add support for S/G frames dpaa_eth: add driver's Tx queue selection mechanism dpaa_eth: add ethtool functionality dpaa_eth: add ethtool statistics dpaa_eth: add sysfs exports dpaa_eth: add trace points Documentation/driver-model/devres.txt | 4 + drivers/base/devres.c | 64 + drivers/net/ethernet/freescale/Kconfig | 2 + drivers/net/ethernet/freescale/Makefile | 1 + drivers/net/ethernet/freescale/dpaa/Kconfig | 32 + drivers/net/ethernet/freescale/dpaa/Makefile | 12 + drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 788 +++++++++++ drivers/net/ethernet/freescale/dpaa/dpaa_eth.h | 464 +++++++ .../net/ethernet/freescale/dpaa/dpaa_eth_common.c | 1416 ++++++++++++++++++++ .../net/ethernet/freescale/dpaa/dpaa_eth_common.h | 108 ++ drivers/net/ethernet/freescale/dpaa/dpaa_eth_sg.c | 686 ++++++++++ .../net/ethernet/freescale/dpaa/dpaa_eth_sysfs.c | 167 +++ .../net/ethernet/freescale/dpaa/dpaa_eth_trace.h | 141 ++ drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c | 414 ++++++ include/linux/device.h | 19 + 15 files changed, 4318 insertions(+) create mode 100644 drivers/net/ethernet/freescale/dpaa/Kconfig create mode 100644 drivers/net/ethernet/freescale/dpaa/Makefile create mode 100644 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c create mode 100644 drivers/net/ethernet/freescale/dpaa/dpaa_eth.h create mode 100644 drivers/net/ethernet/freescale/dpaa/dpaa_eth_common.c create mode 100644 drivers/net/ethernet/freescale/dpaa/dpaa_eth_common.h create mode 100644 drivers/net/ethernet/freescale/dpaa/dpaa_eth_sg.c create mode 100644 drivers/net/ethernet/freescale/dpaa/dpaa_eth_sysfs.c create mode 100644 drivers/net/ethernet/freescale/dpaa/dpaa_eth_trace.h create mode 100644 drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/