Hello,

On 04/27/2018 11:10 AM, 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?

On system where Device Tree can be used, we expect you to declare all
relevant peripherals in Device Tree and those would include the Ethernet
controller (i210) and the Ethernet switches. An example of this can be
found here:

On x86, there is not an universal use of Device Tree, so we can use
something along these lines to register an Ethernet switch through DSA:

https://github.com/lunn/linux/commit/34055b931848545b6ba11ee50b88e89aeb02c9a5

There might be a way for you to use a conjuction of DMI Match entries to
match your specific board design and based on that run the DSA switch
registration code, indicating the port mapping and the Ethernet
controller to be used as a "master device.
-- 
Florian
  • DSA Dave Richards
    • Re: DSA Florian Fainelli
    • Re: DSA Andrew Lunn

Reply via email to