title: How to connect an ethernet device directly to a switch in linux?
body: <p>We have an embedded board where the ethernet device is directly connected to a switch without a phy in between. To make things more complicated the ethernet device's mdio bus is connected to the switch's mdio for control.</p>
  
  <p>I have managed to use the fixed mdio/phy driver to enable ethernet and that works by matching the switch's default configuration to the fixed phy's.</p>
  
  <p>How do I now connect to the mdio bus to change the switch settings?
  Since the ethernet device's attached phy is filled by the fixed phy how do I now attach the real mdio bus to the system so I can configure it.
  There seems to be no direct userspace interface to an mdio bus. Do I create a fake ethernet device whose only purpose is to access the mdio bus or do I somehow attach it to the ethernet device which will then have two mdio busses attached?</p>
  
  <p>PS:
  It seems like the physical mdio bus driver finds the switch but how do I talk to it?</p>