[{"id":1764970,"web_url":"http://patchwork.ozlabs.org/comment/1764970/","msgid":"<20170907215417.GU11248@lunn.ch>","list_archive_url":null,"date":"2017-09-07T21:54:17","subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","submitter":{"id":13608,"url":"http://patchwork.ozlabs.org/api/people/13608/","name":"Andrew Lunn","email":"andrew@lunn.ch"},"content":"> -- compatible: For external switch chips, compatible string must be exactly one\n> -  of: \"microchip,ksz9477\"\n> +- compatible: Should be \"microchip,ksz9477\" for KSZ9477 chip,\n> +\t      \"microchip,ksz8795\" for KSZ8795 chip,\n> +\t      \"microchip,ksz8794\" for KSZ8794 chip,\n> +\t      \"microchip,ksz8765\" for KSZ8765 chip,\n> +\t      \"microchip,ksz8895\" for KSZ8895 chip,\n> +\t      \"microchip,ksz8864\" for KSZ8864 chip,\n> +\t      \"microchip,ksz8873\" for KSZ8873 chip,\n> +\t      \"microchip,ksz8863\" for KSZ8863 chip,\n> +\t      \"microchip,ksz8463\" for KSZ8463 chip\n\nThis part of this patch should be in a patch of the series that\nactually adds support for these chips. Don't document chips until you\nactually support them.\n\n>  See Documentation/devicetree/bindings/dsa/dsa.txt for a list of additional  required and optional properties.\n> @@ -13,60 +20,60 @@ Examples:\n>  \n>  Ethernet switch connected via SPI to the host, CPU port wired to eth0:\n>  \n> -                             eth0: ethernet@10001000 {\n> -                                             fixed-link {\n> -                                                             speed = <1000>;\n> -                                                             full-duplex;\n> -                                             };\n> -                             };\n> +\teth0: ethernet@10001000 {\n> +\t\tfixed-link {\n> +\t\t\tspeed = <1000>;\n> +\t\t\tfull-duplex;\n> +\t\t};\n> +\t};\n>  \n> -                             spi1: spi@f8008000 {\n> -                                             pinctrl-0 = <&pinctrl_spi_ksz>;\n> -                                             cs-gpios = <&pioC 25 0>;\n> -                                             id = <1>;\n> -                                             status = \"okay\";\n> +\tspi1: spi@f8008000 {\n> +\t\tcs-gpios = <&pioC 25 0>;\n> +\t\tid = <1>;\n> +\t\tstatus = \"okay\";\n>  \n> -                                             ksz9477: ksz9477@0 {\n> -                                                             compatible = \"microchip,ksz9477\";\n> -                                                             reg = <0>;\n> +\t\tksz9477: ksz9477@0 {\n> +\t\t\tcompatible = \"microchip,ksz9477\";\n> +\t\t\treg = <0>;\n>  \n> -                                                             spi-max-frequency = <44000000>;\n> -                                                             spi-cpha;\n> -                                                             spi-cpol;\n> +\t\t\tspi-max-frequency = <44000000>;\n> +\t\t\tspi-cpha;\n> +\t\t\tspi-cpol;\n> +\n> +\t\t\tstatus = \"okay\";\n> +\t\t\tports {\n> +\t\t\t\t#address-cells = <1>;\n> +\t\t\t\t#size-cells = <0>;\n> +\t\t\t\tport@0 {\n> +\t\t\t\t\treg = <0>;\n> +\t\t\t\t\tlabel = \"lan1\";\n> +\t\t\t\t};\n> +\t\t\t\tport@1 {\n> +\t\t\t\t\treg = <1>;\n> +\t\t\t\t\tlabel = \"lan2\";\n> +\t\t\t\t};\n> +\t\t\t\tport@2 {\n> +\t\t\t\t\treg = <2>;\n> +\t\t\t\t\tlabel = \"lan3\";\n> +\t\t\t\t};\n> +\t\t\t\tport@3 {\n> +\t\t\t\t\treg = <3>;\n> +\t\t\t\t\tlabel = \"lan4\";\n> +\t\t\t\t};\n> +\t\t\t\tport@4 {\n> +\t\t\t\t\treg = <4>;\n> +\t\t\t\t\tlabel = \"lan5\";\n> +\t\t\t\t};\n> +\t\t\t\tport@5 {\n> +\t\t\t\t\treg = <5>;\n> +\t\t\t\t\tlabel = \"cpu\";\n> +\t\t\t\t\tethernet = <&eth0>;\n> +\t\t\t\t\tfixed-link {\n> +\t\t\t\t\t\tspeed = <1000>;\n> +\t\t\t\t\t\tfull-duplex;\n> +\t\t\t\t\t};\n> +\t\t\t\t};\n> +\t\t\t};\n> +\t\t};\n> +\t};\n>  \n> -                                                             status = \"okay\";\n> -                                                             ports {\n> -                                                                             #address-cells = <1>;\n> -                                                                             #size-cells = <0>;\n> -                                                                             port@0 {\n> -                                                                                             reg = <0>;\n> -                                                                                             label = \"lan1\";\n> -                                                                             };\n> -                                                                             port@1 {\n> -                                                                                             reg = <1>;\n> -                                                                                             label = \"lan2\";\n> -                                                                             };\n> -                                                                             port@2 {\n> -                                                                                             reg = <2>;\n> -                                                                                             label = \"lan3\";\n> -                                                                             };\n> -                                                                             port@3 {\n> -                                                                                             reg = <3>;\n> -                                                                                             label = \"lan4\";\n> -                                                                             };\n> -                                                                             port@4 {\n> -                                                                                             reg = <4>;\n> -                                                                                             label = \"lan5\";\n> -                                                                             };\n> -                                                                             port@5 {\n> -                                                                                             reg = <5>;\n> -                                                                                             label = \"cpu\";\n> -                                                                                             ethernet = <&eth0>;\n> -                                                                                             fixed-link {\n> -                                                                                                             speed = <1000>;\n> -                                                                                                             full-duplex;\n> -                                                                                             };\n> -                                                                             };\n> -                                                             };\n> -                                             };\n> -                             };\n\nThis part however is a nice cleanup. You can submit this patch as a\nseparate patch, once netdev has opened again in about 10 days time.\n\n\t Andrew","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpDkc5PS3z9s0Z\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  8 Sep 2017 07:54:32 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1755868AbdIGVyU (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 7 Sep 2017 17:54:20 -0400","from vps0.lunn.ch ([178.209.37.122]:60126 \"EHLO vps0.lunn.ch\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1751456AbdIGVyT (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tThu, 7 Sep 2017 17:54:19 -0400","from andrew by vps0.lunn.ch with local (Exim 4.84_2)\n\t(envelope-from <andrew@lunn.ch>)\n\tid 1dq4kb-0007qd-3C; Thu, 07 Sep 2017 23:54:17 +0200"],"Date":"Thu, 7 Sep 2017 23:54:17 +0200","From":"Andrew Lunn <andrew@lunn.ch>","To":"Tristram.Ha@microchip.com","Cc":"muvarov@gmail.com, pavel@ucw.cz, nathan.leigh.conrad@gmail.com,\n\tvivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com,\n\tnetdev@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tWoojung.Huh@microchip.com","Subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","Message-ID":"<20170907215417.GU11248@lunn.ch>","References":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>","User-Agent":"Mutt/1.5.23 (2014-03-12)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1765166,"web_url":"http://patchwork.ozlabs.org/comment/1765166/","msgid":"<20170908090437.GE16834@amd>","list_archive_url":null,"date":"2017-09-08T09:04:37","subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","submitter":{"id":2109,"url":"http://patchwork.ozlabs.org/api/people/2109/","name":"Pavel Machek","email":"pavel@ucw.cz"},"content":"On Thu 2017-09-07 21:11:45, Tristram.Ha@microchip.com wrote:\n> From: Tristram Ha <Tristram.Ha@microchip.com>\n> \n> Add other KSZ switches support so that patch check does not complain.\n\nNice; unlike Andrew I believe that adding compatible strings is ok\nbefore the support is added. Device tree description is\nLinux-independend.\n\nBut... you need to Cc: device tree maintainers on this one. They\nusually take some time to respond, so it is nice to do this early.\n\n> index 0ab8b39..34af0e0 100644\n> --- a/Documentation/devicetree/bindings/net/dsa/ksz.txt\n> +++ b/Documentation/devicetree/bindings/net/dsa/ksz.txt\n> @@ -3,8 +3,15 @@ Microchip KSZ Series Ethernet switches\n>  \n>  Required properties:\n>  \n> -- compatible: For external switch chips, compatible string must be exactly one\n> -  of: \"microchip,ksz9477\"\n> +- compatible: Should be \"microchip,ksz9477\" for KSZ9477 chip,\n> +\t      \"microchip,ksz8795\" for KSZ8795 chip,\n> +\t      \"microchip,ksz8794\" for KSZ8794 chip,\n> +\t      \"microchip,ksz8765\" for KSZ8765 chip,\n> +\t      \"microchip,ksz8895\" for KSZ8895 chip,\n> +\t      \"microchip,ksz8864\" for KSZ8864 chip,\n> +\t      \"microchip,ksz8873\" for KSZ8873 chip,\n> +\t      \"microchip,ksz8863\" for KSZ8863 chip,\n> +\t      \"microchip,ksz8463\" for KSZ8463 chip\n>  \n>  See Documentation/devicetree/bindings/dsa/dsa.txt for a list of additional  required and optional properties.\n\nAnd you may want to wrap long line here, unless that's email client\nplaying another trick.\n\t\t\t\t\t\t\t\tPavel","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpWc94VXkz9sCZ\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  8 Sep 2017 19:04:57 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751441AbdIHJEl (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 8 Sep 2017 05:04:41 -0400","from atrey.karlin.mff.cuni.cz ([195.113.26.193]:33746 \"EHLO\n\tatrey.karlin.mff.cuni.cz\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750917AbdIHJEj (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 8 Sep 2017 05:04:39 -0400","by atrey.karlin.mff.cuni.cz (Postfix, from userid 512)\n\tid 37D1B824DD; Fri,  8 Sep 2017 11:04:38 +0200 (CEST)"],"Date":"Fri, 8 Sep 2017 11:04:37 +0200","From":"Pavel Machek <pavel@ucw.cz>","To":"Tristram.Ha@microchip.com","Cc":"andrew@lunn.ch, muvarov@gmail.com, nathan.leigh.conrad@gmail.com,\n\tvivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com,\n\tnetdev@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tWoojung.Huh@microchip.com","Subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","Message-ID":"<20170908090437.GE16834@amd>","References":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha1;\n\tprotocol=\"application/pgp-signature\"; boundary=\"BQPnanjtCNWHyqYD\"","Content-Disposition":"inline","In-Reply-To":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>","User-Agent":"Mutt/1.5.23 (2014-03-12)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1765358,"web_url":"http://patchwork.ozlabs.org/comment/1765358/","msgid":"<CAJGZr0+r3UhhRJcGXvBKZGamrSH_XEQY5oo7MTBjTTrDFOiKtg@mail.gmail.com>","list_archive_url":null,"date":"2017-09-08T13:32:35","subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","submitter":{"id":4154,"url":"http://patchwork.ozlabs.org/api/people/4154/","name":"Maxim Uvarov","email":"muvarov@gmail.com"},"content":"2017-09-08 0:54 GMT+03:00 Andrew Lunn <andrew@lunn.ch>:\n>> -- compatible: For external switch chips, compatible string must be exactly one\n>> -  of: \"microchip,ksz9477\"\n>> +- compatible: Should be \"microchip,ksz9477\" for KSZ9477 chip,\n>> +           \"microchip,ksz8795\" for KSZ8795 chip,\n>> +           \"microchip,ksz8794\" for KSZ8794 chip,\n>> +           \"microchip,ksz8765\" for KSZ8765 chip,\n>> +           \"microchip,ksz8895\" for KSZ8895 chip,\n>> +           \"microchip,ksz8864\" for KSZ8864 chip,\n>> +           \"microchip,ksz8873\" for KSZ8873 chip,\n>> +           \"microchip,ksz8863\" for KSZ8863 chip,\n>> +           \"microchip,ksz8463\" for KSZ8463 chip\n>\n\nall that chips have the same spi access to get chip id on probe(). I\nprefer common microship,ksz-spi rather than somebody will always\nmaintain that list.\n\nMaxim.\n\n> This part of this patch should be in a patch of the series that\n> actually adds support for these chips. Don't document chips until you\n> actually support them.\n>\n>>  See Documentation/devicetree/bindings/dsa/dsa.txt for a list of additional  required and optional properties.\n>> @@ -13,60 +20,60 @@ Examples:\n>>\n>>  Ethernet switch connected via SPI to the host, CPU port wired to eth0:\n>>\n>> -                             eth0: ethernet@10001000 {\n>> -                                             fixed-link {\n>> -                                                             speed = <1000>;\n>> -                                                             full-duplex;\n>> -                                             };\n>> -                             };\n>> +     eth0: ethernet@10001000 {\n>> +             fixed-link {\n>> +                     speed = <1000>;\n>> +                     full-duplex;\n>> +             };\n>> +     };\n>>\n>> -                             spi1: spi@f8008000 {\n>> -                                             pinctrl-0 = <&pinctrl_spi_ksz>;\n>> -                                             cs-gpios = <&pioC 25 0>;\n>> -                                             id = <1>;\n>> -                                             status = \"okay\";\n>> +     spi1: spi@f8008000 {\n>> +             cs-gpios = <&pioC 25 0>;\n>> +             id = <1>;\n>> +             status = \"okay\";\n>>\n>> -                                             ksz9477: ksz9477@0 {\n>> -                                                             compatible = \"microchip,ksz9477\";\n>> -                                                             reg = <0>;\n>> +             ksz9477: ksz9477@0 {\n>> +                     compatible = \"microchip,ksz9477\";\n>> +                     reg = <0>;\n>>\n>> -                                                             spi-max-frequency = <44000000>;\n>> -                                                             spi-cpha;\n>> -                                                             spi-cpol;\n>> +                     spi-max-frequency = <44000000>;\n>> +                     spi-cpha;\n>> +                     spi-cpol;\n>> +\n>> +                     status = \"okay\";\n>> +                     ports {\n>> +                             #address-cells = <1>;\n>> +                             #size-cells = <0>;\n>> +                             port@0 {\n>> +                                     reg = <0>;\n>> +                                     label = \"lan1\";\n>> +                             };\n>> +                             port@1 {\n>> +                                     reg = <1>;\n>> +                                     label = \"lan2\";\n>> +                             };\n>> +                             port@2 {\n>> +                                     reg = <2>;\n>> +                                     label = \"lan3\";\n>> +                             };\n>> +                             port@3 {\n>> +                                     reg = <3>;\n>> +                                     label = \"lan4\";\n>> +                             };\n>> +                             port@4 {\n>> +                                     reg = <4>;\n>> +                                     label = \"lan5\";\n>> +                             };\n>> +                             port@5 {\n>> +                                     reg = <5>;\n>> +                                     label = \"cpu\";\n>> +                                     ethernet = <&eth0>;\n>> +                                     fixed-link {\n>> +                                             speed = <1000>;\n>> +                                             full-duplex;\n>> +                                     };\n>> +                             };\n>> +                     };\n>> +             };\n>> +     };\n>>\n>> -                                                             status = \"okay\";\n>> -                                                             ports {\n>> -                                                                             #address-cells = <1>;\n>> -                                                                             #size-cells = <0>;\n>> -                                                                             port@0 {\n>> -                                                                                             reg = <0>;\n>> -                                                                                             label = \"lan1\";\n>> -                                                                             };\n>> -                                                                             port@1 {\n>> -                                                                                             reg = <1>;\n>> -                                                                                             label = \"lan2\";\n>> -                                                                             };\n>> -                                                                             port@2 {\n>> -                                                                                             reg = <2>;\n>> -                                                                                             label = \"lan3\";\n>> -                                                                             };\n>> -                                                                             port@3 {\n>> -                                                                                             reg = <3>;\n>> -                                                                                             label = \"lan4\";\n>> -                                                                             };\n>> -                                                                             port@4 {\n>> -                                                                                             reg = <4>;\n>> -                                                                                             label = \"lan5\";\n>> -                                                                             };\n>> -                                                                             port@5 {\n>> -                                                                                             reg = <5>;\n>> -                                                                                             label = \"cpu\";\n>> -                                                                                             ethernet = <&eth0>;\n>> -                                                                                             fixed-link {\n>> -                                                                                                             speed = <1000>;\n>> -                                                                                                             full-duplex;\n>> -                                                                                             };\n>> -                                                                             };\n>> -                                                             };\n>> -                                             };\n>> -                             };\n>\n> This part however is a nice cleanup. You can submit this patch as a\n> separate patch, once netdev has opened again in about 10 days time.\n>\n>          Andrew","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"g6ArUXhn\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpdYK3NTPz9s7p\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  8 Sep 2017 23:32:53 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1756414AbdIHNcl (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 8 Sep 2017 09:32:41 -0400","from mail-wm0-f44.google.com ([74.125.82.44]:43251 \"EHLO\n\tmail-wm0-f44.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1755541AbdIHNch (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 8 Sep 2017 09:32:37 -0400","by mail-wm0-f44.google.com with SMTP id f145so6118024wme.0;\n\tFri, 08 Sep 2017 06:32:36 -0700 (PDT)","by 10.80.152.43 with HTTP; Fri, 8 Sep 2017 06:32:35 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=O60ikg20JfZfU4KMV8OXRDGHhd3gbHskhxjr0G/+NC0=;\n\tb=g6ArUXhnwGBRLdXgWmIYdNberLR7g+GVYDC4b8q7jKniEPnGkp1rXBzNcNiZ2m33qI\n\tlg69tT3xAlDBNP7tXk4dgzBDGL143hTya/MPdVHq/M+SAhoCHxBEHf91BWoePlxn3lbm\n\tVqTl2etxo8siEsKLphO4yMKUFh0dVkFAlRGm6jf3iVsgFV5AoGknUgLALjT4nz2zaGYv\n\tcVR1EpxqyBjc11ip1p5qb638vuEf7y6GezUV737I95GWdpPIs+fk/0TIHCqhHoPvfzQ2\n\tKowOmn+L9hdHKLgzVyclf5iTI2OAhQ7dWKHxC3erNF6mzwxg/pTNtNsmbBp09PNiugkP\n\toXTw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=O60ikg20JfZfU4KMV8OXRDGHhd3gbHskhxjr0G/+NC0=;\n\tb=eCIKYiTLOpJ8umxwi8T/urPEDJS9Nw4bv1VG9afbNw0C3AXH1GZleZYrEBIQ9bp4f4\n\tHo++p0rp0ojc/BnH1WAwZJ0vt6KVZ31mmeDuysUb36mu0QiBGnmKg8bS/osR5WimOoUj\n\tFO4xlQsXXGW+i6uMjElQ2LnIGpaZEwCzDPg+WIM9Jg6EV/vUftpCnaeUEG9DPLGBGISO\n\tkP3l8yhiPyjyi/HyWp30L4vUYm/pzJpf+AcyJ+EQmOZfVEK4j4KTsicTbHASjLaEcT04\n\tQ75p4YQypctKkB6Kv+mwdcp28RAHXqcOdpJMpFJyBYoRYGLNMufULOh3+x3xWQbNVfZH\n\tk21w==","X-Gm-Message-State":"AHPjjUjPur3vnL1ICnFjTVKHJsGNkPgHzPuSwvxPqKGjCMOS/wyjs9cU\n\tGwLx2J4dI8bX8ZFaEiMB6ZTjEuY9uQ==","X-Google-Smtp-Source":"ADKCNb7OKrI5mpKo6DipYn5R8g5hzGAhDiyT9bVyuqhua7Lhptm1R5J9Sd4v93Ew2K5BARj1Ye3Nr9iga7jmKk8fmEA=","X-Received":"by 10.80.165.108 with SMTP id z41mr2179639edb.13.1504877556035; \n\tFri, 08 Sep 2017 06:32:36 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170907215417.GU11248@lunn.ch>","References":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>\n\t<20170907215417.GU11248@lunn.ch>","From":"Maxim Uvarov <muvarov@gmail.com>","Date":"Fri, 8 Sep 2017 16:32:35 +0300","Message-ID":"<CAJGZr0+r3UhhRJcGXvBKZGamrSH_XEQY5oo7MTBjTTrDFOiKtg@mail.gmail.com>","Subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","To":"Andrew Lunn <andrew@lunn.ch>","Cc":"Tristram.Ha@microchip.com, Pavel Machek <pavel@ucw.cz>,\n\tNathan Conrad <nathan.leigh.conrad@gmail.com>,\n\tVivien Didelot <vivien.didelot@savoirfairelinux.com>,\n\tFlorian Fainelli <f.fainelli@gmail.com>,\n\tnetdev <netdev@vger.kernel.org>, linux-kernel@vger.kernel.org,\n\tWoojung.Huh@microchip.com","Content-Type":"text/plain; charset=\"UTF-8\"","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1765403,"web_url":"http://patchwork.ozlabs.org/comment/1765403/","msgid":"<20170908141225.GE25219@lunn.ch>","list_archive_url":null,"date":"2017-09-08T14:12:25","subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","submitter":{"id":13608,"url":"http://patchwork.ozlabs.org/api/people/13608/","name":"Andrew Lunn","email":"andrew@lunn.ch"},"content":"On Fri, Sep 08, 2017 at 04:32:35PM +0300, Maxim Uvarov wrote:\n> 2017-09-08 0:54 GMT+03:00 Andrew Lunn <andrew@lunn.ch>:\n> >> -- compatible: For external switch chips, compatible string must be exactly one\n> >> -  of: \"microchip,ksz9477\"\n> >> +- compatible: Should be \"microchip,ksz9477\" for KSZ9477 chip,\n> >> +           \"microchip,ksz8795\" for KSZ8795 chip,\n> >> +           \"microchip,ksz8794\" for KSZ8794 chip,\n> >> +           \"microchip,ksz8765\" for KSZ8765 chip,\n> >> +           \"microchip,ksz8895\" for KSZ8895 chip,\n> >> +           \"microchip,ksz8864\" for KSZ8864 chip,\n> >> +           \"microchip,ksz8873\" for KSZ8873 chip,\n> >> +           \"microchip,ksz8863\" for KSZ8863 chip,\n> >> +           \"microchip,ksz8463\" for KSZ8463 chip\n> >\n> \n> all that chips have the same spi access to get chip id on probe(). I\n> prefer common microship,ksz-spi rather than somebody will always\n> maintain that list.\n\nThe Marvell DSA driver is similar. The compatibility string tells you\nenough to go find the switch ID in the switch itself.\n\nI suppose this comes down to, is there going to be one SPI driver for\nall the devices, or lots of drivers? In general, DSA has one driver\nfor lots of devices. The mv88e6xxx supports around 25 devices. The b53\nhas around 17, etc.\n\nSo i would suggest one driver supporting all the different devices.\n\n   Andrew","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpfRX3WHMz9s7G\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Sep 2017 00:12:56 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1754454AbdIHOMa (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 8 Sep 2017 10:12:30 -0400","from vps0.lunn.ch ([178.209.37.122]:33058 \"EHLO vps0.lunn.ch\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1752089AbdIHOM3 (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tFri, 8 Sep 2017 10:12:29 -0400","from andrew by vps0.lunn.ch with local (Exim 4.84_2)\n\t(envelope-from <andrew@lunn.ch>)\n\tid 1dqK1B-0007NK-8U; Fri, 08 Sep 2017 16:12:25 +0200"],"Date":"Fri, 8 Sep 2017 16:12:25 +0200","From":"Andrew Lunn <andrew@lunn.ch>","To":"Maxim Uvarov <muvarov@gmail.com>","Cc":"Tristram.Ha@microchip.com, Pavel Machek <pavel@ucw.cz>,\n\tNathan Conrad <nathan.leigh.conrad@gmail.com>,\n\tVivien Didelot <vivien.didelot@savoirfairelinux.com>,\n\tFlorian Fainelli <f.fainelli@gmail.com>,\n\tnetdev <netdev@vger.kernel.org>, linux-kernel@vger.kernel.org,\n\tWoojung.Huh@microchip.com","Subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","Message-ID":"<20170908141225.GE25219@lunn.ch>","References":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>\n\t<20170907215417.GU11248@lunn.ch>\n\t<CAJGZr0+r3UhhRJcGXvBKZGamrSH_XEQY5oo7MTBjTTrDFOiKtg@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<CAJGZr0+r3UhhRJcGXvBKZGamrSH_XEQY5oo7MTBjTTrDFOiKtg@mail.gmail.com>","User-Agent":"Mutt/1.5.23 (2014-03-12)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1765577,"web_url":"http://patchwork.ozlabs.org/comment/1765577/","msgid":"<93AF473E2DA327428DE3D46B72B1E9FD41121E68@CHN-SV-EXMX02.mchp-main.com>","list_archive_url":null,"date":"2017-09-08T18:40:10","subject":"RE: [PATCH RFC] Update documentation for KSZ DSA drivers so that\n\tnew drivers can be added","submitter":{"id":72262,"url":"http://patchwork.ozlabs.org/api/people/72262/","name":"","email":"Tristram.Ha@microchip.com"},"content":"> -----Original Message-----\n> From: Andrew Lunn [mailto:andrew@lunn.ch]\n> Sent: Friday, September 08, 2017 7:12 AM\n> To: Maxim Uvarov\n> Cc: Tristram Ha - C24268; Pavel Machek; Nathan Conrad; Vivien Didelot; Florian\n> Fainelli; netdev; linux-kernel@vger.kernel.org; Woojung Huh - C21699\n> Subject: Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n> drivers can be added\n> \n> On Fri, Sep 08, 2017 at 04:32:35PM +0300, Maxim Uvarov wrote:\n> > 2017-09-08 0:54 GMT+03:00 Andrew Lunn <andrew@lunn.ch>:\n> > >> -- compatible: For external switch chips, compatible string must be exactly\n> one\n> > >> -  of: \"microchip,ksz9477\"\n> > >> +- compatible: Should be \"microchip,ksz9477\" for KSZ9477 chip,\n> > >> +           \"microchip,ksz8795\" for KSZ8795 chip,\n> > >> +           \"microchip,ksz8794\" for KSZ8794 chip,\n> > >> +           \"microchip,ksz8765\" for KSZ8765 chip,\n> > >> +           \"microchip,ksz8895\" for KSZ8895 chip,\n> > >> +           \"microchip,ksz8864\" for KSZ8864 chip,\n> > >> +           \"microchip,ksz8873\" for KSZ8873 chip,\n> > >> +           \"microchip,ksz8863\" for KSZ8863 chip,\n> > >> +           \"microchip,ksz8463\" for KSZ8463 chip\n> > >\n> >\n> > all that chips have the same spi access to get chip id on probe(). I\n> > prefer common microship,ksz-spi rather than somebody will always\n> > maintain that list.\n> \n> The Marvell DSA driver is similar. The compatibility string tells you\n> enough to go find the switch ID in the switch itself.\n> \n> I suppose this comes down to, is there going to be one SPI driver for\n> all the devices, or lots of drivers? In general, DSA has one driver\n> for lots of devices. The mv88e6xxx supports around 25 devices. The b53\n> has around 17, etc.\n> \n> So i would suggest one driver supporting all the different devices.\n> \n\nThere will be 5 drivers to support these devices:\n\nksz9477.c - KSZ9893/KSZ9897/KSZ9567/KSZ9566/KSZ9477\nksz8795.c - KSZ8795/KSZ8795/KSZ8765\nksz8895.c - KSZ8895/KSZ8864\nksz8863.c - KSZ8863/KSZ8873\nksz8463.c - KSZ8463\n\nThese chips have different SPI access mechanisms, MIB counter reading,\nand register set.  These can be combined into one single driver using\nfunction pointers, at least for ksz8795/ksz8895/ksz8863/ksz8463.  My\nonly concern is the memory footprint.  The customer may not want a\nbig driver to cover all the switches while only one is used.\n\nOut of topic I have a question to ask the community regarding the DSA\nport creation:\n\nPort 1 can be specified using the reg parameter specifying 0; port 2, 1;\nand so on.  The KSZ8794 is a variant of KSZ8795 with port 4 disabled.\nSo\nlan1 = 0, lan2 = 1, lan3 = 2, cpu = 4.\nBut our company Marketing does not want to promote that fact but treat\nKSZ8794 as a distinct product.\nSo\nlan1 = 0, lan2 = 1, lan3 = 2, cpu = 3.\nIs this okay to hide this information inside the driver?  This is manageable\nfor KSZ8794 but for KSZ8864 the first port is disabled:\nlan1 = 1, lan2 = 2, lan3 = 3, cpu = 4.\n\nI am not sure whether DSA has or will have a way to display the port\nmapping to regular users.","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpmNS13rCz9sBZ\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Sep 2017 04:40:40 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1756800AbdIHSk2 convert rfc822-to-8bit (ORCPT\n\t<rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 8 Sep 2017 14:40:28 -0400","from esa1.microchip.iphmx.com ([68.232.147.91]:49901 \"EHLO\n\tesa1.microchip.iphmx.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1756303AbdIHSk1 (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 8 Sep 2017 14:40:27 -0400","from smtpout.microchip.com (HELO email.microchip.com)\n\t([198.175.253.82])\n\tby esa1.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA;\n\t08 Sep 2017 11:40:12 -0700","from CHN-SV-EXMX02.mchp-main.com ([fe80::7dfe:3761:863e:3963]) by\n\tCHN-SV-EXCH06.mchp-main.com ([fe80::5404:4dc9:559:e436%16]) with\n\tmapi id 14.03.0352.000; Fri, 8 Sep 2017 11:40:11 -0700"],"X-IronPort-AV":"E=Sophos;i=\"5.42,363,1500966000\"; d=\"scan'208\";a=\"7233967\"","From":"<Tristram.Ha@microchip.com>","To":"<andrew@lunn.ch>, <muvarov@gmail.com>","CC":"<pavel@ucw.cz>, <nathan.leigh.conrad@gmail.com>,\n\t<vivien.didelot@savoirfairelinux.com>, <f.fainelli@gmail.com>,\n\t<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,\n\t<Woojung.Huh@microchip.com>","Subject":"RE: [PATCH RFC] Update documentation for KSZ DSA drivers so that\n\tnew drivers can be added","Thread-Topic":"[PATCH RFC] Update documentation for KSZ DSA drivers so that\n\tnew drivers can be added","Thread-Index":"AdMoG1vQCaYOqKwvR0emAIo585WtYwAAm6rgABAu+IAAIMUOgAABZCSAAAZCfrA=","Date":"Fri, 8 Sep 2017 18:40:10 +0000","Message-ID":"<93AF473E2DA327428DE3D46B72B1E9FD41121E68@CHN-SV-EXMX02.mchp-main.com>","References":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>\n\t<20170907215417.GU11248@lunn.ch>\n\t<CAJGZr0+r3UhhRJcGXvBKZGamrSH_XEQY5oo7MTBjTTrDFOiKtg@mail.gmail.com>\n\t<20170908141225.GE25219@lunn.ch>","In-Reply-To":"<20170908141225.GE25219@lunn.ch>","Accept-Language":"en-US","Content-Language":"en-US","X-MS-Has-Attach":"","X-MS-TNEF-Correlator":"","x-originating-ip":"[10.10.76.4]","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"8BIT","MIME-Version":"1.0","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1765578,"web_url":"http://patchwork.ozlabs.org/comment/1765578/","msgid":"<37d18882-2b21-c57e-7ac1-453ff6aa5257@gmail.com>","list_archive_url":null,"date":"2017-09-08T18:45:06","subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","submitter":{"id":2800,"url":"http://patchwork.ozlabs.org/api/people/2800/","name":"Florian Fainelli","email":"f.fainelli@gmail.com"},"content":"On 09/08/2017 11:40 AM, Tristram.Ha@microchip.com wrote:\n>> -----Original Message-----\n>> From: Andrew Lunn [mailto:andrew@lunn.ch]\n>> Sent: Friday, September 08, 2017 7:12 AM\n>> To: Maxim Uvarov\n>> Cc: Tristram Ha - C24268; Pavel Machek; Nathan Conrad; Vivien Didelot; Florian\n>> Fainelli; netdev; linux-kernel@vger.kernel.org; Woojung Huh - C21699\n>> Subject: Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n>> drivers can be added\n>>\n>> On Fri, Sep 08, 2017 at 04:32:35PM +0300, Maxim Uvarov wrote:\n>>> 2017-09-08 0:54 GMT+03:00 Andrew Lunn <andrew@lunn.ch>:\n>>>>> -- compatible: For external switch chips, compatible string must be exactly\n>> one\n>>>>> -  of: \"microchip,ksz9477\"\n>>>>> +- compatible: Should be \"microchip,ksz9477\" for KSZ9477 chip,\n>>>>> +           \"microchip,ksz8795\" for KSZ8795 chip,\n>>>>> +           \"microchip,ksz8794\" for KSZ8794 chip,\n>>>>> +           \"microchip,ksz8765\" for KSZ8765 chip,\n>>>>> +           \"microchip,ksz8895\" for KSZ8895 chip,\n>>>>> +           \"microchip,ksz8864\" for KSZ8864 chip,\n>>>>> +           \"microchip,ksz8873\" for KSZ8873 chip,\n>>>>> +           \"microchip,ksz8863\" for KSZ8863 chip,\n>>>>> +           \"microchip,ksz8463\" for KSZ8463 chip\n>>>>\n>>>\n>>> all that chips have the same spi access to get chip id on probe(). I\n>>> prefer common microship,ksz-spi rather than somebody will always\n>>> maintain that list.\n>>\n>> The Marvell DSA driver is similar. The compatibility string tells you\n>> enough to go find the switch ID in the switch itself.\n>>\n>> I suppose this comes down to, is there going to be one SPI driver for\n>> all the devices, or lots of drivers? In general, DSA has one driver\n>> for lots of devices. The mv88e6xxx supports around 25 devices. The b53\n>> has around 17, etc.\n>>\n>> So i would suggest one driver supporting all the different devices.\n>>\n> \n> There will be 5 drivers to support these devices:\n> \n> ksz9477.c - KSZ9893/KSZ9897/KSZ9567/KSZ9566/KSZ9477\n> ksz8795.c - KSZ8795/KSZ8795/KSZ8765\n> ksz8895.c - KSZ8895/KSZ8864\n> ksz8863.c - KSZ8863/KSZ8873\n> ksz8463.c - KSZ8463\n> \n> These chips have different SPI access mechanisms, MIB counter reading,\n> and register set.  These can be combined into one single driver using\n> function pointers, at least for ksz8795/ksz8895/ksz8863/ksz8463.  My\n> only concern is the memory footprint.  The customer may not want a\n> big driver to cover all the switches while only one is used.\n> \n> Out of topic I have a question to ask the community regarding the DSA\n> port creation:\n> \n> Port 1 can be specified using the reg parameter specifying 0; port 2, 1;\n> and so on.  The KSZ8794 is a variant of KSZ8795 with port 4 disabled.\n> So\n> lan1 = 0, lan2 = 1, lan3 = 2, cpu = 4.\n> But our company Marketing does not want to promote that fact but treat\n> KSZ8794 as a distinct product.\n> So\n> lan1 = 0, lan2 = 1, lan3 = 2, cpu = 3.\n> Is this okay to hide this information inside the driver?  This is manageable\n> for KSZ8794 but for KSZ8864 the first port is disabled:\n> lan1 = 1, lan2 = 2, lan3 = 3, cpu = 4.\n\nWhat dictates all of that is ultimately Device Tree because it defines\nthe port mapping, including where the CPU port is. Once your driver\nknows which chip it is \"talking to\" you could always have the driver\nissue warnings and indicate that the Device Tree is malformed if the\nuser-specified port mapping does not match what the HW supports.\n\n> \n> I am not sure whether DSA has or will have a way to display the port\n> mapping to regular users.\n\nDSA does display the port mapping of user facing ports under the\nstandard sysfs attribute /sys/class/net/*/phys_port_name. CPU port\nmapping is not displayed because there is no CPU-port network device\n(intentionally).","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"LLIodSjq\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpmTx4mjBz9sBZ\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Sep 2017 04:45:25 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1756750AbdIHSpN (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 8 Sep 2017 14:45:13 -0400","from mail-qk0-f194.google.com ([209.85.220.194]:38356 \"EHLO\n\tmail-qk0-f194.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1756468AbdIHSpL (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 8 Sep 2017 14:45:11 -0400","by mail-qk0-f194.google.com with SMTP id c69so2005081qke.5;\n\tFri, 08 Sep 2017 11:45:11 -0700 (PDT)","from [10.112.156.244] ([192.19.255.250])\n\tby smtp.googlemail.com with ESMTPSA id\n\tm93sm1611115qte.72.2017.09.08.11.45.07\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 08 Sep 2017 11:45:09 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=QcwOK4GfvkBmgCDEXpHVclyc+XIWQNA3wovqiTcJHUw=;\n\tb=LLIodSjqDtGD4K2zhoNq32ymul8JBct661v9LCdsK7lb9EsE2py70UJvOK7SrSFv0R\n\tZ/SRtdBpZDL/9MAe8xUnVS3WRnR/tv7dq6twAUjxLKMWBYEaaw7r2QLwPqBEWk4gI5I8\n\t9TCwIxdeqqgBRa5NjQCW9BK9eUdxNajSmeTAK8k92hKXR7YPm4QghVX5QDWz6ibE9P+3\n\tIoIv4pTrx1g6fodWRU+mitJAEI0S+tnKOlW13OcCxaUi03kCJ8owzauggFF4HtKQPF8E\n\t63o3U+HPWfbHBu9N7lTeoNJWCfgxO67UZr+g4XNvrOHy3uKDIMF6eLXHdKNh+B/3hphb\n\tG2Gw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=QcwOK4GfvkBmgCDEXpHVclyc+XIWQNA3wovqiTcJHUw=;\n\tb=cX7cS+4nKaN1JJyenLDPG2++uQZ9VKlmoXHtNNrl8NGTB/g4NH04VWVLUZF5zRE6pN\n\tKktsfRPY8zZuYuxqrNoIjVQ9vpikyrxAdmFPKxPVMgmKIg8khjx8LpeMpnSoDvEUMRhQ\n\ti6oC42OPjWTux31xaWuwVgR0BMLYKUqUJe/GcXkzgjq7OeQIQriEuDIeJMBCvwWaxzpq\n\tuyOuVlotOYGzHAutjRX8WroPKy+kNqwYOLNjGqn6LdmOwibt8v7BgIDxG58JipNSAQ5Z\n\t/Ghwf6/sGxm7ldCFIi3V4nz1N28uZNduFNKT91jf7i68tog2oLdhP0LkvAUJcpgAblPB\n\tK6/Q==","X-Gm-Message-State":"AHPjjUgbA4jW+3SdwGfWJl0B5tcnkAl1XUHWEbfvw3303HIZYE/Jd3cH\n\txg92p9IR5byX+w==","X-Google-Smtp-Source":"AOwi7QAHa5rnz9mcVsJHHmEnfFENkJZzzsatTIRM+hUDnhMdOZOcBAFdvev/bVkpGQyqGtDb6HmTJQ==","X-Received":"by 10.55.200.210 with SMTP id t79mr5389666qkl.140.1504896310733; \n\tFri, 08 Sep 2017 11:45:10 -0700 (PDT)","Subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","To":"Tristram.Ha@microchip.com, andrew@lunn.ch, muvarov@gmail.com","Cc":"pavel@ucw.cz, nathan.leigh.conrad@gmail.com,\n\tvivien.didelot@savoirfairelinux.com, netdev@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, Woojung.Huh@microchip.com","References":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>\n\t<20170907215417.GU11248@lunn.ch>\n\t<CAJGZr0+r3UhhRJcGXvBKZGamrSH_XEQY5oo7MTBjTTrDFOiKtg@mail.gmail.com>\n\t<20170908141225.GE25219@lunn.ch>\n\t<93AF473E2DA327428DE3D46B72B1E9FD41121E68@CHN-SV-EXMX02.mchp-main.com>","From":"Florian Fainelli <f.fainelli@gmail.com>","Message-ID":"<37d18882-2b21-c57e-7ac1-453ff6aa5257@gmail.com>","Date":"Fri, 8 Sep 2017 11:45:06 -0700","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<93AF473E2DA327428DE3D46B72B1E9FD41121E68@CHN-SV-EXMX02.mchp-main.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1765579,"web_url":"http://patchwork.ozlabs.org/comment/1765579/","msgid":"<8e4aa981-7f41-047d-2101-370118b4f2c0@gmail.com>","list_archive_url":null,"date":"2017-09-08T18:48:12","subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","submitter":{"id":2800,"url":"http://patchwork.ozlabs.org/api/people/2800/","name":"Florian Fainelli","email":"f.fainelli@gmail.com"},"content":"On 09/07/2017 02:11 PM, Tristram.Ha@microchip.com wrote:\n> From: Tristram Ha <Tristram.Ha@microchip.com>\n> \n> Add other KSZ switches support so that patch check does not complain.\n> \n> Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com>\n> ---\n>  Documentation/devicetree/bindings/net/dsa/ksz.txt | 117 ++++++++++++----------\n>  1 file changed, 62 insertions(+), 55 deletions(-)\n> \n> diff --git a/Documentation/devicetree/bindings/net/dsa/ksz.txt b/Documentation/devicetree/bindings/net/dsa/ksz.txt\n> index 0ab8b39..34af0e0 100644\n> --- a/Documentation/devicetree/bindings/net/dsa/ksz.txt\n> +++ b/Documentation/devicetree/bindings/net/dsa/ksz.txt\n> @@ -3,8 +3,15 @@ Microchip KSZ Series Ethernet switches\n>  \n>  Required properties:\n>  \n> -- compatible: For external switch chips, compatible string must be exactly one\n> -  of: \"microchip,ksz9477\"\n> +- compatible: Should be \"microchip,ksz9477\" for KSZ9477 chip,\n> +\t      \"microchip,ksz8795\" for KSZ8795 chip,\n> +\t      \"microchip,ksz8794\" for KSZ8794 chip,\n> +\t      \"microchip,ksz8765\" for KSZ8765 chip,\n> +\t      \"microchip,ksz8895\" for KSZ8895 chip,\n> +\t      \"microchip,ksz8864\" for KSZ8864 chip,\n> +\t      \"microchip,ksz8873\" for KSZ8873 chip,\n> +\t      \"microchip,ksz8863\" for KSZ8863 chip,\n> +\t      \"microchip,ksz8463\" for KSZ8463 chip\n\nIt becomes pretty obvious there is a 1 to 1 mapping between the\ncompatible name and what you should be using it for so specifying\nksz8795 for KSZ8795 chip is really redundant.\n\nYou could just list all compatible strings that you support and change\nthe verbiage to be:\n\ncompatible: Should be one of:\n\t\t\"microchip,ksz9477\"\n\t\t...\n\t\t\"microchip,ksz8463\"\n>  \n>  See Documentation/devicetree/bindings/dsa/dsa.txt for a list of additional  required and optional properties.\n> @@ -13,60 +20,60 @@ Examples:\n>  \n>  Ethernet switch connected via SPI to the host, CPU port wired to eth0:\n>  \n> -                             eth0: ethernet@10001000 {\n> -                                             fixed-link {\n> -                                                             speed = <1000>;\n> -                                                             full-duplex;\n> -                                             };\n> -                             };\n> +\teth0: ethernet@10001000 {\n> +\t\tfixed-link {\n> +\t\t\tspeed = <1000>;\n> +\t\t\tfull-duplex;\n> +\t\t};\n> +\t};\n\nThis is a good clean up, but it would probably belong in a separate\npatch that you would do before adding compatible strings for instance.\n\n>  \n> -                             spi1: spi@f8008000 {\n> -                                             pinctrl-0 = <&pinctrl_spi_ksz>;\n> -                                             cs-gpios = <&pioC 25 0>;\n> -                                             id = <1>;\n> -                                             status = \"okay\";\n> +\tspi1: spi@f8008000 {\n> +\t\tcs-gpios = <&pioC 25 0>;\n> +\t\tid = <1>;\n> +\t\tstatus = \"okay\";\n>  \n> -                                             ksz9477: ksz9477@0 {\n> -                                                             compatible = \"microchip,ksz9477\";\n> -                                                             reg = <0>;\n> +\t\tksz9477: ksz9477@0 {\n> +\t\t\tcompatible = \"microchip,ksz9477\";\n> +\t\t\treg = <0>;\n>  \n> -                                                             spi-max-frequency = <44000000>;\n> -                                                             spi-cpha;\n> -                                                             spi-cpol;\n> +\t\t\tspi-max-frequency = <44000000>;\n> +\t\t\tspi-cpha;\n> +\t\t\tspi-cpol;\n> +\n> +\t\t\tstatus = \"okay\";\n> +\t\t\tports {\n> +\t\t\t\t#address-cells = <1>;\n> +\t\t\t\t#size-cells = <0>;\n> +\t\t\t\tport@0 {\n> +\t\t\t\t\treg = <0>;\n> +\t\t\t\t\tlabel = \"lan1\";\n> +\t\t\t\t};\n> +\t\t\t\tport@1 {\n> +\t\t\t\t\treg = <1>;\n> +\t\t\t\t\tlabel = \"lan2\";\n> +\t\t\t\t};\n> +\t\t\t\tport@2 {\n> +\t\t\t\t\treg = <2>;\n> +\t\t\t\t\tlabel = \"lan3\";\n> +\t\t\t\t};\n> +\t\t\t\tport@3 {\n> +\t\t\t\t\treg = <3>;\n> +\t\t\t\t\tlabel = \"lan4\";\n> +\t\t\t\t};\n> +\t\t\t\tport@4 {\n> +\t\t\t\t\treg = <4>;\n> +\t\t\t\t\tlabel = \"lan5\";\n> +\t\t\t\t};\n> +\t\t\t\tport@5 {\n> +\t\t\t\t\treg = <5>;\n> +\t\t\t\t\tlabel = \"cpu\";\n> +\t\t\t\t\tethernet = <&eth0>;\n> +\t\t\t\t\tfixed-link {\n> +\t\t\t\t\t\tspeed = <1000>;\n> +\t\t\t\t\t\tfull-duplex;\n> +\t\t\t\t\t};\n> +\t\t\t\t};\n> +\t\t\t};\n> +\t\t};\n> +\t};\n>  \n> -                                                             status = \"okay\";\n> -                                                             ports {\n> -                                                                             #address-cells = <1>;\n> -                                                                             #size-cells = <0>;\n> -                                                                             port@0 {\n> -                                                                                             reg = <0>;\n> -                                                                                             label = \"lan1\";\n> -                                                                             };\n> -                                                                             port@1 {\n> -                                                                                             reg = <1>;\n> -                                                                                             label = \"lan2\";\n> -                                                                             };\n> -                                                                             port@2 {\n> -                                                                                             reg = <2>;\n> -                                                                                             label = \"lan3\";\n> -                                                                             };\n> -                                                                             port@3 {\n> -                                                                                             reg = <3>;\n> -                                                                                             label = \"lan4\";\n> -                                                                             };\n> -                                                                             port@4 {\n> -                                                                                             reg = <4>;\n> -                                                                                             label = \"lan5\";\n> -                                                                             };\n> -                                                                             port@5 {\n> -                                                                                             reg = <5>;\n> -                                                                                             label = \"cpu\";\n> -                                                                                             ethernet = <&eth0>;\n> -                                                                                             fixed-link {\n> -                                                                                                             speed = <1000>;\n> -                                                                                                             full-duplex;\n> -                                                                                             };\n> -                                                                             };\n> -                                                             };\n> -                                             };\n> -                             };\n>","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"MIMPsUbt\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpmYY5l3hz9sBd\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Sep 2017 04:48:33 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S932322AbdIHSsU (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 8 Sep 2017 14:48:20 -0400","from mail-qk0-f193.google.com ([209.85.220.193]:37778 \"EHLO\n\tmail-qk0-f193.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1756671AbdIHSsS (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 8 Sep 2017 14:48:18 -0400","by mail-qk0-f193.google.com with SMTP id r66so1858665qke.4;\n\tFri, 08 Sep 2017 11:48:18 -0700 (PDT)","from [10.112.156.244] ([192.19.255.250])\n\tby smtp.googlemail.com with ESMTPSA id\n\tx65sm1592474qke.48.2017.09.08.11.48.14\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 08 Sep 2017 11:48:16 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=subject:to:references:from:message-id:date:user-agent:mime-version\n\t:in-reply-to:content-language:content-transfer-encoding;\n\tbh=+aImly0/Vr4FFHLWtG3IwRrc7aBTLOtWZqN+jmg/T8Y=;\n\tb=MIMPsUbtyU4chtaSlgA/k1lrkCSVzP34rt3OTDvscCz4TjyKPHfOSSjuja7zcVr11+\n\tCOhK5HB+OsGrJDQgGNM7cIYpe7QtXY4S9+5pu7MytZRS0OhNqmg7A03YeiBkUEswFCSv\n\teBFF6ODGcuUJgKoc3NyX9rS2r+ExriUC8V9qcYxTHoBG8beP927wtrKd06dbQBozePQc\n\tpFy5uUFTkRGLyUYSiLntg85dksZD5hvgZ1wIdzLy7xgEkBn+eq0JuzPeRUMoyzmZw899\n\tLJ3GqZUgFem/ihif9fdeSAe/tc1AdfqQVNp3XbLu+Ws1FNQd++v+YveUVceVf16ZtABs\n\txokg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=+aImly0/Vr4FFHLWtG3IwRrc7aBTLOtWZqN+jmg/T8Y=;\n\tb=ePR6UdT76N31gVGF01JaksqGBWGAKlRO16oXo/AmcohnRO7f8fvhYglSsJVbWsQJtN\n\tC0WAMQoswyYLSHVmL79Mtrszam0OiMbHx/7zHgx7ansYnCS8Wgry0xXVj5C3whzc7YzE\n\tSffx236VWt4GmHsl/hiE798LXWi8S3APMivnt37esKh3vugQlujL3P16IJErwg1IsFy9\n\tMapsv46f6ivzf0+jkn3kDgExf7NRZZWU5rlAQEP4n1f8RG2DXBrTUdd9k1nEZc+/dHqZ\n\tjHfJOAg7Nn5nDx5mqS7a5bMtMp7raofkX0/PoXRwb/RoiWmi1RywFAzRtJLyJzsC4CNr\n\tDMcg==","X-Gm-Message-State":"AHPjjUhUr5YCu+XZNEKfr7ngZWy6tON3PpHjwZT4a9maBxftZmib5izV\n\tMDhKeWhhC6eDhg==","X-Google-Smtp-Source":"AOwi7QDr4umYADXd0Q7dzWaPsH7a5NhEKAQvbvNTOTNLjywKv5DAKJ4ub/MtNa9tRTi3YlkP85CKmA==","X-Received":"by 10.55.132.131 with SMTP id g125mr5271425qkd.87.1504896497871; \n\tFri, 08 Sep 2017 11:48:17 -0700 (PDT)","Subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","To":"Tristram.Ha@microchip.com, andrew@lunn.ch, muvarov@gmail.com,\n\tpavel@ucw.cz, nathan.leigh.conrad@gmail.com,\n\tvivien.didelot@savoirfairelinux.com, netdev@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, Woojung.Huh@microchip.com","References":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>","From":"Florian Fainelli <f.fainelli@gmail.com>","Message-ID":"<8e4aa981-7f41-047d-2101-370118b4f2c0@gmail.com>","Date":"Fri, 8 Sep 2017 11:48:12 -0700","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1765588,"web_url":"http://patchwork.ozlabs.org/comment/1765588/","msgid":"<CAJGZr0Kp5ZKmFJT+KX9jxMVyZT9=VO0_dpZqE+y1TNaYvURcoQ@mail.gmail.com>","list_archive_url":null,"date":"2017-09-08T19:00:14","subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","submitter":{"id":4154,"url":"http://patchwork.ozlabs.org/api/people/4154/","name":"Maxim Uvarov","email":"muvarov@gmail.com"},"content":"2017-09-08 21:48 GMT+03:00 Florian Fainelli <f.fainelli@gmail.com>:\n> On 09/07/2017 02:11 PM, Tristram.Ha@microchip.com wrote:\n>> From: Tristram Ha <Tristram.Ha@microchip.com>\n>>\n>> Add other KSZ switches support so that patch check does not complain.\n>>\n>> Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com>\n>> ---\n>>  Documentation/devicetree/bindings/net/dsa/ksz.txt | 117 ++++++++++++----------\n>>  1 file changed, 62 insertions(+), 55 deletions(-)\n>>\n>> diff --git a/Documentation/devicetree/bindings/net/dsa/ksz.txt b/Documentation/devicetree/bindings/net/dsa/ksz.txt\n>> index 0ab8b39..34af0e0 100644\n>> --- a/Documentation/devicetree/bindings/net/dsa/ksz.txt\n>> +++ b/Documentation/devicetree/bindings/net/dsa/ksz.txt\n>> @@ -3,8 +3,15 @@ Microchip KSZ Series Ethernet switches\n>>\n>>  Required properties:\n>>\n>> -- compatible: For external switch chips, compatible string must be exactly one\n>> -  of: \"microchip,ksz9477\"\n>> +- compatible: Should be \"microchip,ksz9477\" for KSZ9477 chip,\n>> +           \"microchip,ksz8795\" for KSZ8795 chip,\n>> +           \"microchip,ksz8794\" for KSZ8794 chip,\n>> +           \"microchip,ksz8765\" for KSZ8765 chip,\n>> +           \"microchip,ksz8895\" for KSZ8895 chip,\n>> +           \"microchip,ksz8864\" for KSZ8864 chip,\n>> +           \"microchip,ksz8873\" for KSZ8873 chip,\n>> +           \"microchip,ksz8863\" for KSZ8863 chip,\n>> +           \"microchip,ksz8463\" for KSZ8463 chip\n>\n\n\nTristram, does any of this devices support chaining?\n\nMaxim.\n\n> It becomes pretty obvious there is a 1 to 1 mapping between the\n> compatible name and what you should be using it for so specifying\n> ksz8795 for KSZ8795 chip is really redundant.\n>\n> You could just list all compatible strings that you support and change\n> the verbiage to be:\n>\n> compatible: Should be one of:\n>                 \"microchip,ksz9477\"\n>                 ...\n>                 \"microchip,ksz8463\"\n>>\n>>  See Documentation/devicetree/bindings/dsa/dsa.txt for a list of additional  required and optional properties.\n>> @@ -13,60 +20,60 @@ Examples:\n>>\n>>  Ethernet switch connected via SPI to the host, CPU port wired to eth0:\n>>\n>> -                             eth0: ethernet@10001000 {\n>> -                                             fixed-link {\n>> -                                                             speed = <1000>;\n>> -                                                             full-duplex;\n>> -                                             };\n>> -                             };\n>> +     eth0: ethernet@10001000 {\n>> +             fixed-link {\n>> +                     speed = <1000>;\n>> +                     full-duplex;\n>> +             };\n>> +     };\n>\n> This is a good clean up, but it would probably belong in a separate\n> patch that you would do before adding compatible strings for instance.\n>\n>>\n>> -                             spi1: spi@f8008000 {\n>> -                                             pinctrl-0 = <&pinctrl_spi_ksz>;\n>> -                                             cs-gpios = <&pioC 25 0>;\n>> -                                             id = <1>;\n>> -                                             status = \"okay\";\n>> +     spi1: spi@f8008000 {\n>> +             cs-gpios = <&pioC 25 0>;\n>> +             id = <1>;\n>> +             status = \"okay\";\n>>\n>> -                                             ksz9477: ksz9477@0 {\n>> -                                                             compatible = \"microchip,ksz9477\";\n>> -                                                             reg = <0>;\n>> +             ksz9477: ksz9477@0 {\n>> +                     compatible = \"microchip,ksz9477\";\n>> +                     reg = <0>;\n>>\n>> -                                                             spi-max-frequency = <44000000>;\n>> -                                                             spi-cpha;\n>> -                                                             spi-cpol;\n>> +                     spi-max-frequency = <44000000>;\n>> +                     spi-cpha;\n>> +                     spi-cpol;\n>> +\n>> +                     status = \"okay\";\n>> +                     ports {\n>> +                             #address-cells = <1>;\n>> +                             #size-cells = <0>;\n>> +                             port@0 {\n>> +                                     reg = <0>;\n>> +                                     label = \"lan1\";\n>> +                             };\n>> +                             port@1 {\n>> +                                     reg = <1>;\n>> +                                     label = \"lan2\";\n>> +                             };\n>> +                             port@2 {\n>> +                                     reg = <2>;\n>> +                                     label = \"lan3\";\n>> +                             };\n>> +                             port@3 {\n>> +                                     reg = <3>;\n>> +                                     label = \"lan4\";\n>> +                             };\n>> +                             port@4 {\n>> +                                     reg = <4>;\n>> +                                     label = \"lan5\";\n>> +                             };\n>> +                             port@5 {\n>> +                                     reg = <5>;\n>> +                                     label = \"cpu\";\n>> +                                     ethernet = <&eth0>;\n>> +                                     fixed-link {\n>> +                                             speed = <1000>;\n>> +                                             full-duplex;\n>> +                                     };\n>> +                             };\n>> +                     };\n>> +             };\n>> +     };\n>>\n>> -                                                             status = \"okay\";\n>> -                                                             ports {\n>> -                                                                             #address-cells = <1>;\n>> -                                                                             #size-cells = <0>;\n>> -                                                                             port@0 {\n>> -                                                                                             reg = <0>;\n>> -                                                                                             label = \"lan1\";\n>> -                                                                             };\n>> -                                                                             port@1 {\n>> -                                                                                             reg = <1>;\n>> -                                                                                             label = \"lan2\";\n>> -                                                                             };\n>> -                                                                             port@2 {\n>> -                                                                                             reg = <2>;\n>> -                                                                                             label = \"lan3\";\n>> -                                                                             };\n>> -                                                                             port@3 {\n>> -                                                                                             reg = <3>;\n>> -                                                                                             label = \"lan4\";\n>> -                                                                             };\n>> -                                                                             port@4 {\n>> -                                                                                             reg = <4>;\n>> -                                                                                             label = \"lan5\";\n>> -                                                                             };\n>> -                                                                             port@5 {\n>> -                                                                                             reg = <5>;\n>> -                                                                                             label = \"cpu\";\n>> -                                                                                             ethernet = <&eth0>;\n>> -                                                                                             fixed-link {\n>> -                                                                                                             speed = <1000>;\n>> -                                                                                                             full-duplex;\n>> -                                                                                             };\n>> -                                                                             };\n>> -                                                             };\n>> -                                             };\n>> -                             };\n>>\n>\n>\n> --\n> Florian","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"iFPr6jr3\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpmqM4DqJz9sRV\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Sep 2017 05:00:31 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1756751AbdIHTAS (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 8 Sep 2017 15:00:18 -0400","from mail-wm0-f65.google.com ([74.125.82.65]:36428 \"EHLO\n\tmail-wm0-f65.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1756581AbdIHTAQ (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 8 Sep 2017 15:00:16 -0400","by mail-wm0-f65.google.com with SMTP id p17so2302442wmd.3;\n\tFri, 08 Sep 2017 12:00:16 -0700 (PDT)","by 10.80.152.43 with HTTP; Fri, 8 Sep 2017 12:00:14 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=BwEDwiHlgwlgYM8CjTPwzhYEvQ9cgFaT/HwT3+vLnn8=;\n\tb=iFPr6jr3KrKLE87E+RH2KQVfSb8hm0wzNq0x3ghqNhp5bqj2DPHhGl6SoUr6x5dN1T\n\tIGinxG4b5Y0DLbCusvv8vrKIhOus14MYPconVDtdkrker5TS7NjrExPyCgHp07xEOlhp\n\tA23+Smj3yX9C9cdKzaia1ONqZdIGgNH32neZs34AjyItzDczERv4b88E1/q9Eevx4oxf\n\tAnR+Kmekd2ozJH0N83aBpx2hCkzEHEO5Vwar/FIthH5549SEMAVKGhw/Jef9hk0ilELd\n\t8zbMGfmI9cb/JkohHsLdJ2rAoWLHBPS/N7jXL+tkEYL5rN2EKsRtsOevyyoVbS3Yj/OP\n\tSyxw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=BwEDwiHlgwlgYM8CjTPwzhYEvQ9cgFaT/HwT3+vLnn8=;\n\tb=WQe00zVsIm/9igAxXfeWUe2KBkOZYL9gmXdCZfRmZHmkCy+zd8rAD2/dYvHgPj2bjR\n\tOip2N+OrzgMq4aqfDRh4WZ2asY6sdU85WorkwetT36DKd5bNAvvxNMHrYs3TcgfpX+e6\n\tGqgJLmdTwM9vZTs9sp4xGdSD/C/UINC77lwraaANs/ySb72H+YZo1Hj8d6q2k044N4w5\n\twjOa7oDQBigTg9OGF5GNguWuuxJjeo1qK+qEq1v3gZ8AxvO0yE8wJx5x/eftPJMmR/V8\n\tR6bfmPbJ2vO+gtReEVNDB/wEjW4p7fobaLQuCS6cuNR28EwVckk8T54UC7lhMqOihvAU\n\t2Y0g==","X-Gm-Message-State":"AHPjjUijNrcDqFb2rvUBBIzopVFuA0p3qHt8BqTGFsmYHC0s8K0Sa5vJ\n\tLTMCILTPGQ3KtPVgfTy5KR/p4N0eDg==","X-Google-Smtp-Source":"ADKCNb6wpuFy7exjVV0vQwGBe/ftpmmpaWo+zHoPSkDKI3Hm8gDs6omnd5E5mj8/2HhRkYWqnEOWJlBJWwGtW+cMpok=","X-Received":"by 10.80.203.140 with SMTP id k12mr2935265edi.46.1504897215358; \n\tFri, 08 Sep 2017 12:00:15 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<8e4aa981-7f41-047d-2101-370118b4f2c0@gmail.com>","References":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>\n\t<8e4aa981-7f41-047d-2101-370118b4f2c0@gmail.com>","From":"Maxim Uvarov <muvarov@gmail.com>","Date":"Fri, 8 Sep 2017 22:00:14 +0300","Message-ID":"<CAJGZr0Kp5ZKmFJT+KX9jxMVyZT9=VO0_dpZqE+y1TNaYvURcoQ@mail.gmail.com>","Subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","To":"Florian Fainelli <f.fainelli@gmail.com>","Cc":"Tristram.Ha@microchip.com, Andrew Lunn <andrew@lunn.ch>,\n\tPavel Machek <pavel@ucw.cz>,\n\tNathan Conrad <nathan.leigh.conrad@gmail.com>,\n\tVivien Didelot <vivien.didelot@savoirfairelinux.com>,\n\tnetdev <netdev@vger.kernel.org>, linux-kernel@vger.kernel.org,\n\tWoojung.Huh@microchip.com","Content-Type":"text/plain; charset=\"UTF-8\"","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1765589,"web_url":"http://patchwork.ozlabs.org/comment/1765589/","msgid":"<20170908190122.GM25219@lunn.ch>","list_archive_url":null,"date":"2017-09-08T19:01:22","subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","submitter":{"id":13608,"url":"http://patchwork.ozlabs.org/api/people/13608/","name":"Andrew Lunn","email":"andrew@lunn.ch"},"content":"> > So i would suggest one driver supporting all the different devices.\n> \n> There will be 5 drivers to support these devices:\n> \n> ksz9477.c - KSZ9893/KSZ9897/KSZ9567/KSZ9566/KSZ9477\n> ksz8795.c - KSZ8795/KSZ8795/KSZ8765\n> ksz8895.c - KSZ8895/KSZ8864\n> ksz8863.c - KSZ8863/KSZ8873\n> ksz8463.c - KSZ8463\n> \n> These chips have different SPI access mechanisms, MIB counter reading,\n> and register set.  These can be combined into one single driver using\n> function pointers, at least for ksz8795/ksz8895/ksz8863/ksz8463.  My\n> only concern is the memory footprint.  The customer may not want a\n> big driver to cover all the switches while only one is used.\n\nIf memory footprint is your problem, make it a compile time choice\nwhich devices are supported within the one driver. In practice, you\nwill find most distributions just enable them all.\n \n> Out of topic I have a question to ask the community regarding the DSA\n> port creation:\n> \n> Port 1 can be specified using the reg parameter specifying 0; port 2, 1;\n> and so on.  The KSZ8794 is a variant of KSZ8795 with port 4 disabled.\n> So\n> lan1 = 0, lan2 = 1, lan3 = 2, cpu = 4.\n> But our company Marketing does not want to promote that fact but treat\n> KSZ8794 as a distinct product.\n> So\n> lan1 = 0, lan2 = 1, lan3 = 2, cpu = 3.\n> Is this okay to hide this information inside the driver?  This is manageable\n> for KSZ8794 but for KSZ8864 the first port is disabled:\n> lan1 = 1, lan2 = 2, lan3 = 3, cpu = 4.\n> \n> I am not sure whether DSA has or will have a way to display the port\n> mapping to regular users.\n\nSo the port number to name is determined in the device tree. It\ndepends on the board how the ports are named. I always suggest going\nby the label on the box. clearfog is a good example of this, 0 - lan5,\n1 - lan4, etc.\n\nSo for the KSZ8864, ensure reg = 0 causes an error.\n\nDoes the hardware force which port is used for the CPU? I've boards\nwith Marvell devices where the CPU is port 0, or port 6, or port\n7. The hardware does not care. So we don't force anything.\n\nAs for KSZ8794 vs KSZ8795, is there different IDs in the silicon?  It\nis these IDs you are using, not the compatible string, to determine\nhow the drive the silicon. You can trust the ID in the\nsilicon. Anything else can be wrong.\n\n\t Andrew","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpmrd6rHMz9sRV\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Sep 2017 05:01:37 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1756860AbdIHTB0 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 8 Sep 2017 15:01:26 -0400","from vps0.lunn.ch ([178.209.37.122]:33579 \"EHLO vps0.lunn.ch\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1756303AbdIHTBZ (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tFri, 8 Sep 2017 15:01:25 -0400","from andrew by vps0.lunn.ch with local (Exim 4.84_2)\n\t(envelope-from <andrew@lunn.ch>)\n\tid 1dqOWo-0003Ei-MZ; Fri, 08 Sep 2017 21:01:22 +0200"],"Date":"Fri, 8 Sep 2017 21:01:22 +0200","From":"Andrew Lunn <andrew@lunn.ch>","To":"Tristram.Ha@microchip.com","Cc":"muvarov@gmail.com, pavel@ucw.cz, nathan.leigh.conrad@gmail.com,\n\tvivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com,\n\tnetdev@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tWoojung.Huh@microchip.com","Subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","Message-ID":"<20170908190122.GM25219@lunn.ch>","References":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>\n\t<20170907215417.GU11248@lunn.ch>\n\t<CAJGZr0+r3UhhRJcGXvBKZGamrSH_XEQY5oo7MTBjTTrDFOiKtg@mail.gmail.com>\n\t<20170908141225.GE25219@lunn.ch>\n\t<93AF473E2DA327428DE3D46B72B1E9FD41121E68@CHN-SV-EXMX02.mchp-main.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<93AF473E2DA327428DE3D46B72B1E9FD41121E68@CHN-SV-EXMX02.mchp-main.com>","User-Agent":"Mutt/1.5.23 (2014-03-12)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1765590,"web_url":"http://patchwork.ozlabs.org/comment/1765590/","msgid":"<7de95a6f-5953-5f32-4903-a83441418099@gmail.com>","list_archive_url":null,"date":"2017-09-08T19:05:35","subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","submitter":{"id":2800,"url":"http://patchwork.ozlabs.org/api/people/2800/","name":"Florian Fainelli","email":"f.fainelli@gmail.com"},"content":"On 09/08/2017 12:01 PM, Andrew Lunn wrote:\n>>> So i would suggest one driver supporting all the different devices.\n>>\n>> There will be 5 drivers to support these devices:\n>>\n>> ksz9477.c - KSZ9893/KSZ9897/KSZ9567/KSZ9566/KSZ9477\n>> ksz8795.c - KSZ8795/KSZ8795/KSZ8765\n>> ksz8895.c - KSZ8895/KSZ8864\n>> ksz8863.c - KSZ8863/KSZ8873\n>> ksz8463.c - KSZ8463\n>>\n>> These chips have different SPI access mechanisms, MIB counter reading,\n>> and register set.  These can be combined into one single driver using\n>> function pointers, at least for ksz8795/ksz8895/ksz8863/ksz8463.  My\n>> only concern is the memory footprint.  The customer may not want a\n>> big driver to cover all the switches while only one is used.\n> \n> If memory footprint is your problem, make it a compile time choice\n> which devices are supported within the one driver. In practice, you\n> will find most distributions just enable them all.\n>  \n>> Out of topic I have a question to ask the community regarding the DSA\n>> port creation:\n>>\n>> Port 1 can be specified using the reg parameter specifying 0; port 2, 1;\n>> and so on.  The KSZ8794 is a variant of KSZ8795 with port 4 disabled.\n>> So\n>> lan1 = 0, lan2 = 1, lan3 = 2, cpu = 4.\n>> But our company Marketing does not want to promote that fact but treat\n>> KSZ8794 as a distinct product.\n>> So\n>> lan1 = 0, lan2 = 1, lan3 = 2, cpu = 3.\n>> Is this okay to hide this information inside the driver?  This is manageable\n>> for KSZ8794 but for KSZ8864 the first port is disabled:\n>> lan1 = 1, lan2 = 2, lan3 = 3, cpu = 4.\n>>\n>> I am not sure whether DSA has or will have a way to display the port\n>> mapping to regular users.\n> \n> So the port number to name is determined in the device tree. It\n> depends on the board how the ports are named. I always suggest going\n> by the label on the box. clearfog is a good example of this, 0 - lan5,\n> 1 - lan4, etc.\n> \n> So for the KSZ8864, ensure reg = 0 causes an error.\n> \n> Does the hardware force which port is used for the CPU? I've boards\n> with Marvell devices where the CPU is port 0, or port 6, or port\n> 7. The hardware does not care. So we don't force anything.\n> \n> As for KSZ8794 vs KSZ8795, is there different IDs in the silicon?  It\n> is these IDs you are using, not the compatible string, to determine\n> how the drive the silicon. You can trust the ID in the\n> silicon. Anything else can be wrong.\n\nYou can't always trust the silicon to report the right revision, just\nlike marketing people in semiconductors tend to like to play tricks and\npretend that the same chip is the same, but it is not quite, and a new\ntape-out was not possible, so it has the same ID, including the\nrevision. This is of course not what should be done, but it happens all\nthe time.\n\nDescribe in Device Tree with a proper compatible string, which may\nend-up being treated the same way by the driver, and if it happens that\nthe silicon is not wrong, and can be differentiated, then you can always\nresort to that to warn the user the wrong compatible was specified, or\nthat this is not going to work, or anything really.","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"bqtSDivU\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpmxc0k96z9t16\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Sep 2017 05:05:56 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1756804AbdIHTFn (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 8 Sep 2017 15:05:43 -0400","from mail-qt0-f193.google.com ([209.85.216.193]:35946 \"EHLO\n\tmail-qt0-f193.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1756303AbdIHTFm (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 8 Sep 2017 15:05:42 -0400","by mail-qt0-f193.google.com with SMTP id 7so2074831qtz.3;\n\tFri, 08 Sep 2017 12:05:41 -0700 (PDT)","from [10.112.156.244] ([192.19.255.250])\n\tby smtp.googlemail.com with ESMTPSA id\n\tf4sm1724518qtg.35.2017.09.08.12.05.37\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 08 Sep 2017 12:05:40 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=iZaKluWi3Ju5teUEt/7w0CIHDDpiRaJUtJQ7gZ3Gezs=;\n\tb=bqtSDivUCyXyYDiBzYC/bKW5ZT8oIpTRoYaCNGsRF0ftDcefDKM9qAzMjDfUgOmzj0\n\t/er7enrpoelo4UlEsKc6sYQzQUt/n1QUMc4KcEhYi1M9HF93iH+WdkPRVepa6uS5i+OT\n\tyAHnukbBMwK6VBlEbnN3ALSopORT4kie+Y9VXqvnKkYsESnFO1ESaCDKc6I6+snTHu9E\n\tMd8BLnBuhTzrgqQWOoAOWP7D3KNmxquD8WlbVLKDFk9N3B/O23zpNtwOnyI6Kjhuu3Th\n\tb1yrUdbFE5iLARHvlIkZyDqQz5PxzA9t62Nt5F/1CtT/GHuTfSCPCG2qr4vX72LvQc0i\n\t2ROA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=iZaKluWi3Ju5teUEt/7w0CIHDDpiRaJUtJQ7gZ3Gezs=;\n\tb=Qz9DME5PoNOBN31GRdQeaJQlPVwFxhY+h3C7vRmTjjEETGKD9Zlkanzg7C1lqfnQR5\n\tqwEBy8itq/i4yhAoKD99/aZJlb7Zg2xMF9acu444RTRkWxqEsBCr0Ik2v7aX4rKuUuDj\n\t21vXUloIGT6qt/A9mnUMP55/WFHgLMPEM6ThqRvx40OlMNr9TOupDRwE81rLK3/Cs4OF\n\tam/EKAUHrZbVgCBx+8p5ywkEt2sfrmlPfEkXFrt7ZOTsTM+ut5eJWDXKS9PKLttX8m13\n\tABoxthFWAapPxOPg7DwFiBbF8UWDyFzYiZpfyQZqq+Uoqe4PJfKQN12BEmmHK1OgiMwf\n\tpbHw==","X-Gm-Message-State":"AHPjjUhW9bS+q+EIo+Os95u3CACtFXQuo1MK796vUHOFnXbCmji1buYh\n\twwXCuBDw1lOujg==","X-Google-Smtp-Source":"AOwi7QA6hbq1DK7Zv6DxfG0wHdkPp/EA2pUtOdbaOgm2yaObe391DtDKvYy+aR3hA9w5HI+imwIUaw==","X-Received":"by 10.200.55.83 with SMTP id p19mr5162256qtb.21.1504897541115;\n\tFri, 08 Sep 2017 12:05:41 -0700 (PDT)","Subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","To":"Andrew Lunn <andrew@lunn.ch>, Tristram.Ha@microchip.com","Cc":"muvarov@gmail.com, pavel@ucw.cz, nathan.leigh.conrad@gmail.com,\n\tvivien.didelot@savoirfairelinux.com, netdev@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, Woojung.Huh@microchip.com","References":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>\n\t<20170907215417.GU11248@lunn.ch>\n\t<CAJGZr0+r3UhhRJcGXvBKZGamrSH_XEQY5oo7MTBjTTrDFOiKtg@mail.gmail.com>\n\t<20170908141225.GE25219@lunn.ch>\n\t<93AF473E2DA327428DE3D46B72B1E9FD41121E68@CHN-SV-EXMX02.mchp-main.com>\n\t<20170908190122.GM25219@lunn.ch>","From":"Florian Fainelli <f.fainelli@gmail.com>","Message-ID":"<7de95a6f-5953-5f32-4903-a83441418099@gmail.com>","Date":"Fri, 8 Sep 2017 12:05:35 -0700","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170908190122.GM25219@lunn.ch>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1765604,"web_url":"http://patchwork.ozlabs.org/comment/1765604/","msgid":"<93AF473E2DA327428DE3D46B72B1E9FD41121EF7@CHN-SV-EXMX02.mchp-main.com>","list_archive_url":null,"date":"2017-09-08T19:48:46","subject":"RE: [PATCH RFC] Update documentation for KSZ DSA drivers so that\n\tnew drivers can be added","submitter":{"id":72262,"url":"http://patchwork.ozlabs.org/api/people/72262/","name":"","email":"Tristram.Ha@microchip.com"},"content":"> -----Original Message-----\r\n> From: Maxim Uvarov [mailto:muvarov@gmail.com]\r\n> Sent: Friday, September 08, 2017 12:00 PM\r\n> To: Florian Fainelli\r\n> Cc: Tristram Ha - C24268; Andrew Lunn; Pavel Machek; Nathan Conrad; Vivien\r\n> Didelot; netdev; linux-kernel@vger.kernel.org; Woojung Huh - C21699\r\n> Subject: Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\r\n> drivers can be added\r\n> \r\n> 2017-09-08 21:48 GMT+03:00 Florian Fainelli <f.fainelli@gmail.com>:\r\n> > On 09/07/2017 02:11 PM, Tristram.Ha@microchip.com wrote:\r\n> >> From: Tristram Ha <Tristram.Ha@microchip.com>\r\n> >>\r\n> >> Add other KSZ switches support so that patch check does not complain.\r\n> >>\r\n> >> Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com>\r\n> >> ---\r\n> >>  Documentation/devicetree/bindings/net/dsa/ksz.txt | 117\r\n> >> ++++++++++++----------\r\n> >>  1 file changed, 62 insertions(+), 55 deletions(-)\r\n> >>\r\n> >> diff --git a/Documentation/devicetree/bindings/net/dsa/ksz.txt\r\n> >> b/Documentation/devicetree/bindings/net/dsa/ksz.txt\r\n> >> index 0ab8b39..34af0e0 100644\r\n> >> --- a/Documentation/devicetree/bindings/net/dsa/ksz.txt\r\n> >> +++ b/Documentation/devicetree/bindings/net/dsa/ksz.txt\r\n> >> @@ -3,8 +3,15 @@ Microchip KSZ Series Ethernet switches\r\n> >>\r\n> >>  Required properties:\r\n> >>\r\n> >> -- compatible: For external switch chips, compatible string must be\r\n> >> exactly one\r\n> >> -  of: \"microchip,ksz9477\"\r\n> >> +- compatible: Should be \"microchip,ksz9477\" for KSZ9477 chip,\r\n> >> +           \"microchip,ksz8795\" for KSZ8795 chip,\r\n> >> +           \"microchip,ksz8794\" for KSZ8794 chip,\r\n> >> +           \"microchip,ksz8765\" for KSZ8765 chip,\r\n> >> +           \"microchip,ksz8895\" for KSZ8895 chip,\r\n> >> +           \"microchip,ksz8864\" for KSZ8864 chip,\r\n> >> +           \"microchip,ksz8873\" for KSZ8873 chip,\r\n> >> +           \"microchip,ksz8863\" for KSZ8863 chip,\r\n> >> +           \"microchip,ksz8463\" for KSZ8463 chip\r\n> >\r\n> \r\n> \r\n> Tristram, does any of this devices support chaining?\r\n> \r\n> Maxim.\r\n\r\nThey do not if you mean daisy-chaining the switches together.\r\n\r\nThere is always a problem that once tail tagging mode is enabled\r\nsending a frame through the MAC without going through the DSA\r\nlayer will cause the frame to be dropped.","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpnw85wKcz9t16\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Sep 2017 05:49:44 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1756895AbdIHTtc (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 8 Sep 2017 15:49:32 -0400","from esa3.microchip.iphmx.com ([68.232.153.233]:48280 \"EHLO\n\tesa3.microchip.iphmx.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1756751AbdIHTtb (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 8 Sep 2017 15:49:31 -0400","from smtpout.microchip.com (HELO email.microchip.com)\n\t([198.175.253.82])\n\tby esa3.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA;\n\t08 Sep 2017 12:48:46 -0700","from CHN-SV-EXMX02.mchp-main.com ([fe80::7dfe:3761:863e:3963]) by\n\tCHN-SV-EXCH05.mchp-main.com ([fe80::c1bf:7679:c1f8:4560%15]) with\n\tmapi id 14.03.0352.000; Fri, 8 Sep 2017 12:48:46 -0700"],"X-IronPort-AV":"E=Sophos;i=\"5.42,363,1500966000\"; d=\"scan'208\";a=\"6898718\"","From":"<Tristram.Ha@microchip.com>","To":"<muvarov@gmail.com>","CC":"<andrew@lunn.ch>, <pavel@ucw.cz>, <nathan.leigh.conrad@gmail.com>,\n\t<vivien.didelot@savoirfairelinux.com>, <netdev@vger.kernel.org>,\n\t<linux-kernel@vger.kernel.org>, <Woojung.Huh@microchip.com>,\n\t<f.fainelli@gmail.com>","Subject":"RE: [PATCH RFC] Update documentation for KSZ DSA drivers so that\n\tnew drivers can be added","Thread-Topic":"[PATCH RFC] Update documentation for KSZ DSA drivers so that\n\tnew drivers can be added","Thread-Index":"AdMoG1vQCaYOqKwvR0emAIo585WtYwAAm6rgADv53AAAAGuWAAANRnTQ","Date":"Fri, 8 Sep 2017 19:48:46 +0000","Message-ID":"<93AF473E2DA327428DE3D46B72B1E9FD41121EF7@CHN-SV-EXMX02.mchp-main.com>","References":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>\n\t<8e4aa981-7f41-047d-2101-370118b4f2c0@gmail.com>\n\t<CAJGZr0Kp5ZKmFJT+KX9jxMVyZT9=VO0_dpZqE+y1TNaYvURcoQ@mail.gmail.com>","In-Reply-To":"<CAJGZr0Kp5ZKmFJT+KX9jxMVyZT9=VO0_dpZqE+y1TNaYvURcoQ@mail.gmail.com>","Accept-Language":"en-US","Content-Language":"en-US","X-MS-Has-Attach":"","X-MS-TNEF-Correlator":"","x-originating-ip":"[10.10.76.4]","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","MIME-Version":"1.0","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1765609,"web_url":"http://patchwork.ozlabs.org/comment/1765609/","msgid":"<508d7ef0-e351-5369-b477-b027bae3dda4@gmail.com>","list_archive_url":null,"date":"2017-09-08T19:54:01","subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","submitter":{"id":2800,"url":"http://patchwork.ozlabs.org/api/people/2800/","name":"Florian Fainelli","email":"f.fainelli@gmail.com"},"content":"On 09/08/2017 12:48 PM, Tristram.Ha@microchip.com wrote:\n>> -----Original Message-----\n>> From: Maxim Uvarov [mailto:muvarov@gmail.com]\n>> Sent: Friday, September 08, 2017 12:00 PM\n>> To: Florian Fainelli\n>> Cc: Tristram Ha - C24268; Andrew Lunn; Pavel Machek; Nathan Conrad; Vivien\n>> Didelot; netdev; linux-kernel@vger.kernel.org; Woojung Huh - C21699\n>> Subject: Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n>> drivers can be added\n>>\n>> 2017-09-08 21:48 GMT+03:00 Florian Fainelli <f.fainelli@gmail.com>:\n>>> On 09/07/2017 02:11 PM, Tristram.Ha@microchip.com wrote:\n>>>> From: Tristram Ha <Tristram.Ha@microchip.com>\n>>>>\n>>>> Add other KSZ switches support so that patch check does not complain.\n>>>>\n>>>> Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com>\n>>>> ---\n>>>>  Documentation/devicetree/bindings/net/dsa/ksz.txt | 117\n>>>> ++++++++++++----------\n>>>>  1 file changed, 62 insertions(+), 55 deletions(-)\n>>>>\n>>>> diff --git a/Documentation/devicetree/bindings/net/dsa/ksz.txt\n>>>> b/Documentation/devicetree/bindings/net/dsa/ksz.txt\n>>>> index 0ab8b39..34af0e0 100644\n>>>> --- a/Documentation/devicetree/bindings/net/dsa/ksz.txt\n>>>> +++ b/Documentation/devicetree/bindings/net/dsa/ksz.txt\n>>>> @@ -3,8 +3,15 @@ Microchip KSZ Series Ethernet switches\n>>>>\n>>>>  Required properties:\n>>>>\n>>>> -- compatible: For external switch chips, compatible string must be\n>>>> exactly one\n>>>> -  of: \"microchip,ksz9477\"\n>>>> +- compatible: Should be \"microchip,ksz9477\" for KSZ9477 chip,\n>>>> +           \"microchip,ksz8795\" for KSZ8795 chip,\n>>>> +           \"microchip,ksz8794\" for KSZ8794 chip,\n>>>> +           \"microchip,ksz8765\" for KSZ8765 chip,\n>>>> +           \"microchip,ksz8895\" for KSZ8895 chip,\n>>>> +           \"microchip,ksz8864\" for KSZ8864 chip,\n>>>> +           \"microchip,ksz8873\" for KSZ8873 chip,\n>>>> +           \"microchip,ksz8863\" for KSZ8863 chip,\n>>>> +           \"microchip,ksz8463\" for KSZ8463 chip\n>>>\n>>\n>>\n>> Tristram, does any of this devices support chaining?\n>>\n>> Maxim.\n> \n> They do not if you mean daisy-chaining the switches together.\n\nMarvell tags allow you to specify both a port and switch index\ndestination after setting up an appropriate routing table, I am assuming\nthis is not supported.\n\nWhat happens though if I connect two KSZ switches ones to another say:\n\neth0\n\t-> KSZ8463\n\t\t-> KSZ8463\n\nWill the first switch terminates KSZ tag if it sees two tags\nencapsulated in another, something like this:\n\n| MAC DA | MAC SA | .... payload | Inner KSZ tag | Inner KSZ tag | FCS |\n\n> \n> There is always a problem that once tail tagging mode is enabled\n> sending a frame through the MAC without going through the DSA\n> layer will cause the frame to be dropped.\n\nYes, once the master network device is used for DSA, it is still usable\ndirectly by e.g: applications, but it won't do anything if the switch is\nconfigured such that it drops ingressing frames not having the proper\ntag. We documented that here:\n\nhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/dsa/dsa.txt#n275","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"fynrCPf3\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpp1R6b1Xz9sCZ\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Sep 2017 05:54:19 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1756939AbdIHTyI (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 8 Sep 2017 15:54:08 -0400","from mail-qt0-f196.google.com ([209.85.216.196]:37573 \"EHLO\n\tmail-qt0-f196.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1756751AbdIHTyG (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 8 Sep 2017 15:54:06 -0400","by mail-qt0-f196.google.com with SMTP id h21so2147376qth.4;\n\tFri, 08 Sep 2017 12:54:06 -0700 (PDT)","from [10.112.156.244] ([192.19.255.250])\n\tby smtp.googlemail.com with ESMTPSA id\n\tt90sm1775330qkl.77.2017.09.08.12.54.03\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 08 Sep 2017 12:54:04 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=9NJZERmceOmtiKJfaOfq0osJxYwNnxrRIoQiFcMP3+A=;\n\tb=fynrCPf35+BDTuxVk3HJRblleUIVzLcINLhEYXYuIcbbIcGzSovJb1/x6ivRK2iScP\n\t6Zh2NWd9TiTwQW4TxCRBq9APn131Cp24ZgpR21eodOFrBuxaLfDGaOQMnX0EtkrdnRR3\n\tZsR3YmKbZjq5SXneK5p31dL9RndUToxVMhzDCCuToSFtnktyrj8qptqR+BfksftqsWA6\n\tdH1A89x/y9py51d+tYsb/S13HwdY80DhsGwnirWN7fileS8Rt1uodgTzp38qVZx411w4\n\tsAbvQtx4i6i8wpVkVSb5WqN9KGmYaUJRbjH/s0FV8sNfvAdsBR1YIIttzoM18rv3xT6a\n\tliXQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=9NJZERmceOmtiKJfaOfq0osJxYwNnxrRIoQiFcMP3+A=;\n\tb=NxzlHjAuuWpfU2amPTODvd+I7i13+L0DokTbCzBZmsYodOi7WOtLxNyULK4/7efVKo\n\tzk/r9QBa6jRp18P0UbjK4gt+MSUUV3qyEoeqrwVVPqEW9KuPLTz6bSGD/RmHe3yOD3Gp\n\tTVSm5Ttr3we8CJxxhyiUe9BmXvPEXJO4l6Hcll5WAF6EuHbPtwt2YXnhtFD4o2HyOIZL\n\t5tKYYiff4tCqDxOj3fnuViL1zprLcd9OLwbviUgJ//cNrCQgxzCusxlXGQQ3D1NiAE8Y\n\tu1TRZJkPwRERmJuZOJExZu3fu1pT4h61CaUc+LjuGJo+7eqV5dkO4ktWOSFh9XzZvuvF\n\tSSNA==","X-Gm-Message-State":"AHPjjUguDzQkFRPz4cQ+9516oQoIMQQOIHz1Lcz/Z4cjqZgNCu/VO/dk\n\tgtKCnvbMNAltwQPiJSY=","X-Google-Smtp-Source":"AOwi7QCOoLDxA2SK4qedfjXFoofAzib/Xd7gR5jq1ubM8+574h7sBDNWVBMqFjOplnk4VJaK6e/s0w==","X-Received":"by 10.200.36.79 with SMTP id d15mr5954152qtd.131.1504900445677; \n\tFri, 08 Sep 2017 12:54:05 -0700 (PDT)","Subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","To":"Tristram.Ha@microchip.com, muvarov@gmail.com","Cc":"andrew@lunn.ch, pavel@ucw.cz, nathan.leigh.conrad@gmail.com,\n\tvivien.didelot@savoirfairelinux.com, netdev@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, Woojung.Huh@microchip.com","References":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>\n\t<8e4aa981-7f41-047d-2101-370118b4f2c0@gmail.com>\n\t<CAJGZr0Kp5ZKmFJT+KX9jxMVyZT9=VO0_dpZqE+y1TNaYvURcoQ@mail.gmail.com>\n\t<93AF473E2DA327428DE3D46B72B1E9FD41121EF7@CHN-SV-EXMX02.mchp-main.com>","From":"Florian Fainelli <f.fainelli@gmail.com>","Message-ID":"<508d7ef0-e351-5369-b477-b027bae3dda4@gmail.com>","Date":"Fri, 8 Sep 2017 12:54:01 -0700","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<93AF473E2DA327428DE3D46B72B1E9FD41121EF7@CHN-SV-EXMX02.mchp-main.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1765614,"web_url":"http://patchwork.ozlabs.org/comment/1765614/","msgid":"<93AF473E2DA327428DE3D46B72B1E9FD41121F35@CHN-SV-EXMX02.mchp-main.com>","list_archive_url":null,"date":"2017-09-08T20:07:41","subject":"RE: [PATCH RFC] Update documentation for KSZ DSA drivers so that\n\tnew drivers can be added","submitter":{"id":72262,"url":"http://patchwork.ozlabs.org/api/people/72262/","name":"","email":"Tristram.Ha@microchip.com"},"content":"> -----Original Message-----\r\n> From: Florian Fainelli [mailto:f.fainelli@gmail.com]\r\n> Sent: Friday, September 08, 2017 12:54 PM\r\n> To: Tristram Ha - C24268; muvarov@gmail.com\r\n> Cc: andrew@lunn.ch; pavel@ucw.cz; nathan.leigh.conrad@gmail.com;\r\n> vivien.didelot@savoirfairelinux.com; netdev@vger.kernel.org; linux-\r\n> kernel@vger.kernel.org; Woojung Huh - C21699\r\n> Subject: Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\r\n> drivers can be added\r\n> \r\n> On 09/08/2017 12:48 PM, Tristram.Ha@microchip.com wrote:\r\n> >> -----Original Message-----\r\n> >> From: Maxim Uvarov [mailto:muvarov@gmail.com]\r\n> >> Sent: Friday, September 08, 2017 12:00 PM\r\n> >> To: Florian Fainelli\r\n> >> Cc: Tristram Ha - C24268; Andrew Lunn; Pavel Machek; Nathan Conrad; Vivien\r\n> >> Didelot; netdev; linux-kernel@vger.kernel.org; Woojung Huh - C21699\r\n> >> Subject: Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that\r\n> new\r\n> >> drivers can be added\r\n> >>\r\n> >> 2017-09-08 21:48 GMT+03:00 Florian Fainelli <f.fainelli@gmail.com>:\r\n> >>> On 09/07/2017 02:11 PM, Tristram.Ha@microchip.com wrote:\r\n> >>>> From: Tristram Ha <Tristram.Ha@microchip.com>\r\n> >>>>\r\n> >>>> Add other KSZ switches support so that patch check does not complain.\r\n> >>>>\r\n> >>>> Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com>\r\n> >>>> ---\r\n> >>>>  Documentation/devicetree/bindings/net/dsa/ksz.txt | 117\r\n> >>>> ++++++++++++----------\r\n> >>>>  1 file changed, 62 insertions(+), 55 deletions(-)\r\n> >>>>\r\n> >>>> diff --git a/Documentation/devicetree/bindings/net/dsa/ksz.txt\r\n> >>>> b/Documentation/devicetree/bindings/net/dsa/ksz.txt\r\n> >>>> index 0ab8b39..34af0e0 100644\r\n> >>>> --- a/Documentation/devicetree/bindings/net/dsa/ksz.txt\r\n> >>>> +++ b/Documentation/devicetree/bindings/net/dsa/ksz.txt\r\n> >>>> @@ -3,8 +3,15 @@ Microchip KSZ Series Ethernet switches\r\n> >>>>\r\n> >>>>  Required properties:\r\n> >>>>\r\n> >>>> -- compatible: For external switch chips, compatible string must be\r\n> >>>> exactly one\r\n> >>>> -  of: \"microchip,ksz9477\"\r\n> >>>> +- compatible: Should be \"microchip,ksz9477\" for KSZ9477 chip,\r\n> >>>> +           \"microchip,ksz8795\" for KSZ8795 chip,\r\n> >>>> +           \"microchip,ksz8794\" for KSZ8794 chip,\r\n> >>>> +           \"microchip,ksz8765\" for KSZ8765 chip,\r\n> >>>> +           \"microchip,ksz8895\" for KSZ8895 chip,\r\n> >>>> +           \"microchip,ksz8864\" for KSZ8864 chip,\r\n> >>>> +           \"microchip,ksz8873\" for KSZ8873 chip,\r\n> >>>> +           \"microchip,ksz8863\" for KSZ8863 chip,\r\n> >>>> +           \"microchip,ksz8463\" for KSZ8463 chip\r\n> >>>\r\n> >>\r\n> >>\r\n> >> Tristram, does any of this devices support chaining?\r\n> >>\r\n> >> Maxim.\r\n> >\r\n> > They do not if you mean daisy-chaining the switches together.\r\n> \r\n> Marvell tags allow you to specify both a port and switch index\r\n> destination after setting up an appropriate routing table, I am assuming\r\n> this is not supported.\r\n> \r\n> What happens though if I connect two KSZ switches ones to another say:\r\n> \r\n> eth0\r\n> \t-> KSZ8463\r\n> \t\t-> KSZ8463\r\n> \r\n> Will the first switch terminates KSZ tag if it sees two tags\r\n> encapsulated in another, something like this:\r\n> \r\n> | MAC DA | MAC SA | .... payload | Inner KSZ tag | Inner KSZ tag | FCS |\r\n> \r\n\r\nIn theory it is doable by adding more tags and remember which port\r\nis connected to the cpu port of another switch, but there is no switch\r\nforwarding and everything is handled by software.\r\n\r\n> >\r\n> > There is always a problem that once tail tagging mode is enabled\r\n> > sending a frame through the MAC without going through the DSA\r\n> > layer will cause the frame to be dropped.\r\n> \r\n> Yes, once the master network device is used for DSA, it is still usable\r\n> directly by e.g: applications, but it won't do anything if the switch is\r\n> configured such that it drops ingressing frames not having the proper\r\n> tag. We documented that here:\r\n> \r\n> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Docume\r\n> ntation/networking/dsa/dsa.txt#n275\r\n> --\r\n\r\nAs the DSA was developed for the Marvell switches I assumed they can\r\nforward frame without a tag.","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xppL16HFCz9sBW\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Sep 2017 06:08:41 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1757018AbdIHUIc (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 8 Sep 2017 16:08:32 -0400","from esa1.microchip.iphmx.com ([68.232.147.91]:44224 \"EHLO\n\tesa1.microchip.iphmx.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1756905AbdIHUIb (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 8 Sep 2017 16:08:31 -0400","from smtpout.microchip.com (HELO email.microchip.com)\n\t([198.175.253.82])\n\tby esa1.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA;\n\t08 Sep 2017 13:07:42 -0700","from CHN-SV-EXMX02.mchp-main.com ([fe80::7dfe:3761:863e:3963]) by\n\tCHN-SV-EXCH07.mchp-main.com ([fe80::ad3d:8f75:7e60:e60f%15]) with\n\tmapi id 14.03.0352.000; Fri, 8 Sep 2017 13:07:42 -0700"],"X-IronPort-AV":"E=Sophos;i=\"5.42,363,1500966000\"; d=\"scan'208\";a=\"7235785\"","From":"<Tristram.Ha@microchip.com>","To":"<f.fainelli@gmail.com>","CC":"<andrew@lunn.ch>, <pavel@ucw.cz>, <nathan.leigh.conrad@gmail.com>,\n\t<vivien.didelot@savoirfairelinux.com>, <netdev@vger.kernel.org>,\n\t<linux-kernel@vger.kernel.org>, <Woojung.Huh@microchip.com>,\n\t<muvarov@gmail.com>","Subject":"RE: [PATCH RFC] Update documentation for KSZ DSA drivers so that\n\tnew drivers can be added","Thread-Topic":"[PATCH RFC] Update documentation for KSZ DSA drivers so that\n\tnew drivers can be added","Thread-Index":"AdMoG1vQCaYOqKwvR0emAIo585WtYwAAm6rgADv53AAAAGuWAAANRnTQ//+k04CAAHSpkA==","Date":"Fri, 8 Sep 2017 20:07:41 +0000","Message-ID":"<93AF473E2DA327428DE3D46B72B1E9FD41121F35@CHN-SV-EXMX02.mchp-main.com>","References":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>\n\t<8e4aa981-7f41-047d-2101-370118b4f2c0@gmail.com>\n\t<CAJGZr0Kp5ZKmFJT+KX9jxMVyZT9=VO0_dpZqE+y1TNaYvURcoQ@mail.gmail.com>\n\t<93AF473E2DA327428DE3D46B72B1E9FD41121EF7@CHN-SV-EXMX02.mchp-main.com>\n\t<508d7ef0-e351-5369-b477-b027bae3dda4@gmail.com>","In-Reply-To":"<508d7ef0-e351-5369-b477-b027bae3dda4@gmail.com>","Accept-Language":"en-US","Content-Language":"en-US","X-MS-Has-Attach":"","X-MS-TNEF-Correlator":"","x-originating-ip":"[10.10.76.4]","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","MIME-Version":"1.0","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1765621,"web_url":"http://patchwork.ozlabs.org/comment/1765621/","msgid":"<01ed87f4-09bc-21f0-7d41-a4b245cfa4bd@gmail.com>","list_archive_url":null,"date":"2017-09-08T20:58:34","subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","submitter":{"id":2800,"url":"http://patchwork.ozlabs.org/api/people/2800/","name":"Florian Fainelli","email":"f.fainelli@gmail.com"},"content":"On 09/08/2017 01:07 PM, Tristram.Ha@microchip.com wrote:\n>> -----Original Message-----\n>> From: Florian Fainelli [mailto:f.fainelli@gmail.com]\n>> Sent: Friday, September 08, 2017 12:54 PM\n>> To: Tristram Ha - C24268; muvarov@gmail.com\n>> Cc: andrew@lunn.ch; pavel@ucw.cz; nathan.leigh.conrad@gmail.com;\n>> vivien.didelot@savoirfairelinux.com; netdev@vger.kernel.org; linux-\n>> kernel@vger.kernel.org; Woojung Huh - C21699\n>> Subject: Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n>> drivers can be added\n>>\n>> On 09/08/2017 12:48 PM, Tristram.Ha@microchip.com wrote:\n>>>> -----Original Message-----\n>>>> From: Maxim Uvarov [mailto:muvarov@gmail.com]\n>>>> Sent: Friday, September 08, 2017 12:00 PM\n>>>> To: Florian Fainelli\n>>>> Cc: Tristram Ha - C24268; Andrew Lunn; Pavel Machek; Nathan Conrad; Vivien\n>>>> Didelot; netdev; linux-kernel@vger.kernel.org; Woojung Huh - C21699\n>>>> Subject: Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that\n>> new\n>>>> drivers can be added\n>>>>\n>>>> 2017-09-08 21:48 GMT+03:00 Florian Fainelli <f.fainelli@gmail.com>:\n>>>>> On 09/07/2017 02:11 PM, Tristram.Ha@microchip.com wrote:\n>>>>>> From: Tristram Ha <Tristram.Ha@microchip.com>\n>>>>>>\n>>>>>> Add other KSZ switches support so that patch check does not complain.\n>>>>>>\n>>>>>> Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com>\n>>>>>> ---\n>>>>>>  Documentation/devicetree/bindings/net/dsa/ksz.txt | 117\n>>>>>> ++++++++++++----------\n>>>>>>  1 file changed, 62 insertions(+), 55 deletions(-)\n>>>>>>\n>>>>>> diff --git a/Documentation/devicetree/bindings/net/dsa/ksz.txt\n>>>>>> b/Documentation/devicetree/bindings/net/dsa/ksz.txt\n>>>>>> index 0ab8b39..34af0e0 100644\n>>>>>> --- a/Documentation/devicetree/bindings/net/dsa/ksz.txt\n>>>>>> +++ b/Documentation/devicetree/bindings/net/dsa/ksz.txt\n>>>>>> @@ -3,8 +3,15 @@ Microchip KSZ Series Ethernet switches\n>>>>>>\n>>>>>>  Required properties:\n>>>>>>\n>>>>>> -- compatible: For external switch chips, compatible string must be\n>>>>>> exactly one\n>>>>>> -  of: \"microchip,ksz9477\"\n>>>>>> +- compatible: Should be \"microchip,ksz9477\" for KSZ9477 chip,\n>>>>>> +           \"microchip,ksz8795\" for KSZ8795 chip,\n>>>>>> +           \"microchip,ksz8794\" for KSZ8794 chip,\n>>>>>> +           \"microchip,ksz8765\" for KSZ8765 chip,\n>>>>>> +           \"microchip,ksz8895\" for KSZ8895 chip,\n>>>>>> +           \"microchip,ksz8864\" for KSZ8864 chip,\n>>>>>> +           \"microchip,ksz8873\" for KSZ8873 chip,\n>>>>>> +           \"microchip,ksz8863\" for KSZ8863 chip,\n>>>>>> +           \"microchip,ksz8463\" for KSZ8463 chip\n>>>>>\n>>>>\n>>>>\n>>>> Tristram, does any of this devices support chaining?\n>>>>\n>>>> Maxim.\n>>>\n>>> They do not if you mean daisy-chaining the switches together.\n>>\n>> Marvell tags allow you to specify both a port and switch index\n>> destination after setting up an appropriate routing table, I am assuming\n>> this is not supported.\n>>\n>> What happens though if I connect two KSZ switches ones to another say:\n>>\n>> eth0\n>> \t-> KSZ8463\n>> \t\t-> KSZ8463\n>>\n>> Will the first switch terminates KSZ tag if it sees two tags\n>> encapsulated in another, something like this:\n>>\n>> | MAC DA | MAC SA | .... payload | Inner KSZ tag | Inner KSZ tag | FCS |\n>>\n> \n> In theory it is doable by adding more tags and remember which port\n> is connected to the cpu port of another switch, but there is no switch\n> forwarding and everything is handled by software.\n\nFair enough.\n\n> \n>>>\n>>> There is always a problem that once tail tagging mode is enabled\n>>> sending a frame through the MAC without going through the DSA\n>>> layer will cause the frame to be dropped.\n>>\n>> Yes, once the master network device is used for DSA, it is still usable\n>> directly by e.g: applications, but it won't do anything if the switch is\n>> configured such that it drops ingressing frames not having the proper\n>> tag. We documented that here:\n>>\n>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Docume\n>> ntation/networking/dsa/dsa.txt#n275\n>> --\n> \n> As the DSA was developed for the Marvell switches I assumed they can\n> forward frame without a tag.\n\nOnce you use tags with your switch, eth0/master netdev/conduit interface\nno longer has a purpose as a normal interface because we create per-port\nnetwork devices. That means if you want to send packets towards Port 0\nyou use the proper network interface. If you create a bridge, you will\nuse brX as the network device to send/receive packets from, in all\ncases, the packets originate from the CPU and the frame ingresses the\nswitch with the proper information within the tag to target the vector\nof ports.\n\nIf you have tags enabled and you use eth0 to send packets towards the\nswitch, there are not that many options, either you have the proper tag,\nand the switch will forward to the right port which can be the CPU port\nitself if you want, but why do that?\n\nWhen tags are not enabled (e.g: b53) that is slightly different,\neth0/master/conduit remains usable as a normal interface would, but\nunless you start adding VLAN tags, you cannot quite differentiate where\nthe traffic from LAN to CPU is coming from, so this has limited usefulness.\n\nHope this clears things.","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"EavVt9i/\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpqRz3gKqz9s7f\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Sep 2017 06:58:55 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1757135AbdIHU6m (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 8 Sep 2017 16:58:42 -0400","from mail-qk0-f182.google.com ([209.85.220.182]:36576 \"EHLO\n\tmail-qk0-f182.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1756895AbdIHU6k (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 8 Sep 2017 16:58:40 -0400","by mail-qk0-f182.google.com with SMTP id z143so9151175qkb.3;\n\tFri, 08 Sep 2017 13:58:40 -0700 (PDT)","from [10.112.156.244] ([192.19.255.250])\n\tby smtp.googlemail.com with ESMTPSA id\n\tq52sm1893972qtc.12.2017.09.08.13.58.35\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 08 Sep 2017 13:58:38 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=HR7UYHNOupSKe7VZrqaTXl7Sj9lgz5un40dYBvi4HDE=;\n\tb=EavVt9i/ZSkDF/voLdv0P+9nzty9jvXYFpqpoLkGY65F2D5g5EupPKgLRUA+C8nnpw\n\tFotZ5VJHQX1+TUU7TIlX1MCk3XUKh4aKpSsioLCJQOc43Pc74gljwSdG0rS9t7At4Y+O\n\tFhh4nfzqKUfw5GtMXDpfr6fgFQsyRPGYeI8ZWnVjzjtVN1B52f3UUwqU0hTYrnPc/RDU\n\tVR4NVrRiHrBswbDAFokrxFuVMeiggNq9F0I1KZxr7JhBCrfSkkNVroenyqoD2R6FEq1d\n\t3oYUpPfnKObMdYSqniD+xivSnm8p+I8/oJhrpAbJbxIsB4KPKdX/VCkIkldkeybDQb1v\n\tot+A==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=HR7UYHNOupSKe7VZrqaTXl7Sj9lgz5un40dYBvi4HDE=;\n\tb=WXQlKKnEdg3vxehS5bYQsARfvByHRT+jsEm9fgY+V1KQNtGawue7IDx+nlpcgyaxJi\n\tPGAT5ER5WEF6susnI0iUu0NRmDfLefyy5XR9g0LjV5TB726cwtN8ObeCQOW//FZo9YQp\n\t09xUqVSN6NPmZWrAgmjLlV9cYfCTJd/u72+NmyPhlE83HiksBgcPoKHzOo9pNAhD21nV\n\taqMvc8zrOvPDd5WDdtdP3Sji9PtTJ9mFiPg7ITOY+8HsDOkO0mFQ1b1uGjgVd95naX9m\n\tmVpVhQ79npWIonjhV4TqnEfIsxR8jj0srXKfH3xgQcvyw9Bnh5D1zA3LTlUJU/QANyRE\n\tvFSg==","X-Gm-Message-State":"AHPjjUjNEkWAXtb51AR/AGrZVjAr1r7Js7D8pCjfNdCDg86dDC7vIe5/\n\t4+D93Zs5+hntZQ==","X-Google-Smtp-Source":"AOwi7QCWO7L2OcQ7CYSwGosBPOQzBZPxKMKrkcrn2wEPG/xORgsOUPlbbzbu/6J9XVF955J2xNDVDg==","X-Received":"by 10.55.121.194 with SMTP id u185mr5908269qkc.101.1504904319794;\n\tFri, 08 Sep 2017 13:58:39 -0700 (PDT)","Subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","To":"Tristram.Ha@microchip.com","Cc":"andrew@lunn.ch, pavel@ucw.cz, nathan.leigh.conrad@gmail.com,\n\tvivien.didelot@savoirfairelinux.com, netdev@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, Woojung.Huh@microchip.com,\n\tmuvarov@gmail.com","References":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>\n\t<8e4aa981-7f41-047d-2101-370118b4f2c0@gmail.com>\n\t<CAJGZr0Kp5ZKmFJT+KX9jxMVyZT9=VO0_dpZqE+y1TNaYvURcoQ@mail.gmail.com>\n\t<93AF473E2DA327428DE3D46B72B1E9FD41121EF7@CHN-SV-EXMX02.mchp-main.com>\n\t<508d7ef0-e351-5369-b477-b027bae3dda4@gmail.com>\n\t<93AF473E2DA327428DE3D46B72B1E9FD41121F35@CHN-SV-EXMX02.mchp-main.com>","From":"Florian Fainelli <f.fainelli@gmail.com>","Message-ID":"<01ed87f4-09bc-21f0-7d41-a4b245cfa4bd@gmail.com>","Date":"Fri, 8 Sep 2017 13:58:34 -0700","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<93AF473E2DA327428DE3D46B72B1E9FD41121F35@CHN-SV-EXMX02.mchp-main.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1765627,"web_url":"http://patchwork.ozlabs.org/comment/1765627/","msgid":"<20170908215042.GC27428@amd>","list_archive_url":null,"date":"2017-09-08T21:50:43","subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","submitter":{"id":2109,"url":"http://patchwork.ozlabs.org/api/people/2109/","name":"Pavel Machek","email":"pavel@ucw.cz"},"content":"On Fri 2017-09-08 21:01:22, Andrew Lunn wrote:\n> > > So i would suggest one driver supporting all the different devices.\n> > \n> > There will be 5 drivers to support these devices:\n> > \n> > ksz9477.c - KSZ9893/KSZ9897/KSZ9567/KSZ9566/KSZ9477\n> > ksz8795.c - KSZ8795/KSZ8795/KSZ8765\n> > ksz8895.c - KSZ8895/KSZ8864\n> > ksz8863.c - KSZ8863/KSZ8873\n> > ksz8463.c - KSZ8463\n> > \n> > These chips have different SPI access mechanisms, MIB counter reading,\n> > and register set.  These can be combined into one single driver using\n> > function pointers, at least for ksz8795/ksz8895/ksz8863/ksz8463.  My\n> > only concern is the memory footprint.  The customer may not want a\n> > big driver to cover all the switches while only one is used.\n> \n> If memory footprint is your problem, make it a compile time choice\n> which devices are supported within the one driver. In practice, you\n> will find most distributions just enable them all.\n\nI have to side with Tristram here. The register layouts are so\ndifferent that single driver does not make sense.\n\nWhat could make sense is single function, compiled 5 times, based on\ndifferent includes; same source code but 5 different binaries.\n\n\t\t\t\t\t\t\t\t\tPavel","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xprc11q3Kz9s82\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Sep 2017 07:50:57 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S932381AbdIHVup (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 8 Sep 2017 17:50:45 -0400","from atrey.karlin.mff.cuni.cz ([195.113.26.193]:59457 \"EHLO\n\tatrey.karlin.mff.cuni.cz\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752999AbdIHVuo (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 8 Sep 2017 17:50:44 -0400","by atrey.karlin.mff.cuni.cz (Postfix, from userid 512)\n\tid 661E7824AB; Fri,  8 Sep 2017 23:50:43 +0200 (CEST)"],"Date":"Fri, 8 Sep 2017 23:50:43 +0200","From":"Pavel Machek <pavel@ucw.cz>","To":"Andrew Lunn <andrew@lunn.ch>","Cc":"Tristram.Ha@microchip.com, muvarov@gmail.com,\n\tnathan.leigh.conrad@gmail.com, vivien.didelot@savoirfairelinux.com,\n\tf.fainelli@gmail.com, netdev@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, Woojung.Huh@microchip.com","Subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","Message-ID":"<20170908215042.GC27428@amd>","References":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>\n\t<20170907215417.GU11248@lunn.ch>\n\t<CAJGZr0+r3UhhRJcGXvBKZGamrSH_XEQY5oo7MTBjTTrDFOiKtg@mail.gmail.com>\n\t<20170908141225.GE25219@lunn.ch>\n\t<93AF473E2DA327428DE3D46B72B1E9FD41121E68@CHN-SV-EXMX02.mchp-main.com>\n\t<20170908190122.GM25219@lunn.ch>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha1;\n\tprotocol=\"application/pgp-signature\"; boundary=\"MnLPg7ZWsaic7Fhd\"","Content-Disposition":"inline","In-Reply-To":"<20170908190122.GM25219@lunn.ch>","User-Agent":"Mutt/1.5.23 (2014-03-12)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1765629,"web_url":"http://patchwork.ozlabs.org/comment/1765629/","msgid":"<20170908215336.GD27428@amd>","list_archive_url":null,"date":"2017-09-08T21:53:36","subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","submitter":{"id":2109,"url":"http://patchwork.ozlabs.org/api/people/2109/","name":"Pavel Machek","email":"pavel@ucw.cz"},"content":"Hi!\n\n> There will be 5 drivers to support these devices:\n> \n> ksz9477.c - KSZ9893/KSZ9897/KSZ9567/KSZ9566/KSZ9477\n> ksz8795.c - KSZ8795/KSZ8795/KSZ8765\n> ksz8895.c - KSZ8895/KSZ8864\n\nCould we see the 8895 driver, please?\n\n> Out of topic I have a question to ask the community regarding the DSA\n> port creation:\n> \n> Port 1 can be specified using the reg parameter specifying 0; port 2, 1;\n> and so on.  The KSZ8794 is a variant of KSZ8795 with port 4 disabled.\n> So\n> lan1 = 0, lan2 = 1, lan3 = 2, cpu = 4.\n> But our company Marketing does not want to promote that fact but treat\n> KSZ8794 as a distinct product.\n> So\n> lan1 = 0, lan2 = 1, lan3 = 2, cpu = 3.\n> Is this okay to hide this information inside the driver?  This is manageable\n> for KSZ8794 but for KSZ8864 the first port is disabled:\n> lan1 = 1, lan2 = 2, lan3 = 3, cpu = 4.\n> \n> I am not sure whether DSA has or will have a way to display the port\n> mapping to regular users.\n\nKernel is not a place to play marketing games, and people reading the\nkernel sources are not targets of your marketing department.\n\nPlease let us just see the underlying hardware, as is.\n\t\t\t\t\t\t\t\t\tPavel","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xprgK5nDgz9s82\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Sep 2017 07:53:49 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S932771AbdIHVxj (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 8 Sep 2017 17:53:39 -0400","from atrey.karlin.mff.cuni.cz ([195.113.26.193]:59541 \"EHLO\n\tatrey.karlin.mff.cuni.cz\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S932323AbdIHVxi (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 8 Sep 2017 17:53:38 -0400","by atrey.karlin.mff.cuni.cz (Postfix, from userid 512)\n\tid 34797824AD; Fri,  8 Sep 2017 23:53:37 +0200 (CEST)"],"Date":"Fri, 8 Sep 2017 23:53:36 +0200","From":"Pavel Machek <pavel@ucw.cz>","To":"Tristram.Ha@microchip.com","Cc":"andrew@lunn.ch, muvarov@gmail.com, nathan.leigh.conrad@gmail.com,\n\tvivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com,\n\tnetdev@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tWoojung.Huh@microchip.com","Subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","Message-ID":"<20170908215336.GD27428@amd>","References":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>\n\t<20170907215417.GU11248@lunn.ch>\n\t<CAJGZr0+r3UhhRJcGXvBKZGamrSH_XEQY5oo7MTBjTTrDFOiKtg@mail.gmail.com>\n\t<20170908141225.GE25219@lunn.ch>\n\t<93AF473E2DA327428DE3D46B72B1E9FD41121E68@CHN-SV-EXMX02.mchp-main.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha1;\n\tprotocol=\"application/pgp-signature\"; boundary=\"LKTjZJSUETSlgu2t\"","Content-Disposition":"inline","In-Reply-To":"<93AF473E2DA327428DE3D46B72B1E9FD41121E68@CHN-SV-EXMX02.mchp-main.com>","User-Agent":"Mutt/1.5.23 (2014-03-12)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1766113,"web_url":"http://patchwork.ozlabs.org/comment/1766113/","msgid":"<CAJGZr0+tqucicpX24Ek7fkUkc2ia=+ucPVVPWS1Gbb65uxOJtQ@mail.gmail.com>","list_archive_url":null,"date":"2017-09-11T07:53:42","subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","submitter":{"id":4154,"url":"http://patchwork.ozlabs.org/api/people/4154/","name":"Maxim Uvarov","email":"muvarov@gmail.com"},"content":"2017-09-08 22:48 GMT+03:00  <Tristram.Ha@microchip.com>:\n>> -----Original Message-----\n>> From: Maxim Uvarov [mailto:muvarov@gmail.com]\n>> Sent: Friday, September 08, 2017 12:00 PM\n>> To: Florian Fainelli\n>> Cc: Tristram Ha - C24268; Andrew Lunn; Pavel Machek; Nathan Conrad; Vivien\n>> Didelot; netdev; linux-kernel@vger.kernel.org; Woojung Huh - C21699\n>> Subject: Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n>> drivers can be added\n>>\n>> 2017-09-08 21:48 GMT+03:00 Florian Fainelli <f.fainelli@gmail.com>:\n>> > On 09/07/2017 02:11 PM, Tristram.Ha@microchip.com wrote:\n>> >> From: Tristram Ha <Tristram.Ha@microchip.com>\n>> >>\n>> >> Add other KSZ switches support so that patch check does not complain.\n>> >>\n>> >> Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com>\n>> >> ---\n>> >>  Documentation/devicetree/bindings/net/dsa/ksz.txt | 117\n>> >> ++++++++++++----------\n>> >>  1 file changed, 62 insertions(+), 55 deletions(-)\n>> >>\n>> >> diff --git a/Documentation/devicetree/bindings/net/dsa/ksz.txt\n>> >> b/Documentation/devicetree/bindings/net/dsa/ksz.txt\n>> >> index 0ab8b39..34af0e0 100644\n>> >> --- a/Documentation/devicetree/bindings/net/dsa/ksz.txt\n>> >> +++ b/Documentation/devicetree/bindings/net/dsa/ksz.txt\n>> >> @@ -3,8 +3,15 @@ Microchip KSZ Series Ethernet switches\n>> >>\n>> >>  Required properties:\n>> >>\n>> >> -- compatible: For external switch chips, compatible string must be\n>> >> exactly one\n>> >> -  of: \"microchip,ksz9477\"\n>> >> +- compatible: Should be \"microchip,ksz9477\" for KSZ9477 chip,\n>> >> +           \"microchip,ksz8795\" for KSZ8795 chip,\n>> >> +           \"microchip,ksz8794\" for KSZ8794 chip,\n>> >> +           \"microchip,ksz8765\" for KSZ8765 chip,\n>> >> +           \"microchip,ksz8895\" for KSZ8895 chip,\n>> >> +           \"microchip,ksz8864\" for KSZ8864 chip,\n>> >> +           \"microchip,ksz8873\" for KSZ8873 chip,\n>> >> +           \"microchip,ksz8863\" for KSZ8863 chip,\n>> >> +           \"microchip,ksz8463\" for KSZ8463 chip\n>> >\n>>\n>>\n>> Tristram, does any of this devices support chaining?\n>>\n>> Maxim.\n>\n> They do not if you mean daisy-chaining the switches together.\n>\n> There is always a problem that once tail tagging mode is enabled\n> sending a frame through the MAC without going through the DSA\n> layer will cause the frame to be dropped.\n>\n\nTistram, as Florian answered before  by \"chaining\"  in my question I\nmeant milti chip DSA.\nI.e. when several chips represent one DSA instance and all interfaces\njoined to  the same bridge.\nBridge code take care about fdb, mdb, vlan configuration for all\nchips. If packet supposed to be\nforward across chips it will not go to cpu, Only cpus related traffic\ngoes to cpu (like broad casts,\nfdb mac entry, unknown packet, stp/BPDU). I.e. milti chip DSA allows\nyou to work with several chips\nas one big virtual chip. How to make it happen depends on hardware\npossibilities.  Might be several\ntail tags, but in that case other chips have to know how to work with\nit. Or smart vlans configuration,\nbut it that case cross chip vlan should not overlap with system vlans.\nIn marvel it's done that each tag\nhas chip id which can be programmed from mdio, and also each chip\nknows how to work with that tag\nand their place in dsa chain - \"up-link\" and \"down-link\". For ksz* I\ndid not find any notes that such configuration\nis supported. How ever it might be doable with some smart software settings.","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"hVmXw6fu\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xrKtw1TF2z9s81\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 11 Sep 2017 17:54:00 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751028AbdIKHxq (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 11 Sep 2017 03:53:46 -0400","from mail-wm0-f65.google.com ([74.125.82.65]:36821 \"EHLO\n\tmail-wm0-f65.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750949AbdIKHxo (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 11 Sep 2017 03:53:44 -0400","by mail-wm0-f65.google.com with SMTP id p17so6192487wmd.3;\n\tMon, 11 Sep 2017 00:53:43 -0700 (PDT)","by 10.80.152.43 with HTTP; Mon, 11 Sep 2017 00:53:42 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=85/bbDN0MR/HAz8jQbDbVOWy6RIqWZAO3SI7tIw8TZY=;\n\tb=hVmXw6fuq+La5TS7VJlsQkNjcx9EwJlg+w3I5gJLzuTeuxRzSqVFeXe0EiUWQCCKR7\n\tfPGFZ+Yv9ElomHcNf2DHrxkMTvbQ10/V0+nuLsFf2WvybBz9Jh18S2fNFibt8nVtZvmz\n\tRmwx4v/CICx64Dntu1nzJAlwMIOU6w6EI/p452QvSNqczfPLaVVIevXp2cW4S0FlIm32\n\t3GvdBfGrrilGikhk9IpQ1Gap7LPse3AWOFgtDWhfQEBVbSrSYEdZlAY37I+0oHTWqz2O\n\tdl3mxEwjfsHqsEv1nISqt+MdFWjjx5aGOj/sJ3MjYNzppxFj0h2dtAOct+jgHEeHf25I\n\tmnsg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=85/bbDN0MR/HAz8jQbDbVOWy6RIqWZAO3SI7tIw8TZY=;\n\tb=SQuGwkgFpjaKzyO1fF6BZZ8RiBRoDbZPvnzvdRxbnScAaqvEszd5F4A1OiaDN4bp0Z\n\t8LLrfQ9VCP8+FIAZkadKBM5HTsjef7aqCU1Q4j5V+Whh9evnPNF4nE5GWqhA8t0lI4AZ\n\t7Typ/LLKI4jXhuCcoebAkAgPo+EfiRikvt1ngs4gQzR6WUDN+CJmHjTwGT80wMz9kAiL\n\tz+jR7HPLXSeJa55thryP6BNqxEnpMJwIKBkne3+KcRCPIU5GSoSxQTnZjLmlfdAkNWGO\n\tMUfg+Z1Nq6l/vcpyDDdToIHUqGTMyv2IHBEsdUu9Y+nv7A4ZHskjOz9i3Wgv3rFwT6pH\n\tuKEw==","X-Gm-Message-State":"AHPjjUjjrMJH4fJkJq1HCyEpeQ5zo1HkwKtgT12Z8yEaFlt6bq98MTIR\n\tlTlExqsas8qE7ZxJSLgUTzSRjDuILQ==","X-Google-Smtp-Source":"ADKCNb5fKADChrnkok+X42VGhDXM8aVeEX8TGk53oxZflnazPwfxR4QNMBedtl9v0GsCgAc0AoseKKM+0hIVfvtXIVc=","X-Received":"by 10.80.179.47 with SMTP id q44mr9079769edd.164.1505116423066; \n\tMon, 11 Sep 2017 00:53:43 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<93AF473E2DA327428DE3D46B72B1E9FD41121EF7@CHN-SV-EXMX02.mchp-main.com>","References":"<93AF473E2DA327428DE3D46B72B1E9FD41121A5B@CHN-SV-EXMX02.mchp-main.com>\n\t<8e4aa981-7f41-047d-2101-370118b4f2c0@gmail.com>\n\t<CAJGZr0Kp5ZKmFJT+KX9jxMVyZT9=VO0_dpZqE+y1TNaYvURcoQ@mail.gmail.com>\n\t<93AF473E2DA327428DE3D46B72B1E9FD41121EF7@CHN-SV-EXMX02.mchp-main.com>","From":"Maxim Uvarov <muvarov@gmail.com>","Date":"Mon, 11 Sep 2017 10:53:42 +0300","Message-ID":"<CAJGZr0+tqucicpX24Ek7fkUkc2ia=+ucPVVPWS1Gbb65uxOJtQ@mail.gmail.com>","Subject":"Re: [PATCH RFC] Update documentation for KSZ DSA drivers so that new\n\tdrivers can be added","To":"Tristram.Ha@microchip.com","Cc":"Andrew Lunn <andrew@lunn.ch>, Pavel Machek <pavel@ucw.cz>,\n\tNathan Conrad <nathan.leigh.conrad@gmail.com>,\n\tVivien Didelot <vivien.didelot@savoirfairelinux.com>,\n\tnetdev <netdev@vger.kernel.org>, linux-kernel@vger.kernel.org,\n\tWoojung.Huh@microchip.com, Florian Fainelli <f.fainelli@gmail.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}}]