mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net: dsa: allow for more complex PHY setups
Modify the DSA slave interface to be bound to an arbitray PHY, not just the ones that are available as child PHY devices of the switch MDIO bus. This allows us for instance to have external PHYs connected to a separate MDIO bus, but yet also connected to a given switch port. Under certain configurations, the physical port mask might not be a 1:1 mapping to the MII PHYs mask. This is the case, if e.g: Port 1 of the switch is used and connects to a PHY at a MDIO address different than 1. Introduce a phys_mii_mask variable which allows driver to implement and divert their own MDIO read/writes operations for a subset of the MDIO PHY addresses. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
bd47497a01
commit
0d8bcdd383
4 changed files with 83 additions and 3 deletions
|
@ -144,6 +144,11 @@ dsa_switch_setup(struct dsa_switch_tree *dst, int index,
|
|||
goto out;
|
||||
}
|
||||
|
||||
/* Make the built-in MII bus mask match the number of ports,
|
||||
* switch drivers can override this later
|
||||
*/
|
||||
ds->phys_mii_mask = ds->phys_port_mask;
|
||||
|
||||
/*
|
||||
* If the CPU connects to this switch, set the switch tree
|
||||
* tagging protocol to the preferred tagging format of this
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue