Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5027254yba; Wed, 8 May 2019 06:51:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+X6mH/a+k4GybUR4p/LMZo9qjPnIujFaeBhq3IuIAAiGAP4Em96GCcLb5JoL1QGNew89x X-Received: by 2002:a62:1897:: with SMTP id 145mr49407665pfy.122.1557323485337; Wed, 08 May 2019 06:51:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557323485; cv=none; d=google.com; s=arc-20160816; b=q3r/tRBp4uJtmknDpDh99TVaY35PBcK8enWWXKBSsaWu3/4i/tGHMXAKAd7b5Fzl9j jSEjqDfuL7mzm6wMPKhliIH7PXNqLrWWpSdhHAcD5tnXNlXQRHZd+owX/zlM60QkDnPh Nc8mYyK6bPAQDxNtWDHBb3yur61d9+R83qGqR8H5AsI7dBmFyZ7992CE9x+LoB09shFI Oqr/fIRrE40VvvIJzGoMe/eDApDB6j0rV7FrX991fKVHEM3v8hzOg+Y1/Rano1WHJ1ep Q2o3fZi+MQBxO173YcbjS3Yz+HXc0nmqJOPSIeXzGIlMZstV7TGKKxpeBJehj+FEXDcn l/Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-disposition:mime-version:references:in-reply-to:subject:cc :to:from:message-id:date:dkim-signature; bh=nA3fMKI7/zgpn3qz32bnSjcksgNREGdaMYOqVHhhKG4=; b=RDe565WfeSk7X8kVFyvIlT0xtZPySLEkSDTOQXIf3HOHS19b3MMbVgp3M9EF6JpgTg OvvkD9Mk/d2lapMukFv6dzWGK6jxBjhtwBWLRX/3Y3OYMKEYrZOllOj/4KEIFSM8Dpc9 Ztpn1EScoU6wsgN2U5fbMRBTHm5d04ToDavJ6eMKTNOWsidTNLvM2bZgy26U7I3OYlnN y5+fR0r1C6sWWMceT5Q3Qwz0/Tab1P8n8h+h2subIxsvIIpn/iPsOAnxjF7iFpXblU7B M5lA9hhkRqBM1VgYhn55zb/gzo8hLt6xystjuuxPu8nruHYqVQyj0g4uDE+9+4w2VWh7 wGmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YU4SsjMp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z22si19912575plo.171.2019.05.08.06.51.09; Wed, 08 May 2019 06:51:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YU4SsjMp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727679AbfEHNlf (ORCPT + 99 others); Wed, 8 May 2019 09:41:35 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:39230 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727584AbfEHNlf (ORCPT ); Wed, 8 May 2019 09:41:35 -0400 Received: by mail-qt1-f195.google.com with SMTP id y42so3734856qtk.6; Wed, 08 May 2019 06:41:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:from:to:cc:subject:in-reply-to:references :mime-version:content-disposition:content-transfer-encoding; bh=nA3fMKI7/zgpn3qz32bnSjcksgNREGdaMYOqVHhhKG4=; b=YU4SsjMpd3rSp33BZthenhW2wDRXloytJNFxp05+2bKdndmcTMnLG6QtbQ5D0Z7f/r 48lDisJkSAS2tpi9+BQf2REx3YnR7qhFd0fvzjAvpLzJg2NDFi3OcftsJHpTtgZdlH1i hDqRI77b2fbNhuoVuOxq2VIsaycFYdee6l5EzrpBMxiVVXe5lwxbsjqIvg3IHhT2JXPb kIADBtidxF2+xPEF4w1UmwFFsqXpcd9Kdl8SOFfJ+doOmoxGSoaIMbwrjDeVJK/qPaIV reqg7pJJKKTMurMNXe759sPX1Yrwd3bbzfkG/tIPs4t56vye7jkztdpUI5Lk7SU+Yxoz S2mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:from:to:cc:subject:in-reply-to :references:mime-version:content-disposition :content-transfer-encoding; bh=nA3fMKI7/zgpn3qz32bnSjcksgNREGdaMYOqVHhhKG4=; b=V6u636sw6kZX6/k8mCCYZMRWBLR+1YmluBtitk/47zAZuN/TBrNpv4pXUI8d7HTCwT /tlzii43Ym6dkYtdF5S0IT8acdcW9HTA7V3rQlm9Yulc5NPzoKYO2PRkOJ5z50OKgkq8 IJLLXq5Y+bdl/ywENfGRg5L12pI8a7/ByrnzhWacgvUcYBJj+GWFsRCXDMgAgmZyGtPC RkBxOodERpsR3uw7p87syVbqgNeye42ulUM65ZJlG1op6BdbBi2eRXl98LOri0YtArQw U+/4MOa5lXQEG40bNjmlYmFUQMZwSX+11wzPofHNRDm5ebnlLXDY5wwnjjhzc6bbf5Ns Hpag== X-Gm-Message-State: APjAAAVeQieEStfqzS63/e5WDbduOleP6bmRDX+SXtKamCKGdb2CqT9A o74sQM+5hIBJqZUyWW3rHdY= X-Received: by 2002:ac8:18e6:: with SMTP id o35mr32513150qtk.77.1557322894405; Wed, 08 May 2019 06:41:34 -0700 (PDT) Received: from localhost (modemcable249.105-163-184.mc.videotron.ca. [184.163.105.249]) by smtp.gmail.com with ESMTPSA id b187sm10535817qkd.73.2019.05.08.06.41.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 May 2019 06:41:33 -0700 (PDT) Date: Wed, 8 May 2019 09:41:32 -0400 Message-ID: <20190508094132.GB13389@t480s.localdomain> From: Vivien Didelot To: Andrew Lunn Cc: Rasmus Villemoes , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "David S. Miller" , Florian Fainelli Subject: Re: [RFC PATCH 1/5] net: dsa: mv88e6xxx: introduce support for two chips using direct smi addressing In-Reply-To: <20190508114715.GB30557@lunn.ch> References: <20190501193126.19196-1-rasmus.villemoes@prevas.dk> <20190501193126.19196-2-rasmus.villemoes@prevas.dk> <20190501201919.GC19809@lunn.ch> <20190508114715.GB30557@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rasmus, On Wed, 8 May 2019 13:47:15 +0200, Andrew Lunn wrote: > > > > > > This works, but i think i prefer adding mv88e6xxx_smi_dual_chip_write, > > > mv88e6xxx_smi_dual_chip_read, and create a > > > mv88e6xxx_smi_single_chip_ops. > > > > Now that Vivien's "net: dsa: mv88e6xxx: refine SMI support" is in > > master, do you still prefer introducing a third bus_ops structure > > (mv88e6xxx_smi_dual_direct_ops ?), or would the approach of adding > > chip->sw_addr in the smi_direct_{read/write} functions be ok (which > > would then require changing the indirect callers to pass 0 instead of > > chip->swaddr). > > I would still prefer a new bus_ops. Even though those are direct read and write operations, having 3 mv88e6xxx_bus_ops structures will make it clear that there are 3 ways for accessible the internal switch registers through SMI, depending on the Marvell chip model. So I would prefer a third ops as well. Thanks, Vivien