From: Pierre Ossman <drzeus-list@drzeus.cx>
To: LKML <linux-kernel@vger.kernel.org>, jgarzik@pobox.com
Subject: [PATCH] 8139cp - redetect link after suspend
Date: Mon, 04 Jul 2005 00:22:53 +0200 [thread overview]
Message-ID: <42C8653D.9040103@drzeus.cx> (raw)
[-- Attachment #1: Type: text/plain, Size: 169 bytes --]
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>
[-- Attachment #2: 8139cp-mii-suspend.patch --]
[-- Type: text/x-patch, Size: 608 bytes --]
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;
}
next reply other threads:[~2005-07-03 22:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-03 22:22 Pierre Ossman [this message]
2005-07-05 14:59 ` [PATCH] 8139cp - redetect link after suspend John W. Linville
2005-08-04 13:42 ` Pierre Ossman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42C8653D.9040103@drzeus.cx \
--to=drzeus-list@drzeus.cx \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox