Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
This commit is contained in:
@@ -118,8 +118,10 @@ static int sun4i_mdio_probe(struct platform_device *pdev)
|
||||
|
||||
data->regulator = devm_regulator_get(&pdev->dev, "phy");
|
||||
if (IS_ERR(data->regulator)) {
|
||||
if (PTR_ERR(data->regulator) == -EPROBE_DEFER)
|
||||
return -EPROBE_DEFER;
|
||||
if (PTR_ERR(data->regulator) == -EPROBE_DEFER) {
|
||||
ret = -EPROBE_DEFER;
|
||||
goto err_out_free_mdiobus;
|
||||
}
|
||||
|
||||
dev_info(&pdev->dev, "no regulator found\n");
|
||||
data->regulator = NULL;
|
||||
|
@@ -1525,6 +1525,7 @@ int phylink_mii_ioctl(struct phylink *pl, struct ifreq *ifr, int cmd)
|
||||
switch (cmd) {
|
||||
case SIOCGMIIPHY:
|
||||
mii->phy_id = pl->phydev->mdio.addr;
|
||||
/* fall through */
|
||||
|
||||
case SIOCGMIIREG:
|
||||
ret = phylink_phy_read(pl, mii->phy_id, mii->reg_num);
|
||||
@@ -1547,6 +1548,7 @@ int phylink_mii_ioctl(struct phylink *pl, struct ifreq *ifr, int cmd)
|
||||
switch (cmd) {
|
||||
case SIOCGMIIPHY:
|
||||
mii->phy_id = 0;
|
||||
/* fall through */
|
||||
|
||||
case SIOCGMIIREG:
|
||||
ret = phylink_mii_read(pl, mii->phy_id, mii->reg_num);
|
||||
@@ -1659,9 +1661,8 @@ static void phylink_sfp_link_down(void *upstream)
|
||||
ASSERT_RTNL();
|
||||
|
||||
set_bit(PHYLINK_DISABLE_LINK, &pl->phylink_disable_state);
|
||||
queue_work(system_power_efficient_wq, &pl->resolve);
|
||||
flush_work(&pl->resolve);
|
||||
|
||||
netif_carrier_off(pl->netdev);
|
||||
}
|
||||
|
||||
static void phylink_sfp_link_up(void *upstream)
|
||||
|
@@ -489,7 +489,8 @@ EXPORT_SYMBOL_GPL(sfp_register_upstream);
|
||||
void sfp_unregister_upstream(struct sfp_bus *bus)
|
||||
{
|
||||
rtnl_lock();
|
||||
sfp_unregister_bus(bus);
|
||||
if (bus->sfp)
|
||||
sfp_unregister_bus(bus);
|
||||
bus->upstream = NULL;
|
||||
bus->netdev = NULL;
|
||||
rtnl_unlock();
|
||||
@@ -592,7 +593,8 @@ EXPORT_SYMBOL_GPL(sfp_register_socket);
|
||||
void sfp_unregister_socket(struct sfp_bus *bus)
|
||||
{
|
||||
rtnl_lock();
|
||||
sfp_unregister_bus(bus);
|
||||
if (bus->netdev)
|
||||
sfp_unregister_bus(bus);
|
||||
bus->sfp_dev = NULL;
|
||||
bus->sfp = NULL;
|
||||
bus->socket_ops = NULL;
|
||||
|
Reference in New Issue
Block a user