Skip to contentSkip to conversation

8139cp - redetect link after suspend

PATCH In review Pierre Ossman 2 participants 3 messages Jul 3, 2005 – Aug 4, 2005 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 8139cp - redetect link after suspend

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

drivers/net/8139cp.c +7 -0
Index: linux-wbsd/drivers/net/8139cp.c
===================================================================
@@ -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;
 }
#2 lore raw
Quoted 6 lines · John W. Linville
Quoted 3 lines · Pierre Ossman

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

Quoted 9 lines
Quoted 3 lines

Please copy [email protected] for network driver patches.

Other than that, the patch looks acceptable to me, fwiw...

Has anyone had else had the time to review this? Jeff especially.

Rgds
Pierre