[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1291630983-23725-1-git-send-email-Indrek.Peri@Ericsson.com>
Date: Mon, 6 Dec 2010 11:23:03 +0100
From: Indrek Peri <Indrek.Peri@...csson.com>
To: <dbrownell@...rs.sourceforge.net>
CC: <netdev@...r.kernel.org>, Indrek Peri <Indrek.Peri@...csson.com>
Subject: [PATCH] Insert interrupt URB after resume, so that status transfers can flow.
Signed-off-by: Indrek Peri <Indrek.Peri@...csson.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists