diff mbox

[net-next] usbnet: use netif_tx_wake_queue instead of netif_start_queue

Message ID 1331733624-23266-1-git-send-email-alexey.orishko@stericsson.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Alexey Orishko March 14, 2012, 2 p.m. UTC
If host is going to autosuspend function with two interfaces and
if IP packet has arrived in-between of two usbnet_suspend() callbacks,
i.e usbnet_resume() is called in-between, tx data flow is stopped.
When autosuspend timer expires and device is put to autosuspend
again, tx queue is waked up and data can be sent again.
This behavior might be repeated several times in a row.

Tested on Intel/ARM.

Reviewed-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Tested-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
Signed-off-by: Alexey Orishko <alexey.orishko@stericsson.com>
---
 drivers/net/usb/usbnet.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Oliver Neukum March 15, 2012, 5:05 p.m. UTC | #1
Am Mittwoch, 14. März 2012, 15:00:24 schrieb Alexey Orishko:
> If host is going to autosuspend function with two interfaces and
> if IP packet has arrived in-between of two usbnet_suspend() callbacks,
> i.e usbnet_resume() is called in-between, tx data flow is stopped.
> When autosuspend timer expires and device is put to autosuspend
> again, tx queue is waked up and data can be sent again.
> This behavior might be repeated several times in a row.
> 
> Tested on Intel/ARM.
> 
> Reviewed-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
> Tested-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
> Signed-off-by: Alexey Orishko <alexey.orishko@stericsson.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
David Miller March 17, 2012, 5:50 a.m. UTC | #2
From: Oliver Neukum <oneukum@suse.de>
Date: Thu, 15 Mar 2012 18:05:09 +0100

> Am Mittwoch, 14. März 2012, 15:00:24 schrieb Alexey Orishko:
>> If host is going to autosuspend function with two interfaces and
>> if IP packet has arrived in-between of two usbnet_suspend() callbacks,
>> i.e usbnet_resume() is called in-between, tx data flow is stopped.
>> When autosuspend timer expires and device is put to autosuspend
>> again, tx queue is waked up and data can be sent again.
>> This behavior might be repeated several times in a row.
>> 
>> Tested on Intel/ARM.
>> 
>> Reviewed-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
>> Tested-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
>> Signed-off-by: Alexey Orishko <alexey.orishko@stericsson.com>
> Acked-by: Oliver Neukum <oneukum@suse.de>

Applied, thanks.
--
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 mbox

Patch

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 83dcc53..5394b4e 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1535,7 +1535,7 @@  int usbnet_resume (struct usb_interface *intf)
 
 		if (test_bit(EVENT_DEV_OPEN, &dev->flags)) {
 			if (!(dev->txq.qlen >= TX_QLEN(dev)))
-				netif_start_queue(dev->net);
+				netif_tx_wake_all_queues(dev->net);
 			tasklet_schedule (&dev->bh);
 		}
 	}