aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phylink.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-05-31 10:49:43 -0700
committerDavid S. Miller <davem@davemloft.net>2019-05-31 10:49:43 -0700
commitb4b12b0d2f02613101a7a667ef7b7cc8d388e597 (patch)
treeae2d52198929797821961fd0b5923b5ea1a89fe1 /drivers/net/phy/phylink.c
parentnetfilter: nf_conntrack_bridge: fix CONFIG_IPV6=y (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff)
downloadlinux-dev-b4b12b0d2f02613101a7a667ef7b7cc8d388e597.tar.xz
linux-dev-b4b12b0d2f02613101a7a667ef7b7cc8d388e597.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
The phylink conflict was between a bug fix by Russell King to make sure we have a consistent PHY interface mode, and a change in net-next to pull some code in phylink_resolve() into the helper functions phylink_mac_link_{up,down}() On the dp83867 side it's mostly overlapping changes, with the 'net' side removing a condition that was supposed to trigger for RGMII but because of how it was coded never actually could trigger. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phylink.c')
-rw-r--r--drivers/net/phy/phylink.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 68d0a89c52be..b7300ea2663c 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -54,6 +54,10 @@ struct phylink {
/* The link configuration settings */
struct phylink_link_state link_config;
+
+ /* The current settings */
+ phy_interface_t cur_interface;
+
struct gpio_desc *link_gpio;
struct timer_list link_poll;
void (*get_fixed_state)(struct net_device *dev,
@@ -419,6 +423,7 @@ static void phylink_mac_link_up(struct phylink *pl,
{
struct net_device *ndev = pl->netdev;
+ pl->cur_interface = link_state.interface;
pl->ops->mac_link_up(pl->config, pl->link_an_mode,
pl->phy_state.interface,
pl->phydev);
@@ -440,7 +445,7 @@ static void phylink_mac_link_down(struct phylink *pl)
if (ndev)
netif_carrier_off(ndev);
pl->ops->mac_link_down(pl->config, pl->link_an_mode,
- pl->phy_state.interface);
+ pl->cur_interface);
phylink_info(pl, "Link is Down\n");
}