From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751200AbcFRUgn (ORCPT ); Sat, 18 Jun 2016 16:36:43 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:51931 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751030AbcFRUgm (ORCPT ); Sat, 18 Jun 2016 16:36:42 -0400 Date: Sat, 18 Jun 2016 22:36:39 +0200 From: Andrew Lunn To: Vivien Didelot Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Florian Fainelli , Ben Dooks , Sergei Shtylyov Subject: Re: [PATCH v3 net-next v3 13/14] net: dsa: mv88e6xxx: add addressing mode to info Message-ID: <20160618203639.GH7172@lunn.ch> References: <20160618000736.5598-1-vivien.didelot@savoirfairelinux.com> <20160618000736.5598-14-vivien.didelot@savoirfairelinux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160618000736.5598-14-vivien.didelot@savoirfairelinux.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +struct mv88e6xxx_smi_ops { > + int (*read)(struct mii_bus *bus, int sw_addr, > + int addr, int reg, u16 *val); > + int (*write)(struct mii_bus *bus, int sw_addr, > + int addr, int reg, u16 val); > +}; Hi Vivien I still think this API should be based on ps. With the way you have restructured probe, this now also works, there is no longer a read without PS in order to get the device ID. Also, think about the case of reading/writing registers via Ethernet frames. Such functions would need ps, bus and sw_addr is not useful. Andrew