netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Dot not insert RX urbs if EVENT_DEV_ASLEEP flag is set.
@ 2010-12-06 10:24 Indrek Peri
       [not found] ` <1291631047-23766-1-git-send-email-Indrek.Peri-rMwOiwQz3sZWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Indrek Peri @ 2010-12-06 10:24 UTC (permalink / raw)
  To: dbrownell; +Cc: netdev, Indrek Peri


Signed-off-by: Indrek Peri <Indrek.Peri@Ericsson.com>
---
 drivers/net/usb/usbnet.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index c04d49e..d83adcc 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1172,7 +1172,8 @@ static void usbnet_bh (unsigned long param)
 	} else if (netif_running (dev->net) &&
 		   netif_device_present (dev->net) &&
 		   !timer_pending (&dev->delay) &&
-		   !test_bit (EVENT_RX_HALT, &dev->flags)) {
+		   !test_bit (EVENT_RX_HALT, &dev->flags) &&
+		   !test_bit (EVENT_DEV_ASLEEP, &dev->flags)) {
 		int	temp = dev->rxq.qlen;
 		int	qlen = RX_QLEN (dev);
 
-- 
1.7.0.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Dot not insert RX urbs if EVENT_DEV_ASLEEP flag is set.
       [not found] ` <1291631047-23766-1-git-send-email-Indrek.Peri-rMwOiwQz3sZWk0Htik3J/w@public.gmane.org>
@ 2010-12-07  2:49   ` David Brownell
  0 siblings, 0 replies; 2+ messages in thread
From: David Brownell @ 2010-12-07  2:49 UTC (permalink / raw)
  To: Indrek Peri
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA

I realize it's not all your doing, but that's an EVENT not a state flag,

But you're treating it as a state flag.  (Like the original somewhat
goofy 69ee472f2706371ca639de49b06df91615c07d8d from Oliver).  Even as
a flag, its semantics seem fuzzy... like they should be covered by
other state in the network and/or power management stacks.

I'd like to see this botch fixed, not worsened.  Maybe you and Oliver
could collaborate on fixing it, and getting other state flags out ofthe
word used to track and signal events?  If you've ever worked with
hardware
that makes that kind of mistake, you know how error-prone it is ...

Meanwhile, NAK.

ISTR related Comments came up when a previous incarnation of this patch
circulated, from at least Alan Stern.  What happened to that?

Events trigger state transitions and similar actions.  So
A "leave sleep state" event" might be a place to trigger RX urb
insertion as part of wake-up processing.  (Ideally, there'd be
no need to set an event bit to trigger it as deferred work ... the
reason to have a word of event bits for some other events.




--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-07  2:49 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:24 [PATCH] Dot not insert RX urbs if EVENT_DEV_ASLEEP flag is set Indrek Peri
     [not found] ` <1291631047-23766-1-git-send-email-Indrek.Peri-rMwOiwQz3sZWk0Htik3J/w@public.gmane.org>
2010-12-07  2:49   ` 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).