Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1712372
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Florian Fainelli <f.fainelli@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net-next 02/11] net: dsa: add debugfs interface |
| Date | Tue, 15 Aug 2017 19:30:02 +0200 |
| Message-ID | <ueNPc-4e6-23@gated-at.bofh.it> (permalink) |
| References | <uew1Y-1pG-9@gated-at.bofh.it> <uewbD-1sJ-19@gated-at.bofh.it> |
| X-Original-To | Vivien Didelot <vivien.didelot@savoirfairelinux.com>, netdev@vger.kernel.org |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/uUByIJNUV8aI8daLE73opTMJSREC8GTpitXBxDNDH8=; b=gUaWH0zhcQEjkKz+l1S3gcPrsV520qLnQHYlT0d8XmSi0xZATBO0WKCUTHEmQZIFY7 KrmSih41A0urWUvwefYQVGVj4ibkdm1s9JOyGmLjpis5tLhpuL14GGqUTqQ5YCEq6K+o laGwMSTzhaXQETGcD+Xwp1xv7ARUvNF60IdJvp3G+EUedNoJLPPi2V+d48nnEiZmatkD zgzDf0rE3iMscj7jQkALLyr8sq5dZupHw1zHUkC9+PS42yh1KvmgvBWAO57YGOiRf8XG vOc7pdw8Rp4sj0m12UtZVPWF5YEr89urpi1nqFVkXPobQGloBGQasSxZfEc1nVftDs9U IM4Q== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/uUByIJNUV8aI8daLE73opTMJSREC8GTpitXBxDNDH8=; b=it8EFkQMC7bS0rx2f5ypX6Zs68Ab9GVRkCz2ARgr6g4ye98rTSb53YAt9j+Q5GQi7s 8brJDPerbJJNW2VQ0w2PjN2XWb35Z/Sb6x5onbs9mhOCewZlCy6qBGYTjpqohqvatFLn j5W9s9L9VGTVC6Euf6dwUf53cS4/Kf0Hv7VJJ1e2A+GDvFVhsb9Y89MN/fmFjqarlh5P qcaaFG56KKizTuS8njLpL+dzaFz6Oq7b1WKhNi3nFurpiyfRmHzjGRrxvvSuDD5ekuZx XYvNLXJZVNr51FvskQdM/dbtPdL37ufeypLOP/XbYqyyVN75UvoQHY67kAqPvE5jFUyC rIow== |
| X-Gm-Message-State | AHYfb5i48rYyPUhinbSXlMvrl/kqcMLtb5CpwJldQnEc+khMGFXmFjSG ysHmLSTPe/m9Jw== |
| X-Received | by 10.84.232.78 with SMTP id f14mr31144865pln.87.1502818146517; Tue, 15 Aug 2017 10:29:06 -0700 (PDT) |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252 |
| Content-Language | en-US |
| Content-Transfer-Encoding | 7bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 53 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" <davem@davemloft.net>, Andrew Lunn <andrew@lunn.ch>, Egil Hjelmeland <privat@egil-hjelmeland.no>, John Crispin <john@phrozen.org>, Woojung Huh <Woojung.Huh@microchip.com>, Sean Wang <sean.wang@mediatek.com>, Volodymyr Bendiuga <volodymyr.bendiuga@gmail.com>, Nikita Yushchenko <nikita.yoush@cogentembedded.com>, Maxime Hadjinlian <maxime@devialet.com>, Chris Healy <cphealy@gmail.com>, Maxim Uvarov <muvarov@gmail.com>, Stefan Eichenberger <eichest@gmail.com>, Jason Cobham <jcobham@questertangent.com>, Juergen Borleis <jbe@pengutronix.de>, Tobias Waldekranz <tobias@waldekranz.com> |
| X-Original-Date | Tue, 15 Aug 2017 10:29:04 -0700 |
| X-Original-Message-ID | <2c13f5a3-0cc6-fe1a-86fc-c5bfd8cc2263@gmail.com> |
| X-Original-References | <20170814222242.10643-1-vivien.didelot@savoirfairelinux.com> <20170814222242.10643-3-vivien.didelot@savoirfairelinux.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1712372 |
Show key headers only | View raw
On 08/14/2017 03:22 PM, Vivien Didelot wrote:
> This commit adds a DEBUG_FS dependent DSA core file creating a generic
> debug filesystem interface for the DSA switch devices.
>
> The interface can be mounted with:
>
> # mount -t debugfs none /sys/kernel/debug
>
> The dsa directory contains one directory per switch chip:
>
> # cd /sys/kernel/debug/dsa/
> # ls
> switch0 switch1 switch2
>
> Each chip directory contains one directory per port:
>
> # ls -l switch0/
> drwxr-xr-x 2 root root 0 Jan 1 00:00 port0
> drwxr-xr-x 2 root root 0 Jan 1 00:00 port1
> drwxr-xr-x 2 root root 0 Jan 1 00:00 port2
> drwxr-xr-x 2 root root 0 Jan 1 00:00 port5
> drwxr-xr-x 2 root root 0 Jan 1 00:00 port6
>
> Future patches will add entry files to these directories.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
> +static int dsa_debugfs_create_switch(struct dsa_switch *ds)
> +{
> + char name[32];
> + int i;
> +
> + /* skip if there is no debugfs support */
> + if (!dsa_debugfs_dir)
> + return 0;
> +
> + snprintf(name, sizeof(name), DSA_SWITCH_FMT, ds->index);
> +
> + ds->debugfs_dir = debugfs_create_dir(name, dsa_debugfs_dir);
> + if (IS_ERR_OR_NULL(ds->debugfs_dir))
> + return -EFAULT;
> +
> + for (i = 0; i < ds->num_ports; i++) {
> + if (!ds->ports[i].dn)
> + continue;
This won't create port directories when using platform data, can you
check for BIT(i) & ds->enabled_port_mask instead?
--
Florian
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next 00/11] net: dsa: add generic debugfs interface Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-08-15 00:30 +0200
[PATCH net-next 09/11] net: dsa: debugfs: add port mdb Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-08-15 00:30 +0200
Re: [PATCH net-next 09/11] net: dsa: debugfs: add port mdb Andrew Lunn <andrew@lunn.ch> - 2017-08-15 01:00 +0200
Re: [PATCH net-next 09/11] net: dsa: debugfs: add port mdb Florian Fainelli <f.fainelli@gmail.com> - 2017-08-15 19:40 +0200
[PATCH net-next 01/11] net: dsa: legacy: assign dst->applied Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-08-15 00:30 +0200
Re: [PATCH net-next 01/11] net: dsa: legacy: assign dst->applied Andrew Lunn <andrew@lunn.ch> - 2017-08-15 01:00 +0200
[PATCH net-next 08/11] net: dsa: restore mdb dump Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-08-15 00:30 +0200
Re: [PATCH net-next 08/11] net: dsa: restore mdb dump Andrew Lunn <andrew@lunn.ch> - 2017-08-15 00:50 +0200
Re: [PATCH net-next 08/11] net: dsa: restore mdb dump Florian Fainelli <f.fainelli@gmail.com> - 2017-08-15 19:40 +0200
[PATCH net-next 07/11] net: dsa: debugfs: add port fdb Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-08-15 00:40 +0200
Re: [PATCH net-next 07/11] net: dsa: debugfs: add port fdb Andrew Lunn <andrew@lunn.ch> - 2017-08-15 00:50 +0200
Re: [PATCH net-next 07/11] net: dsa: debugfs: add port fdb Florian Fainelli <f.fainelli@gmail.com> - 2017-08-15 19:40 +0200
[PATCH net-next 06/11] net: dsa: debugfs: add port registers Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-08-15 00:40 +0200
Re: [PATCH net-next 06/11] net: dsa: debugfs: add port registers Andrew Lunn <andrew@lunn.ch> - 2017-08-15 00:50 +0200
RE: [PATCH net-next 06/11] net: dsa: debugfs: add port registers <Woojung.Huh@microchip.com> - 2017-08-15 18:30 +0200
Re: [PATCH net-next 06/11] net: dsa: debugfs: add port registers Florian Fainelli <f.fainelli@gmail.com> - 2017-08-15 19:40 +0200
[PATCH net-next 05/11] net: dsa: debugfs: add port stats Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-08-15 00:40 +0200
Re: [PATCH net-next 05/11] net: dsa: debugfs: add port stats Andrew Lunn <andrew@lunn.ch> - 2017-08-15 00:50 +0200
Re: [PATCH net-next 05/11] net: dsa: debugfs: add port stats Florian Fainelli <f.fainelli@gmail.com> - 2017-08-15 19:40 +0200
[PATCH net-next 02/11] net: dsa: add debugfs interface Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-08-15 00:40 +0200
Re: [PATCH net-next 02/11] net: dsa: add debugfs interface Florian Fainelli <f.fainelli@gmail.com> - 2017-08-15 19:30 +0200
Re: [PATCH net-next 00/11] net: dsa: add generic debugfs interface Florian Fainelli <f.fainelli@gmail.com> - 2017-08-19 00:00 +0200
csiph-web