Message ID | 1340176553-32225-3-git-send-email-ming.lei@canonical.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
Am Mittwoch, 20. Juni 2012, 09:15:52 schrieb Ming Lei: > This patch decreases dev->suspend_count in the -EBUSY failure path > of usbnet_suspend. Without the change, the later runtime suspend > will do nothing except for increasing dev->suspend_count. > > Signed-off-by: Ming Lei <ming.lei@canonical.com> Acked-by: Oliver Neukum <oneukum@suse.de> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index f06cf9b..9bfa775 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1508,6 +1508,7 @@ int usbnet_suspend (struct usb_interface *intf, pm_message_t message) spin_lock_irq(&dev->txq.lock); /* don't autosuspend while transmitting */ if (dev->txq.qlen && PMSG_IS_AUTO(message)) { + dev->suspend_count--; spin_unlock_irq(&dev->txq.lock); return -EBUSY; } else {
This patch decreases dev->suspend_count in the -EBUSY failure path of usbnet_suspend. Without the change, the later runtime suspend will do nothing except for increasing dev->suspend_count. Signed-off-by: Ming Lei <ming.lei@canonical.com> --- drivers/net/usb/usbnet.c | 1 + 1 file changed, 1 insertion(+)