From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B744FC433E0 for ; Thu, 18 Jun 2020 13:42:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 97289207D8 for ; Thu, 18 Jun 2020 13:42:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730284AbgFRNmp (ORCPT ); Thu, 18 Jun 2020 09:42:45 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:46734 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727101AbgFRNmn (ORCPT ); Thu, 18 Jun 2020 09:42:43 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1jluoR-0017Sl-Au; Thu, 18 Jun 2020 15:42:39 +0200 Date: Thu, 18 Jun 2020 15:42:39 +0200 From: Andrew Lunn To: Kurt Kanzenbach Cc: Vivien Didelot , Florian Fainelli , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, Sebastian Andrzej Siewior , Richard Cochran , Kamil Alkhouri , ilias.apalodimas@linaro.org Subject: Re: [RFC PATCH 1/9] net: dsa: Add tag handling for Hirschmann Hellcreek switches Message-ID: <20200618134239.GP249144@lunn.ch> References: <20200618064029.32168-1-kurt@linutronix.de> <20200618064029.32168-2-kurt@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200618064029.32168-2-kurt@linutronix.de> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Jun 18, 2020 at 08:40:21AM +0200, Kurt Kanzenbach wrote: > The Hirschmann Hellcreek TSN switches have a special tagging protocol for frames > exchanged between the CPU port and the master interface. The format is a one > byte trailer indicating the destination or origin port. > > It's quite similar to the Micrel KSZ tagging. That's why the implementation is > based on that code. > > Signed-off-by: Kurt Kanzenbach > --- > include/net/dsa.h | 2 + > net/dsa/Kconfig | 6 +++ > net/dsa/Makefile | 1 + > net/dsa/tag_hellcreek.c | 101 ++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 110 insertions(+) > create mode 100644 net/dsa/tag_hellcreek.c > > diff --git a/include/net/dsa.h b/include/net/dsa.h > index 50389772c597..2784c4851d92 100644 > --- a/include/net/dsa.h > +++ b/include/net/dsa.h > @@ -44,6 +44,7 @@ struct phylink_link_state; > #define DSA_TAG_PROTO_KSZ8795_VALUE 14 > #define DSA_TAG_PROTO_OCELOT_VALUE 15 > #define DSA_TAG_PROTO_AR9331_VALUE 16 > +#define DSA_TAG_PROTO_HELLCREEK_VALUE 17 > > enum dsa_tag_protocol { > DSA_TAG_PROTO_NONE = DSA_TAG_PROTO_NONE_VALUE, > @@ -63,6 +64,7 @@ enum dsa_tag_protocol { > DSA_TAG_PROTO_KSZ8795 = DSA_TAG_PROTO_KSZ8795_VALUE, > DSA_TAG_PROTO_OCELOT = DSA_TAG_PROTO_OCELOT_VALUE, > DSA_TAG_PROTO_AR9331 = DSA_TAG_PROTO_AR9331_VALUE, > + DSA_TAG_PROTO_HELLCREEK = DSA_TAG_PROTO_HELLCREEK_VALUE, > }; > > struct packet_type; > diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig > index d5bc6ac599ef..edc0c3ab6a4e 100644 > --- a/net/dsa/Kconfig > +++ b/net/dsa/Kconfig > @@ -121,4 +121,10 @@ config NET_DSA_TAG_TRAILER > Say Y or M if you want to enable support for tagging frames at > with a trailed. e.g. Marvell 88E6060. > > +config NET_DSA_TAG_HELLCREEK > + tristate "Tag driver for Hirschmann Hellcreek TSN switches" > + help > + Say Y or M if you want to enable support for tagging frames > + for the Hirschmann Hellcreek TSN switches. > + Hi Kurt This file is roughly in alphabetic order based on the tristate string. Please move this before "Tag driver for Lantiq / Intel GSWIP switches" to keep with the sorting. Otherwise this looks good. Andrew