Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp2167754rwn; Fri, 9 Sep 2022 09:24:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR4PxFiMaMb4CdYfsYOIOXa7xeBA8nKjjSZY51Q/UZyJGPKwAfCS3eR7MIoGpu4Izqor5OnK X-Received: by 2002:a17:906:7714:b0:74f:f771:4e0 with SMTP id q20-20020a170906771400b0074ff77104e0mr9864443ejm.623.1662740675494; Fri, 09 Sep 2022 09:24:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662740675; cv=none; d=google.com; s=arc-20160816; b=RfqKvzOxcNeyFVUkrezLBHBLt/u1w1MAHMvG6K2t6M9qUfwq4iPTW8rL5HZU0fozEk DxHoeY5ubhdER6hA+kK0HuxNkgDM12MErpE8bC7XIDPvETdx48IIxGJgBnEzuAM4XWSg DjLr1WEsW50xJC74Y6NyZjbXJ9D4KhfrJGr7/n0cwDQ/MDT53qvpjVg98eOusMmF804g f/TLkSQpn3uFfhcuUhJHfVypZGO3GQjM2mkf1dkF40u2+VL20noV65Sm5og5kEmqyrEk hBtV5W/nHr0X9/iGiWThu4oWR/a69YpwE4n/pQuiK2WSPD0hWe48QFg4Cv870xcMH0ks bofw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Wg3cjn14Uwq6RoSO3clEVB6Zh7FJYGI3Li9vwOYSIAg=; b=opApSTWFvTKdnprgOyw3fsGAt2E6jiumHKgpcBRy0qZKiBfK2eW9OKW1lJYzJ2b4pt iBpETcN0n6hv5KUwAs9QqRvUi0eiS11Qc2qY+ohI3u5doDJblY82q1HHq9MFewiISf7m d5BnihfjbGhQR40xAkx2eElWw9uojsbUIu2WNL6I1GTUcMXgxLLEVc5UeQdyGWkIfG5d dB8tWZ84GIi9XxfY6vCv2YMIdEdh25nu0ZvjH+mdLLvGQR0YMitgWoU9LaqAjxnlvUei Z+OM5FaG+AIg2NfHIhakxTJ/KTIAqL7ExJIgnlx7P3X/MEBkI8cbbUuuHPUgQDojBUAO wxjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=LlkIMoui; 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=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k12-20020a50cb8c000000b0043d00293d23si628652edi.391.2022.09.09.09.24.09; Fri, 09 Sep 2022 09:24:35 -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=@bootlin.com header.s=gm1 header.b=LlkIMoui; 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=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232360AbiIIPZ0 (ORCPT + 99 others); Fri, 9 Sep 2022 11:25:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232347AbiIIPZK (ORCPT ); Fri, 9 Sep 2022 11:25:10 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 551704C620; Fri, 9 Sep 2022 08:25:02 -0700 (PDT) Received: (Authenticated sender: maxime.chevallier@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 7BF8DFF804; Fri, 9 Sep 2022 15:24:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1662737100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Wg3cjn14Uwq6RoSO3clEVB6Zh7FJYGI3Li9vwOYSIAg=; b=LlkIMouiwjBqkZQcMQoCULG7LlLHFQp6nqeUCnP2glOqZLAEu+b/dfriVSuXAACSN8vezI PY2khL83ouoVxE6W8YVWA5LUjQKzpiJIKdf8YlVFSgbt+rYtVtUBL0PxcuOqJMlMHZ1moZ /OqJQCTJl3MLpIGlWKH94igQaZ8mSVlYWhU8LMsSq+fXX6N+g6bhw18ptD8/JTA3VIoyh/ npRQ8VdK77doDG+lDWi3iI+3dj5OFlE8guxoRYt1GMqbANF9bv+PvBde7X9XI77Y8N5W9R iwdSDlUhbuo/+P9vVtLcYZLdGMm6+/hPxdvFlE7VRx16mpvVS3yYNyBdinMmXw== From: Maxime Chevallier To: davem@davemloft.net, Rob Herring , Krzysztof Kozlowski Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Florian Fainelli , Heiner Kallweit , Russell King , linux-arm-kernel@lists.infradead.org, Vladimir Oltean , Luka Perkov , Robert Marko Subject: [PATCH net-next v4 0/5] net: ipqess: introduce Qualcomm IPQESS driver Date: Fri, 9 Sep 2022 17:24:49 +0200 Message-Id: <20220909152454.7462-1-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Hello everyone, This is the 4th iteration of a series that introduces a new driver, for the Qualcomm IPQESS Ethernet Controller, found on the IPQ4019. Note that this series contains binding patches that should go through the DT tree. The DSA out-of-band tagging is still using the skb->headroom part, but there doesn't seem to be any better way for now without adding fields to struct sk_buff. Notables changes on V4 : - Cache the uses_dsa info from CHANGEUPPER events - Use better string handling helpers for ethtool stats - rename ethtool callbacks - Fix a binding typo Notables changes on V3 : - Took into account Russell's review on the ioctl handler and the mac capabilities that were missing - Took Andrew's reviews into account by reworking the napi rx loop, some stray "inline" keywords, and useless warnings - Took Vlad's reviews into account by reworking a few macros - Took Christophe's review into account by removing extra GFP_ZERO - Took Rob's review into account by simplifying the binding Note that this V3 didn't focus on the tagging protocol, as I understand the issue is still open. I'm willing to keep on testing some ideas, and continue Florian's discussion. Notables changes on V2 : - Put the DSA tag in the skb itself instead of using skb->shinfo - Fixed the initialisation sequence based on Andrew's comments - Reworked the error paths in the init sequence - Add support for the clock and reset lines on that controller - Fixed and updated the binding The driver itself is pretty straightforward, but has lived out-of-tree for a while. I've done my best to clean-up some outdated API calls, but some might remain. This controller is somewhat special, since it's part of the IPQ4019 SoC which also includes an QCA8K switch, and uses the IPQESS controller for the CPU port. The switch is so tightly intergrated with the MAC that it is connected to the MAC using an internal link (hence the fact that we only support PHY_INTERFACE_MODE_INTERNAL), and this has some consequences on the DSA side. The tagging for the switch isn't done inband as most switch do, but out-of-band, the DSA tag being included in the DMA descriptor. This series includes a new out-of-band tagger that uses the skb headroom to convey the tag between the tagger and the MAC driver. Thanks to the Sartura folks who worked on a base version of this driver, and provided test hardware. Best regards, Maxime Chevallier Maxime Chevallier (5): net: ipqess: introduce the Qualcomm IPQESS driver net: dsa: add out-of-band tagging protocol net: ipqess: Add out-of-band DSA tagging support net: dt-bindings: Introduce the Qualcomm IPQESS Ethernet controller ARM: dts: qcom: ipq4019: Add description for the IPQESS Ethernet controller .../devicetree/bindings/net/qcom,ipqess.yaml | 95 ++ MAINTAINERS | 6 + arch/arm/boot/dts/qcom-ipq4019.dtsi | 46 + drivers/net/ethernet/qualcomm/Kconfig | 12 + drivers/net/ethernet/qualcomm/Makefile | 2 + drivers/net/ethernet/qualcomm/ipqess/Makefile | 8 + drivers/net/ethernet/qualcomm/ipqess/ipqess.c | 1310 +++++++++++++++++ drivers/net/ethernet/qualcomm/ipqess/ipqess.h | 522 +++++++ .../ethernet/qualcomm/ipqess/ipqess_ethtool.c | 164 +++ include/linux/dsa/oob.h | 17 + include/net/dsa.h | 2 + net/dsa/Kconfig | 7 + net/dsa/Makefile | 1 + net/dsa/tag_oob.c | 84 ++ 14 files changed, 2276 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/qcom,ipqess.yaml create mode 100644 drivers/net/ethernet/qualcomm/ipqess/Makefile create mode 100644 drivers/net/ethernet/qualcomm/ipqess/ipqess.c create mode 100644 drivers/net/ethernet/qualcomm/ipqess/ipqess.h create mode 100644 drivers/net/ethernet/qualcomm/ipqess/ipqess_ethtool.c create mode 100644 include/linux/dsa/oob.h create mode 100644 net/dsa/tag_oob.c -- 2.37.2