aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/0614-Revert-net-ethernet-Add-helper-for-MACs-which-suppor.patch
blob: 716dc61b4cb79cda831d616d842f4b466ceca08a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
From 62b8abd269f0fee5b500da2b81491f012f9d064d Mon Sep 17 00:00:00 2001
From: Sudheesh Mavila <sudheesh.mavila@amd.com>
Date: Mon, 4 Feb 2019 11:49:12 +0530
Subject: [PATCH 0614/2940] Revert "net: ethernet: Add helper for MACs which
 support asym pause"

This reverts commit 52053868f4772530d9fee625d972ba6120b50d27.
---
 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c |  4 +--
 drivers/net/phy/phy_device.c                | 30 ---------------------
 include/linux/phy.h                         |  8 ------
 3 files changed, 2 insertions(+), 40 deletions(-)
 mode change 100755 => 100644 drivers/net/phy/phy_device.c
 mode change 100755 => 100644 include/linux/phy.h

diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
index a7e03e3ecc93..5f01b36a6f8a 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
@@ -879,8 +879,8 @@ static bool xgbe_phy_finisar_phy_quirks(struct xgbe_prv_data *pdata)
 	phy_write(phy_data->phydev, 0x00, 0x9140);
 
 	phy_data->phydev->supported = PHY_GBIT_FEATURES;
+	phy_data->phydev->supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause;
 	phy_data->phydev->advertising = phy_data->phydev->supported;
-	phy_support_asym_pause(phy_data->phydev);
 
 	netif_dbg(pdata, drv, pdata->netdev,
 		  "Finisar PHY quirk in place\n");
@@ -951,8 +951,8 @@ static bool xgbe_phy_belfuse_phy_quirks(struct xgbe_prv_data *pdata)
 	phy_write(phy_data->phydev, 0x00, reg & ~0x00800);
 
 	phy_data->phydev->supported = PHY_GBIT_FEATURES;
+	phy_data->phydev->supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause;
 	phy_data->phydev->advertising = phy_data->phydev->supported;
-	phy_support_asym_pause(phy_data->phydev);
 
 	netif_dbg(pdata, drv, pdata->netdev,
 		  "BelFuse PHY quirk in place\n");
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
old mode 100755
new mode 100644
index 55b7f5c10f77..9ce93eb66fb0
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1915,36 +1915,6 @@ int phy_set_max_speed(struct phy_device *phydev, u32 max_speed)
 }
 EXPORT_SYMBOL(phy_set_max_speed);
 
-/**
- * phy_support_sym_pause - Enable support of symmetrical pause
- * @phydev: target phy_device struct
- *
- * Description: Called by the MAC to indicate is supports symmetrical
- * Pause, but not asym pause.
- */
-void phy_support_sym_pause(struct phy_device *phydev)
-{
-	linkmode_clear_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, phydev->supported);
-	linkmode_set_bit(ETHTOOL_LINK_MODE_Pause_BIT, phydev->supported);
-	linkmode_copy(phydev->advertising, phydev->supported);
-}
-EXPORT_SYMBOL(phy_support_sym_pause);
-
-/**
- * phy_support_asym_pause - Enable support of asym pause
- * @phydev: target phy_device struct
- *
- * Description: Called by the MAC to indicate is supports Asym Pause.
- */
-void phy_support_asym_pause(struct phy_device *phydev)
-{
-	linkmode_set_bit(ETHTOOL_LINK_MODE_Pause_BIT, phydev->supported);
-	linkmode_set_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, phydev->supported);
-	linkmode_copy(phydev->advertising, phydev->supported);
-}
-EXPORT_SYMBOL(phy_support_asym_pause);
-
-
 static void of_set_phy_supported(struct phy_device *phydev)
 {
 	struct device_node *node = phydev->mdio.dev.of_node;
diff --git a/include/linux/phy.h b/include/linux/phy.h
old mode 100755
new mode 100644
index 18ab9e8d52e2..2e86acadb9bc
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1058,14 +1058,6 @@ int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd);
 int phy_start_interrupts(struct phy_device *phydev);
 void phy_print_status(struct phy_device *phydev);
 int phy_set_max_speed(struct phy_device *phydev, u32 max_speed);
-void phy_remove_link_mode(struct phy_device *phydev, u32 link_mode);
-void phy_support_sym_pause(struct phy_device *phydev);
-void phy_support_asym_pause(struct phy_device *phydev);
-void phy_set_sym_pause(struct phy_device *phydev, bool rx, bool tx,
-		       bool autoneg);
-void phy_set_asym_pause(struct phy_device *phydev, bool rx, bool tx);
-bool phy_validate_pause(struct phy_device *phydev,
-			struct ethtool_pauseparam *pp);
 
 int phy_register_fixup(const char *bus_id, u32 phy_uid, u32 phy_uid_mask,
 		       int (*run)(struct phy_device *));
-- 
2.17.1