summaryrefslogtreecommitdiff
path: root/drivers/emac-dwc-eqos
diff options
context:
space:
mode:
authorqctecmdr Service <qctecmdr@qualcomm.com>2019-03-08 10:17:26 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2019-03-08 10:17:26 -0800
commitec77d2f859fd35b77ea56a6dfdcf8d67e0188f15 (patch)
treeb013334f24c3d330d239568bd18dd3f31062766e /drivers/emac-dwc-eqos
parent7168dd62436772844ba98df7d0fc5c7234943bd5 (diff)
parent67c92c4c09ab424f2e143b6b63d613426c1e5785 (diff)
downloaddata-kernel-ec77d2f859fd35b77ea56a6dfdcf8d67e0188f15.tar.gz
Merge "data-kernel: EMAC: Keep advertisement options from phy driver."
Diffstat (limited to 'drivers/emac-dwc-eqos')
-rw-r--r--drivers/emac-dwc-eqos/DWC_ETH_QOS_mdio.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/drivers/emac-dwc-eqos/DWC_ETH_QOS_mdio.c b/drivers/emac-dwc-eqos/DWC_ETH_QOS_mdio.c
index 3f82281..75a27ed 100644
--- a/drivers/emac-dwc-eqos/DWC_ETH_QOS_mdio.c
+++ b/drivers/emac-dwc-eqos/DWC_ETH_QOS_mdio.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -1110,28 +1110,17 @@ static int DWC_ETH_QOS_init_phy(struct net_device *dev)
#endif
if (pdata->interface == PHY_INTERFACE_MODE_GMII ||
- pdata->interface == PHY_INTERFACE_MODE_RGMII) {
- phydev->supported = PHY_DEFAULT_FEATURES;
- phydev->supported |= SUPPORTED_10baseT_Full | SUPPORTED_100baseT_Full | SUPPORTED_1000baseT_Full;
-
-#ifdef DWC_ETH_QOS_CERTIFICATION_PKTBURSTCNT_HALFDUPLEX
- phydev->supported &= ~SUPPORTED_1000baseT_Full;
-#endif
+ pdata->interface == PHY_INTERFACE_MODE_RGMII) {
+ phy_set_max_speed(phydev, SPEED_1000);
+ /* Half duplex not supported */
+ phydev->supported &= ~(SUPPORTED_10baseT_Half | SUPPORTED_100baseT_Half | SUPPORTED_1000baseT_Half);
} else if ((pdata->interface == PHY_INTERFACE_MODE_MII) ||
- (pdata->interface == PHY_INTERFACE_MODE_RMII)) {
- phydev->supported = PHY_DEFAULT_FEATURES;
- phydev->supported |= SUPPORTED_10baseT_Full | SUPPORTED_100baseT_Full;
+ (pdata->interface == PHY_INTERFACE_MODE_RMII)) {
+ phy_set_max_speed(phydev, SPEED_100);
+ /* Half duplex is not supported */
+ phydev->supported &= ~(SUPPORTED_10baseT_Half | SUPPORTED_100baseT_Half);
}
-#ifndef DWC_ETH_QOS_CONFIG_PGTEST
- phydev->supported |= (SUPPORTED_Pause | SUPPORTED_Asym_Pause);
-#endif
-
- /* Lets Make the code support for both 100M and Giga bit */
-/* #ifdef DWC_ETH_QOS_CONFIG_PGTEST */
-/* phydev->supported = PHY_BASIC_FEATURES; */
-/* #endif */
-
phydev->advertising = phydev->supported;
pdata->phydev = phydev;