Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4cf0761 authored by Pierre Ossman's avatar Pierre Ossman Committed by Jeff Garzik
Browse files

[PATCH] 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.

Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 852ea22a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1897,6 +1897,7 @@ static int cp_resume (struct pci_dev *pdev)
{
	struct net_device *dev;
	struct cp_private *cp;
	unsigned long flags;

	dev = pci_get_drvdata (pdev);
	cp  = netdev_priv(dev);
@@ -1911,6 +1912,12 @@ static int cp_resume (struct pci_dev *pdev)
	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;
}
#endif /* CONFIG_PM */