diff mbox series

[v4,4/4] ucc_geth: Add change_carrier() for Fixed PHYs

Message ID 20181214141708.21439-4-joakim.tjernlund@infinera.com
State Accepted, archived
Delegated to: David Miller
Headers show
Series [v4,1/4] Fixed PHY: Add fixed_phy_change_carrier() | expand

Commit Message

Joakim Tjernlund Dec. 14, 2018, 2:17 p.m. UTC
This allows to control carrier from /sys/class/net/ethX/carrier
for Fixed PHYs.

Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
---
 drivers/net/ethernet/freescale/ucc_geth.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

David Miller Dec. 17, 2018, 7:25 p.m. UTC | #1
From: Joakim Tjernlund <joakim.tjernlund@infinera.com>
Date: Fri, 14 Dec 2018 15:17:08 +0100

> This allows to control carrier from /sys/class/net/ethX/carrier
> for Fixed PHYs.
> 
> Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>

Applied.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c
index 32e02700feaa..ad8023557668 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.c
+++ b/drivers/net/ethernet/freescale/ucc_geth.c
@@ -30,6 +30,7 @@ 
 #include <linux/dma-mapping.h>
 #include <linux/mii.h>
 #include <linux/phy.h>
+#include <linux/phy_fixed.h>
 #include <linux/workqueue.h>
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
@@ -3681,6 +3682,7 @@  static const struct net_device_ops ucc_geth_netdev_ops = {
 	.ndo_stop		= ucc_geth_close,
 	.ndo_start_xmit		= ucc_geth_start_xmit,
 	.ndo_validate_addr	= eth_validate_addr,
+	.ndo_change_carrier     = fixed_phy_change_carrier,
 	.ndo_set_mac_address	= ucc_geth_set_mac_addr,
 	.ndo_set_rx_mode	= ucc_geth_set_multi,
 	.ndo_tx_timeout		= ucc_geth_timeout,