dpaa_eth: Add change_carrier() for Fixed PHYs
authorJoakim Tjernlund <joakim.tjernlund@infinera.com>
Fri, 14 Dec 2018 14:17:06 +0000 (15:17 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Dec 2018 19:24:32 +0000 (11:24 -0800)
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>
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c

index 9510c9d78858d41cadf365bdec8423e5b23aaca9..f53090cde041d2ac37f75e5f406b401fef25f08b 100644 (file)
@@ -51,9 +51,9 @@
 #include <linux/percpu.h>
 #include <linux/dma-mapping.h>
 #include <linux/sort.h>
+#include <linux/phy_fixed.h>
 #include <soc/fsl/bman.h>
 #include <soc/fsl/qman.h>
-
 #include "fman.h"
 #include "fman_port.h"
 #include "mac.h"
@@ -2616,6 +2616,7 @@ static const struct net_device_ops dpaa_ops = {
        .ndo_stop = dpaa_eth_stop,
        .ndo_tx_timeout = dpaa_tx_timeout,
        .ndo_get_stats64 = dpaa_get_stats64,
+       .ndo_change_carrier = fixed_phy_change_carrier,
        .ndo_set_mac_address = dpaa_set_mac_address,
        .ndo_validate_addr = eth_validate_addr,
        .ndo_set_rx_mode = dpaa_set_rx_mode,