ucc_geth: Add change_carrier() for Fixed PHYs

This allows to control carrier from /sys/class/net/ethX/carrier
for Fixed PHYs.

Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Joakim Tjernlund 2018-12-14 15:17:08 +01:00 committed by David S. Miller
parent 6211d46713
commit a28777f250
1 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,7 @@
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/mii.h> #include <linux/mii.h>
#include <linux/phy.h> #include <linux/phy.h>
#include <linux/phy_fixed.h>
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_irq.h> #include <linux/of_irq.h>
@ -3676,6 +3677,7 @@ static const struct net_device_ops ucc_geth_netdev_ops = {
.ndo_stop = ucc_geth_close, .ndo_stop = ucc_geth_close,
.ndo_start_xmit = ucc_geth_start_xmit, .ndo_start_xmit = ucc_geth_start_xmit,
.ndo_validate_addr = eth_validate_addr, .ndo_validate_addr = eth_validate_addr,
.ndo_change_carrier = fixed_phy_change_carrier,
.ndo_set_mac_address = ucc_geth_set_mac_addr, .ndo_set_mac_address = ucc_geth_set_mac_addr,
.ndo_set_rx_mode = ucc_geth_set_multi, .ndo_set_rx_mode = ucc_geth_set_multi,
.ndo_tx_timeout = ucc_geth_timeout, .ndo_tx_timeout = ucc_geth_timeout,