From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vivien Didelot Subject: Re: [PATCH 0/7] ethtool: add pretty dump for DSA mv88e6xxx drivers Date: Sun, 16 Dec 2018 13:03:09 -0500 Message-ID: <20181216130309.GD2063@slim.localdomain> References: <20181215025035.26977-1-vivien.didelot@gmail.com> <20181215174849.GE5922@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Florian Fainelli , netdev@vger.kernel.org, Chris Healy , "John W . Linville" To: Andrew Lunn Return-path: Received: from mail-qt1-f194.google.com ([209.85.160.194]:38638 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730449AbeLPSDM (ORCPT ); Sun, 16 Dec 2018 13:03:12 -0500 Received: by mail-qt1-f194.google.com with SMTP id p17so11747015qtl.5 for ; Sun, 16 Dec 2018 10:03:11 -0800 (PST) In-Reply-To: <20181215174849.GE5922@lunn.ch> Content-Disposition: inline Sender: netdev-owner@vger.kernel.org List-ID: Hi Andrew, On Sat, 15 Dec 2018 18:48:49 +0100, Andrew Lunn wrote: > > > The first patch adds the base support for "dsa" interfaces. > > > > > > The second patch adds the boilerplate for the "mv88e6xxx" DSA driver, > > > all using 32 registers of 16 bits, the switch ID being available in > > > the port identification register 3. Support for other DSA drivers such > > > as "b53" or "ksz" can be added similarly later. Because the different > > > switches supported by mv88e6xxx have slightly different register layout, > > > we keep it simple and stupid by providing one dump function per switch. > > > > This looks good to me, the only "concern" is that mv88e6xxx set > > regs->version = 0, while we could probably put the switch model in there > > directly which would avoid other drivers to have to put the chip ID in > > regs[3] since that may, or may not be convenient. > > I was wondering about that. Having this all under 'dsa' seems too > granular. It would be better if we could have 'mv88e6xxx', 'b53', > 'ksz', etc. That might need a new DSA driver op to get the driver name > which we then use for the slave? Indeed we could have DSA driver specific names, including or not a prefix such as "dsa-", as in "(dsa-)mv88e6xxx". However I choose not to go that way for the moment since casting the ethtool registers to u16 and checking regs[3] isn't destructive. I felt like changing the "dsa" driver name can be part of a future iteration, but I'd be glad to make the change now if you guys prefer. Thanks, Vivien