From: Hayes Wang <hidden> Date: 2016-07-07 07:09:57
Remove the unnacessary code.
Hayes Wang (3):
r8152: remove rtl_phy_reset function
r8152: remove a netif_carrier_off in rtl8152_open function
r8152: remove cancel_delayed_work_sync in rtl8152_set_speed
drivers/net/usb/r8152.c | 27 ---------------------------
1 file changed, 27 deletions(-)
--
2.7.4
From: Hayes Wang <hidden> Date: 2016-07-07 07:10:00
In rtl_hw_phy_work_func_t(), the flag of PHY_RESET is set in
rtl_ops.hw_phy_cfg() and cleared in rtl8152_set_speed(). Therefore,
the rtl_phy_reset() is never run and is unnecessary.
Signed-off-by: Hayes Wang <redacted>
---
drivers/net/usb/r8152.c | 24 ------------------------
1 file changed, 24 deletions(-)
@@ -2450,27 +2450,6 @@ static void rtl8153_runtime_enable(struct r8152 *tp, bool enable)}}-staticvoidrtl_phy_reset(structr8152*tp)-{-u16data;-inti;--data=r8152_mdio_read(tp,MII_BMCR);--/* don't reset again before the previous one complete */-if(data&BMCR_RESET)-return;--data|=BMCR_RESET;-r8152_mdio_write(tp,MII_BMCR,data);--for(i=0;i<50;i++){-msleep(20);-if((r8152_mdio_read(tp,MII_BMCR)&BMCR_RESET)==0)-break;-}-}-staticvoidr8153_teredo_off(structr8152*tp){u32ocp_data;
From: Hayes Wang <hidden> Date: 2016-07-07 07:10:05
After commit 90186af404ad ("r8152: fix lockup when runtime PM is enabled"),
the autoresume wouldn't start the device before rtl8152_open() is finished.
Therefore, we don't have to reset the linking status before and after
autoresume. That is, one of netif_carrier_off() in rtl8152_open() could be
removed.
Signed-off-by: Hayes Wang <redacted>
---
drivers/net/usb/r8152.c | 2 --
1 file changed, 2 deletions(-)
From: Hayes Wang <hidden> Date: 2016-07-07 07:10:39
There is no conflict between the work_queue function and
rtl8152_set_speed(), so we don't have to cancel the delayed work in
rtl8152_set_speed().
Signed-off-by: Hayes Wang <redacted>
---
drivers/net/usb/r8152.c | 1 -
1 file changed, 1 deletion(-)
From: David Miller <davem@davemloft.net> Date: 2016-07-09 21:48:33
From: Hayes Wang <redacted>
Date: Thu, 7 Jul 2016 15:09:17 +0800
Remove the unnacessary code.
Series applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html