]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: fully divert PHY reads/writes if requested
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 10 Mar 2015 23:57:13 +0000 (16:57 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Mar 2015 21:56:29 +0000 (17:56 -0400)
commit9ce60462da2f3b4d434d66f8dbe31860cb324aca
tree8a95d055d050729f032427f458d6c9a7ef7eef08
parentbd35bf511b26ee3f1d6082507bfca92f95558c02
net: dsa: fully divert PHY reads/writes if requested

In case a PHY is found via Device Tree, and is also flagged by the
switch driver as needing indirect reads/writes using the switch driver
implemented MDIO bus, make sure that we bind this PHY to the slave MII
bus in order for this to happen.

Without this, we would succeed in having the PHY driver probe()'s
function to use slave MII bus read/write functions, because this is done
during dsa_slave_mii_init(), but past that point, the PHY driver would
not go through these diverted reads and writes.

Fixes: c53897ae9d5a2 ("net: dsa: allow for more complex PHY setups")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c