Skip to content

Commit

Permalink
[PATCH] 8139cp - redetect link after suspend
Browse files Browse the repository at this point in the history
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 <drzeus@drzeus.cx>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
  • Loading branch information
Pierre Ossman authored and Jeff Garzik committed Aug 18, 2005
1 parent 852ea22 commit a4cf076
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/net/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -1910,6 +1911,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;
}
Expand Down

0 comments on commit a4cf076

Please sign in to comment.