From: Indrek Peri <Indrek.Peri@Ericsson.com>
To: <dbrownell@users.sourceforge.net>
Cc: <netdev@vger.kernel.org>, Indrek Peri <Indrek.Peri@Ericsson.com>
Subject: [PATCH] Insert interrupt URB after resume, so that status transfers can flow.
Date: Mon, 6 Dec 2010 11:23:03 +0100 [thread overview]
Message-ID: <1291630983-23725-1-git-send-email-Indrek.Peri@Ericsson.com> (raw)
Signed-off-by: Indrek Peri <Indrek.Peri@Ericsson.com>
---
drivers/net/usb/usbnet.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index c04d49e..eaa83f9 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -719,6 +719,7 @@ int usbnet_open (struct net_device *net)
/* start any status interrupt transfer */
if (dev->interrupt) {
+ usb_kill_urb(dev->interrupt); /* resume may add int urb */
retval = usb_submit_urb (dev->interrupt, GFP_KERNEL);
if (retval < 0) {
netif_err(dev, ifup, dev->net,
@@ -1495,6 +1496,17 @@ int usbnet_resume (struct usb_interface *intf)
spin_unlock_irq(&dev->txq.lock);
if (!(dev->txq.qlen >= TX_QLEN(dev)))
netif_start_queue(dev->net);
+
+ /* start any status interrupt transfer */
+ if (dev->interrupt) {
+ retval = usb_submit_urb(dev->interrupt, GFP_KERNEL);
+ if (retval < 0) {
+ netif_err(dev, ifup, dev->net,
+ "intr submit %d\n", retval);
+ return retval;
+ }
+ }
+
tasklet_schedule (&dev->bh);
}
return 0;
--
1.7.0.3
next reply other threads:[~2010-12-06 10:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-06 10:23 Indrek Peri [this message]
2010-12-07 2:57 ` [PATCH] Insert interrupt URB after resume, so that status transfers can flow David Brownell
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=1291630983-23725-1-git-send-email-Indrek.Peri@Ericsson.com \
--to=indrek.peri@ericsson.com \
--cc=dbrownell@users.sourceforge.net \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).