]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: Allow PHY devices to identify themselves as Ethernet switches, etc.
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 31 Aug 2015 13:56:46 +0000 (15:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 31 Aug 2015 21:48:01 +0000 (14:48 -0700)
commite5e343bcf2df48a7ef4cd7be70313c8c16453ab8
tree0310f837c5e63c9af75e31b0d290d24aa54ee458
parent03dbd1fc1a73dfcd8a0c656ccf916eac4e0f09a2
net: phy: Allow PHY devices to identify themselves as Ethernet switches, etc.

Some Ethernet MAC drivers using the PHY library require the hardcoding
of link parameters when interfaced to a switch device, SFP module,
switch to switch port, etc. This has typically lead to various ad-hoc
implementations looking like this:

- using a "fixed PHY" emulated device, which will provide link
  indication towards the Ethernet MAC driver and hardware

- pretend there is no PHY and hardcode link parameters, ala mv643x_eth

Based on that, it is desireable to have the PHY drivers advertise the
correct link parameters, just like regular Ethernet PHYs towards their
CPU Ethernet MAC drivers, however, Ethernet MAC drivers should be able
to tell whether this link should be monitored or not. In the context
of an Ethernet switch, SFP module, switch to switch link, we do not
need to monitor this link since it should be always up.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/fixed_phy.c
include/linux/phy.h