* [PATCH] Insert interrupt URB after resume, so that status transfers can flow.
@ 2010-12-06 10:23 Indrek Peri
2010-12-07 2:57 ` David Brownell
0 siblings, 1 reply; 2+ messages in thread
From: Indrek Peri @ 2010-12-06 10:23 UTC (permalink / raw)
To: dbrownell; +Cc: netdev, Indrek Peri
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Insert interrupt URB after resume, so that status transfers can flow.
2010-12-06 10:23 [PATCH] Insert interrupt URB after resume, so that status transfers can flow Indrek Peri
@ 2010-12-07 2:57 ` David Brownell
0 siblings, 0 replies; 2+ messages in thread
From: David Brownell @ 2010-12-07 2:57 UTC (permalink / raw)
To: Indrek Peri; +Cc: netdev
Building on my comment about your other patch ... shouldn't this be just
another part of the "resume driver" action,
like refilling the RX urb queue?
For the same reasons ... NAK. It looks like the work to add suspend and
resume processing to this driver had a few holes, and resume handling
can be simplified by combining re-activation of RX processing and this
status reporting (where relevant) in one routine.
- Dave
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-07 2:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-06 10:23 [PATCH] Insert interrupt URB after resume, so that status transfers can flow Indrek Peri
2010-12-07 2:57 ` David Brownell
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).