From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: DSA Date: Mon, 30 Apr 2018 14:50:30 +0200 Message-ID: <20180430125030.GB10066@lunn.ch> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "netdev@vger.kernel.org" To: Dave Richards Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:44907 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752187AbeD3Mud (ORCPT ); Mon, 30 Apr 2018 08:50:33 -0400 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Apr 27, 2018 at 06:10:55PM +0000, Dave Richards wrote: > Hello, > > I am building a prototype for a new product based on a Lanner, Inc. embedded PC. It is an Intel Celeron-based system with two host I210 GbE chips connected to 2 MV88E6172 chips (one NIC to one switch). Everything appears to show up hardware-wise. My question is, what is the next step? How does DSA know which NICs are intended to be masters? Is this supposed to be auto-detected or is this knowledge supposed to be communicated explicitly. Reading through the DSA driver code I see that there is a check of the OF property list for the device for a "label"/"cpu" property/value pair that needs to be present. Who sets this and when? Hi Dave Since you are on Intel, you don't have simple access to Device tree. So you need to use platform data instead. Or possibly start hacking on ACPI support for DSA. For the moment, i would suggest platform data. I'm also working on a similar setup, intel CPU connected to an MV88E6532. I have some work in progress code i can share with you, which i want to submit for inclusion to mainline in the next few weeks. This adds platform data support to the mv88e6xxx driver, and will give you an idea how you link the MAC to the switch. What MDIO bus do you connect the switches to? The i210 MDIO bus? If so, this is going to cause you a problem. The igb driver ignores the Linux MDIO and PHY code, and does it all itself. DSA assumes the switch can be accessed using Linux standard MDIO interfaces. So you have going to have to hack on the igb driver to make it use standard MDIO. Andrew