[PATCH] 8139cp - redetect link after suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After suspend the driver needs to retest link status in case the cable
has been inserted or removed during the suspend.

Signed-off-by: Pierre Ossman <[email protected]>
Index: linux-wbsd/drivers/net/8139cp.c
===================================================================
--- linux-wbsd/drivers/net/8139cp.c	(revision 153)
+++ linux-wbsd/drivers/net/8139cp.c	(working copy)
@@ -1858,6 +1858,7 @@
 {
 	struct net_device *dev;
 	struct cp_private *cp;
+	unsigned long flags;
 
 	dev = pci_get_drvdata (pdev);
 	cp  = netdev_priv(dev);
@@ -1871,6 +1872,12 @@
 	
 	cp_init_hw (cp);
 	netif_start_queue (dev);
+
+	spin_lock_irqsave (&cp->lock, flags);
+
+	mii_check_media(&cp->mii_if, netif_msg_link(cp), FALSE);
+
+	spin_unlock_irqrestore (&cp->lock, flags);
 	
 	return 0;
 }

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux