aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/5721-net-ethernet-xgbe-expand-PHY_GBIT_FEAUTRES.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/5721-net-ethernet-xgbe-expand-PHY_GBIT_FEAUTRES.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/5721-net-ethernet-xgbe-expand-PHY_GBIT_FEAUTRES.patch104
1 files changed, 104 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/5721-net-ethernet-xgbe-expand-PHY_GBIT_FEAUTRES.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/5721-net-ethernet-xgbe-expand-PHY_GBIT_FEAUTRES.patch
new file mode 100644
index 00000000..ee1e177b
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/5721-net-ethernet-xgbe-expand-PHY_GBIT_FEAUTRES.patch
@@ -0,0 +1,104 @@
+From b63082b3f8728f862094a2e1146e2ee4679823ed Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Sun, 11 Nov 2018 23:32:49 +0530
+Subject: [PATCH 5721/5725] net: ethernet: xgbe: expand PHY_GBIT_FEAUTRES
+
+From d0939c26c53a2b2cecfbe6953858a58abb0158c7
+The macro PHY_GBIT_FEAUTRES needs to change into a bitmap in order to
+support link_modes. Remove its use from xgde by replacing it with its
+definition.
+
+Probably, the current behavior is wrong. It probably should be
+ANDing not assigning.
+
+Signed-off-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 14 ++++++++------
+ drivers/net/phy/phy_device.c | 14 ++++++++++++++
+ include/linux/phy.h | 1 +
+ 3 files changed, 23 insertions(+), 6 deletions(-)
+ mode change 100644 => 100755 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+ mode change 100644 => 100755 drivers/net/phy/phy_device.c
+ mode change 100644 => 100755 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
+old mode 100644
+new mode 100755
+index 3ceb4f9..194ec27
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+@@ -878,9 +878,10 @@ static bool xgbe_phy_finisar_phy_quirks(struct xgbe_prv_data *pdata)
+ phy_write(phy_data->phydev, 0x04, 0x0d01);
+ 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_data->phydev->supported = PHY_10BT_FEATURES |
++ PHY_100BT_FEATURES |
++ PHY_1000BT_FEATURES;
++ phy_support_asym_pause(phy_data->phydev);
+
+ netif_dbg(pdata, drv, pdata->netdev,
+ "Finisar PHY quirk in place\n");
+@@ -950,9 +951,10 @@ static bool xgbe_phy_belfuse_phy_quirks(struct xgbe_prv_data *pdata)
+ reg = phy_read(phy_data->phydev, 0x00);
+ 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_data->phydev->supported = (PHY_10BT_FEATURES |
++ PHY_100BT_FEATURES |
++ PHY_1000BT_FEATURES);
++ 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 100644
+new mode 100755
+index fe76e2c..f16af99
+--- a/drivers/net/phy/phy_device.c
++++ b/drivers/net/phy/phy_device.c
+@@ -1736,6 +1736,20 @@ int phy_set_max_speed(struct phy_device *phydev, u32 max_speed)
+ }
+ EXPORT_SYMBOL(phy_set_max_speed);
+
++/**
++ * 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)
++{
++ phydev->supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause;
++ 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 100644
+new mode 100755
+index efc04c2..38d36a6
+--- a/include/linux/phy.h
++++ b/include/linux/phy.h
+@@ -913,6 +913,7 @@ 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_support_asym_pause(struct phy_device *phydev);
+
+ int phy_register_fixup(const char *bus_id, u32 phy_uid, u32 phy_uid_mask,
+ int (*run)(struct phy_device *));
+--
+2.7.4
+