> On Tue, Jan 29, 2008 at 03:20:20PM +0100, Christoph Raisch wrote:> What is it? It has to live on some kind of bus, right?

It is a piece of hardware with a firmware/hypervisor abstraction layer ontop.The hypervisor provides virtualization interfaces toadd and remove ethernet adapters and ports.Each port is represented in the open firmware device tree (OFDT) as asubnode of theehea adapter node.

System P has a userspace DLPAR application communicating with firmware, thekernel, andthe hardware management console to change all that on the flight.This tool needs a capability to identify which open firmware device treeentrybelongs to which ethernet device.Each node created by the ibmebus driver has a devspec entry associated tothedevice node in OFDT, used by the DLPAR application.Each port created by the ibmebus driver has a devspec entry associated totheport node in OFDT, used by the DLPAR application.

> >> > These pci functions corresponds to a> > /sys/bus/ibmebus/devices/789D.001.XXXXXX-P1/port0> > and> > /sys/bus/ibmebus/devices/789D.001.XXXXXX-P1/port1> >> > The busdriver currently does not find out, how many ports are in a> > /sys/bus/ibmebus/devices/789D.001.XXXXXX-P1.> > This is up to the hardware specific driver responsible for ehea orehca.> > Think of a PCI card where the PCI busdriver> > can not determine how many ports are implemented on the card.> >> > How should this be mapped to /sys ?> >> > Should we try to "flatten" the ports to something like> > /sys/bus/ibmebus/devices/789D.001.XXXXXX-P1> > /sys/bus/ibmebus/devices/789D.001.XXXXXX-P1_port0> > /sys/bus/ibmebus/devices/789D.001.XXXXXX-P1_port1> > ...which means physical hierarchy information would look a bit strange,> > but could be the simpler one.>> No. Why have a separate "port" device for every ethernet port? What> keeps you from just creating the different network devices for your> device, and pointing the parent to the same 789D.001.XXXXXX-P1 device?>>> I think you all are trying to make this more complex than it really is> :)

If you register multiple netdevs in a ehea adapter node,how is it possible to find out which ethXXX belongs to which devspec portentry in the OFDT?