lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 16 Feb 2016 21:21:52 +0100
From:	Andrew Lunn <andrew@...n.ch>
To:	Bryan.Whitehead@...rochip.com
Cc:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next,V2] Add LAN9352 Ethernet Driver

So you mean mdiobus_scan()
http://lxr.free-electrons.com/source/drivers/net/phy/mdio_bus.c#L349

actually finds three PHY devices. Two are real phys with magnetics and
somewhere to attach a copper cable, and one is virtual.

This is non-obvious. I think it would be good to add some ASCII art to
the binding documentation to explain what this device looks like, and
which address on the MDIO bus maps to what phy.

There is also the issue of which way around is this phy. Typically in
a DSA setup you have:

      +-----------+       +-----------+
      |           | RGMII |           |
      |           +-------+           +------ 1000baseT MDI ("WAN")
      |           |       |  6-port   +------ 1000baseT MDI ("LAN1")
      |    CPU    |       |  ethernet +------ 1000baseT MDI ("LAN2")
      |           |MIImgmt|  switch   +------ 1000baseT MDI ("LAN3")
      |           +-------+  w/5 PHYs +------ 1000baseT MDI ("LAN4")
      |           |       |           |
      +-----------+       +-----------+

Each MDI port has a phy on it. These are your two real PHYs.

Another possible setup, but not very frequently seen is:

      +-----------+                        +-----------+
      |           | RGMII             RGMII|           |
      |           +-------PHY -- PHY ------+           +------ 1000baseT MDI ("WAN")
      |           |                        |  6-port   +------ 1000baseT MDI ("LAN1")
      |    CPU    |                        |  ethernet +------ 1000baseT MDI ("LAN2")
      |           |    MIImgmt             |  switch   +------ 1000baseT MDI ("LAN3")
      |           +------------------------+  w/5 PHYs +------ 1000baseT MDI ("LAN4")
      |           |                        |           |
      +-----------+                        +-----------+

In this setup, you have a short copper section between the two PHYs
copper ports, and the MAC side is connected to a MAC, be it the CPU
MAC or the switch MAC.

The switch you are talking about only has one of these PHYs. Does it
connect to the CPU MAC or the switch MAC? What use is that? Does the
link status tell you anything? Can it be down? Auto negotiation is
meaningless, since there is no link partner. Can you change the speed
to 10/half? What does ethtool show for this phy?

I think we need to understand this PHY before deciding if we need to
include it in the driver model or not. It is so odd, it might be
better to ignore it.

Thanks
	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ