diff options
author | Pierre Ossman <drzeus-list@drzeus.cx> | 2005-07-03 18:22:53 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-18 16:59:14 -0400 |
commit | a4cf0761493495681d72dcc0b34efb86e94a5527 (patch) | |
tree | a053055cb2df4bbeaaed64a07421be492edd8088 /drivers/net | |
parent | 852ea22ab24df4c64c0211c3b6d6358eb0e759f9 (diff) |
[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: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/8139cp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index 7b293f01c9ed..34b80de34fae 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c | |||
@@ -1897,6 +1897,7 @@ static int cp_resume (struct pci_dev *pdev) | |||
1897 | { | 1897 | { |
1898 | struct net_device *dev; | 1898 | struct net_device *dev; |
1899 | struct cp_private *cp; | 1899 | struct cp_private *cp; |
1900 | unsigned long flags; | ||
1900 | 1901 | ||
1901 | dev = pci_get_drvdata (pdev); | 1902 | dev = pci_get_drvdata (pdev); |
1902 | cp = netdev_priv(dev); | 1903 | cp = netdev_priv(dev); |
@@ -1910,6 +1911,12 @@ static int cp_resume (struct pci_dev *pdev) | |||
1910 | 1911 | ||
1911 | cp_init_hw (cp); | 1912 | cp_init_hw (cp); |
1912 | netif_start_queue (dev); | 1913 | netif_start_queue (dev); |
1914 | |||
1915 | spin_lock_irqsave (&cp->lock, flags); | ||
1916 | |||
1917 | mii_check_media(&cp->mii_if, netif_msg_link(cp), FALSE); | ||
1918 | |||
1919 | spin_unlock_irqrestore (&cp->lock, flags); | ||
1913 | 1920 | ||
1914 | return 0; | 1921 | return 0; |
1915 | } | 1922 | } |