netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: usbnet: suspend count gets lost when -EBUSY
@ 2011-07-06  1:35 Chris Fries
  2011-07-06  1:40 ` David Miller
  2011-07-07 20:50 ` [stable] " Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Fries @ 2011-07-06  1:35 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, stable

When suspend is refused due to pending transmits, the
busy counter gets out of sync, and suspend will stop
working correctly.

Signed-off-by: Chris Fries <C.Fries@motorola.com>
---
 drivers/net/usb/usbnet.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index cc95aad..9bcc3e3 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1451,6 +1451,7 @@ int usbnet_suspend (struct usb_interface *intf,
pm_message_t message)
 		/* don't autosuspend while transmitting */
 		if (dev->txq.qlen && (message.event & PM_EVENT_AUTO)) {
 			spin_unlock_irq(&dev->txq.lock);
+			dev->suspend_count--;
 			return -EBUSY;
 		} else {
 			set_bit(EVENT_DEV_ASLEEP, &dev->flags);
-- 
1.7.0.4

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

end of thread, other threads:[~2011-07-07 20:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-06  1:35 [PATCH] usb: usbnet: suspend count gets lost when -EBUSY Chris Fries
2011-07-06  1:40 ` David Miller
2011-07-07 20:50 ` [stable] " Greg KH

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).