Message ID | 20191219123537.28598-1-alexandru.marginean@nxp.com |
---|---|
State | Accepted |
Commit | 1785d8c3a5f396f7f81f029d8828908229bff87e |
Delegated to: | Joe Hershberger |
Headers | show |
Series | drivers: net: bcm-sf2: pass -1 to phy_connect() | expand |
On Thu, Dec 19, 2019 at 6:36 AM Alex Marginean <alexandru.marginean@nxp.com> wrote: > > Passing 0 to PHY connect used to trigger a MDIO scan due to a bug fixed in > the meantime. It's unclear if bcm-sf2 wants to connect to PHY @ addr 0 or > is scanning the bus, passing -1 here should keep it functional either way. > > Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com> > Cc: Jiandong Zheng <jdzheng@broadcom.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
On Thu, Dec 19, 2019 at 4:36 AM Alex Marginean <alexandru.marginean@nxp.com> wrote: > > Passing 0 to PHY connect used to trigger a MDIO scan due to a bug fixed in > the meantime. It's unclear if bcm-sf2 wants to connect to PHY @ addr 0 or > is scanning the bus, passing -1 here should keep it functional either way. > > Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com> > Cc: Jiandong Zheng <jdzheng@broadcom.com> Acked-by: Jiandong Zheng <jdzheng@broadcom.com>
diff --git a/drivers/net/bcm-sf2-eth.c b/drivers/net/bcm-sf2-eth.c index 615037f1a3..11f937032f 100644 --- a/drivers/net/bcm-sf2-eth.c +++ b/drivers/net/bcm-sf2-eth.c @@ -50,7 +50,7 @@ static int bcm_sf2_eth_init(struct eth_device *dev) eth->port_num = 0; debug("Connecting PHY 0...\n"); phydev = phy_connect(miiphy_get_dev_by_name(dev->name), - 0, dev, eth->phy_interface); + -1, dev, eth->phy_interface); if (phydev != NULL) { eth->port[0] = phydev; eth->port_num += 1;
Passing 0 to PHY connect used to trigger a MDIO scan due to a bug fixed in the meantime. It's unclear if bcm-sf2 wants to connect to PHY @ addr 0 or is scanning the bus, passing -1 here should keep it functional either way. Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com> Cc: Jiandong Zheng <jdzheng@broadcom.com> --- drivers/net/bcm-sf2-eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)