[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <13598591-49fe-0020-443e-9d6cedb53cfb@gmail.com>
Date: Thu, 21 Dec 2017 21:50:28 +0100
From: Heiner Kallweit <hkallweit1@...il.com>
To: Andrew Lunn <andrew@...n.ch>,
Realtek linux nic maintainers <nic_swsd@...ltek.com>,
Chun-Hao Lin <hau@...ltek.com>
Cc: David Miller <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: [PATCH RFC 09/18] r8168: use genphy_soft_reset instead of open coding
the soft reset
Use genphy_soft_reset instead of open coding the soft reset.
Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
---
drivers/net/ethernet/realtek/r8168.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8168.c b/drivers/net/ethernet/realtek/r8168.c
index be6c45b11..62d0e0169 100644
--- a/drivers/net/ethernet/realtek/r8168.c
+++ b/drivers/net/ethernet/realtek/r8168.c
@@ -4308,25 +4308,13 @@ static void rtl8168_phy_timer(struct timer_list *t)
rtl_schedule_task(tp, RTL_FLAG_TASK_PHY_PENDING);
}
-DECLARE_RTL_COND(rtl_phy_reset_cond)
-{
- return rtl8168_xmii_reset_pending(tp);
-}
-
-static void rtl8168_phy_reset(struct net_device *dev,
- struct rtl8168_private *tp)
-{
- rtl8168_xmii_reset_enable(tp);
- rtl_msleep_loop_wait_low(tp, &rtl_phy_reset_cond, 1, 100);
-}
-
static void rtl8168_init_phy(struct net_device *dev, struct rtl8168_private *tp)
{
rtl_hw_phy_config(dev);
pci_write_config_byte(tp->pci_dev, PCI_LATENCY_TIMER, 0x40);
- rtl8168_phy_reset(dev, tp);
+ genphy_soft_reset(dev->phydev);
rtl8168_set_speed(dev, AUTONEG_ENABLE, SPEED_1000, DUPLEX_FULL,
ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full |
--
2.15.1
Powered by blists - more mailing lists