Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3641864pxy; Tue, 4 May 2021 06:56:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIf2S0z/3OYVIjzgMiLuIOKmRdr/fo4eM5/Z+feFAiJ+GgclBZJ9RXkc55q6TKFbz4QCok X-Received: by 2002:a17:90a:f3d3:: with SMTP id ha19mr27802361pjb.166.1620136590317; Tue, 04 May 2021 06:56:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620136590; cv=none; d=google.com; s=arc-20160816; b=tOAtkaZjqTWqaqaiRj7iC5x3KwxeoFm2L5ecj9C2kReKVq4/NBhatGhiLpgD3V4CTp hHCXPFIZ2Vux6mUsH5TFfyhhRJ1CQnz0bKAgiPn1K7xi1bK6h2Cp/mi2GhYvp8VAVDVQ 2dEvO0B5LjhGaf+iGwNG3lF9gS9nBM3uatFHY4orSp0EK/oR2BXRdOOcQkASUjB5n/g7 5zRcqx71B1OvYXE9ab7SaizFOusP0pHs5AUMqX+J6/1oz+wkcIFmBUc9VLqMsRTSpwwR 1KEyBUk98ioSMyvY3OI38kF/O/k6Ghyb56yJxBPIYFHilNisYjYSfO+oHU/gP9LeUzv/ 2l4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=lBffoC4YyZOFql9MsTQq4zu9P6YxDl5MOjs5Fxg9M58=; b=RLaznSeNpsDHRSsmEtsiYCiJqUbbsbFKeCOIMcxl1oG2PUCRpKYQBocQZrgl8cc4t/ 6RThBILTF5QbQ0yaU+bmh+poF+SbkxkCDig4p3tkes7BF9VN2u9x9MQ+AUr8ID0x5a3l /wLpMP9zO7Kvzpw5AAAywQrmDEWkVFR55uOJ7xW+WxmLz4KiAt4aNl40xukRer8jXbsL veQ+Da3Q6sDFFYfXA302+Eq5aRu47vXSCW0VibB5HbYkH18Wkd8GLhvy07yVdXMwK61H lxX0vn7gkXeeGxDK9z7Cl62nA1TLgG927uzfM6Z8MGDlS9EZEPi1pTycjHNCM4suDDQq AjgA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p9si3542158plq.22.2021.05.04.06.56.15; Tue, 04 May 2021 06:56:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231364AbhEDN42 (ORCPT + 99 others); Tue, 4 May 2021 09:56:28 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:51499 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231216AbhEDN41 (ORCPT ); Tue, 4 May 2021 09:56:27 -0400 X-Originating-IP: 90.65.108.55 Received: from localhost (lfbn-lyo-1-1676-55.w90-65.abo.wanadoo.fr [90.65.108.55]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 9FD541BF20B; Tue, 4 May 2021 13:55:27 +0000 (UTC) Date: Tue, 4 May 2021 15:55:27 +0200 From: Alexandre Belloni To: Vladimir Oltean Cc: Andrew Lunn , Colin Foster , Rob Herring , Claudiu Manoil , "supporter:OCELOT ETHERNET SWITCH DRIVER" , Vivien Didelot , Florian Fainelli , "David S. Miller" , Jakub Kicinski , Russell King , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list , "open list:OCELOT ETHERNET SWITCH DRIVER" Subject: Re: [RFC PATCH vN net-next 2/2] net: mscc: ocelot: add support for VSC75XX SPI control Message-ID: References: <20210504051130.1207550-1-colin.foster@in-advantage.com> <20210504051130.1207550-2-colin.foster@in-advantage.com> <20210504125942.nx5b6j2cy34qyyhm@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210504125942.nx5b6j2cy34qyyhm@skbuf> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/05/2021 12:59:43+0000, Vladimir Oltean wrote: > > > +static void vsc7512_phylink_validate(struct ocelot *ocelot, int port, > > > + unsigned long *supported, > > > + struct phylink_link_state *state) > > > +{ > > > + struct ocelot_port *ocelot_port = ocelot->ports[port]; > > > + __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { > > > + 0, > > > + }; > > > > This function seems out of place. Why would SPI access change what the > > ports are capable of doing? Please split this up into more > > patches. Keep the focus of this patch as being adding SPI support. > > What is going on is that this is just the way in which the drivers are > structured. Colin is not really "adding SPI support" to any of the > existing DSA switches that are supported (VSC9953, VSC9959) as much as > "adding support for a new switch which happens to be controlled over > SPI" (VSC7512). Note that this should not only be about vsc7512 as the whole ocelot family (vsc7511, vsc7512, vsc7513 and vsc7514) can be connected over spi. Also, they can all be used in a DSA configuration, over PCIe, just like Felix. > The layering is as follows: > - drivers/net/dsa/ocelot/felix_vsc7512_spi.c: deals with the most > hardware specific SoC support. The regmap is defined here, so are the > port capabilities. > - drivers/net/dsa/ocelot/felix.c: common integration with DSA > - drivers/net/ethernet/mscc/ocelot*.c: the SoC-independent hardware > support. > > I'm not actually sure that splitting the port PHY mode support in a > separate patch is possible while keeping functional intermediate > results. But I do agree about the rest, splitting the device tree > changes, etc. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com