Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753572AbdHORee (ORCPT ); Tue, 15 Aug 2017 13:34:34 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34885 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752483AbdHORec (ORCPT ); Tue, 15 Aug 2017 13:34:32 -0400 Subject: Re: [PATCH net-next 06/11] net: dsa: debugfs: add port registers To: Vivien Didelot , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Andrew Lunn , Egil Hjelmeland , John Crispin , Woojung Huh , Sean Wang , Volodymyr Bendiuga , Nikita Yushchenko , Maxime Hadjinlian , Chris Healy , Maxim Uvarov , Stefan Eichenberger , Jason Cobham , Juergen Borleis , Tobias Waldekranz References: <20170814222242.10643-1-vivien.didelot@savoirfairelinux.com> <20170814222242.10643-7-vivien.didelot@savoirfairelinux.com> From: Florian Fainelli Message-ID: <41bdddf4-1f2a-82fb-4178-262660e3a781@gmail.com> Date: Tue, 15 Aug 2017 10:34:29 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170814222242.10643-7-vivien.didelot@savoirfairelinux.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1516 Lines: 51 On 08/14/2017 03:22 PM, Vivien Didelot wrote: > Add a debug filesystem "regs" entry to query a port's hardware registers > through the .get_regs_len and .get_regs_len switch operations. > > This is very convenient because it allows one to dump the registers of > DSA links, which are not exposed to userspace. > > Here are the registers of a zii-rev-b CPU and DSA ports: > > # pr -mt switch0/port{5,6}/regs > 0: 4e07 0: 4d04 > 1: 403e 1: 003d > 2: 0000 2: 0000 > 3: 3521 3: 3521 > 4: 0533 4: 373f > 5: 8000 5: 0000 > 6: 005f 6: 003f > 7: 002a 7: 002a > 8: 2080 8: 2080 > 9: 0001 9: 0001 > 10: 0000 10: 0000 > 11: 0020 11: 0000 > 12: 0000 12: 0000 > 13: 0000 13: 0000 > 14: 0000 14: 0000 > 15: 9100 15: dada > 16: 0000 16: 0000 > 17: 0000 17: 0000 > 18: 0000 18: 0000 > 19: 0000 19: 00d8 > 20: 0000 20: 0000 > 21: 0000 21: 0000 > 22: 0022 22: 0000 > 23: 0000 23: 0000 > 24: 3210 24: 3210 > 25: 7654 25: 7654 > 26: 0000 26: 0000 > 27: 8000 27: 8000 > 28: 0000 28: 0000 > 29: 0000 29: 0000 > 30: 0000 30: 0000 > 31: 0000 31: 0000 > > Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli -- Florian