Add exception when missing link because original function "
rtl8169_check_link_status" must be int instead of void.
commit 21d27973b264192a4ccd6488b1487f07293b11c8
Author: Corcodel Marian <[email protected]>
Date: Sat Jul 11 21:19:57 2015 +0300
Committer: Corcodel Marian <[email protected]>
Add exception when nonexistent link occur because orig func
is void format instead of int.
On branch master
Your branch is ahead of 'origin/master' by 12 commits.
(use "git push" to publish your local commits)
Changes to be committed:
modified: drivers/net/ethernet/realtek/r8169.c
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 410c1ee..7465ec4 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -7643,6 +7643,12 @@ static int rtl_open(struct net_device *dev)
tp->saved_wolopts = 0;
pm_runtime_put_noidle(&pdev->dev);
+ if (!tp->link_ok(ioaddr)) {
+ netif_carrier_off(dev);
+ netif_info(tp, ifdown, dev, "link down\n");
+ pm_schedule_suspend(&tp->pci_dev->dev, 200);
+ goto out;
+ }
rtl8169_check_link_status(dev, tp, ioaddr);
out: