linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mwifiex: fix Tx timeout issue during suspend test
@ 2016-03-16 14:46 Amitkumar Karwar
  2016-03-31 11:36 ` Amitkumar Karwar
  2016-04-06 18:28 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Amitkumar Karwar @ 2016-03-16 14:46 UTC (permalink / raw)
  To: linux-wireless; +Cc: Nishant Sarmukadam, Amitkumar Karwar

Call netif_carrier_off/on while stoping/starting netdev queues.
This fixes netdev watchdog warning and ->ndo_tx_timeout() invocation
during suspend resume stress test.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Fixes: 54f008497b9f09f ('mwifiex: Empty Tx queue during suspend')
Tested-by: Wei-Ning Huang <wnhuang@chromium.org>
---
 drivers/net/wireless/marvell/mwifiex/cfg80211.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index bb7235e..b0663bd 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -3272,8 +3272,11 @@ static int mwifiex_cfg80211_suspend(struct wiphy *wiphy,
 
 	for (i = 0; i < adapter->priv_num; i++) {
 		priv = adapter->priv[i];
-		if (priv && priv->netdev)
+		if (priv && priv->netdev) {
 			mwifiex_stop_net_dev_queue(priv->netdev, adapter);
+			if (netif_carrier_ok(priv->netdev))
+				netif_carrier_off(priv->netdev);
+		}
 	}
 
 	for (i = 0; i < retry_num; i++) {
@@ -3344,8 +3347,11 @@ static int mwifiex_cfg80211_resume(struct wiphy *wiphy)
 
 	for (i = 0; i < adapter->priv_num; i++) {
 		priv = adapter->priv[i];
-		if (priv && priv->netdev)
+		if (priv && priv->netdev) {
+			if (!netif_carrier_ok(priv->netdev))
+				netif_carrier_on(priv->netdev);
 			mwifiex_wake_up_net_dev_queue(priv->netdev, adapter);
+		}
 	}
 
 	priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA);
-- 
1.8.1.4


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

* RE: [PATCH] mwifiex: fix Tx timeout issue during suspend test
  2016-03-16 14:46 [PATCH] mwifiex: fix Tx timeout issue during suspend test Amitkumar Karwar
@ 2016-03-31 11:36 ` Amitkumar Karwar
  2016-04-06 18:28 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Amitkumar Karwar @ 2016-03-31 11:36 UTC (permalink / raw)
  To: linux-wireless@vger.kernel.org; +Cc: Nishant Sarmukadam, Wei-Ning Huang

Hi Kalle,

> From: Amitkumar Karwar [mailto:akarwar@marvell.com]
> Sent: Wednesday, March 16, 2016 8:16 PM
> To: linux-wireless@vger.kernel.org
> Cc: Nishant Sarmukadam; Amitkumar Karwar
> Subject: [PATCH] mwifiex: fix Tx timeout issue during suspend test
> 
> Call netif_carrier_off/on while stoping/starting netdev queues.
> This fixes netdev watchdog warning and ->ndo_tx_timeout() invocation
> during suspend resume stress test.
> 
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
> Fixes: 54f008497b9f09f ('mwifiex: Empty Tx queue during suspend')
> Tested-by: Wei-Ning Huang <wnhuang@chromium.org>
> ---
>  drivers/net/wireless/marvell/mwifiex/cfg80211.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> index bb7235e..b0663bd 100644
> --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> @@ -3272,8 +3272,11 @@ static int mwifiex_cfg80211_suspend(struct wiphy
> *wiphy,
> 
>  	for (i = 0; i < adapter->priv_num; i++) {
>  		priv = adapter->priv[i];
> -		if (priv && priv->netdev)
> +		if (priv && priv->netdev) {
>  			mwifiex_stop_net_dev_queue(priv->netdev, adapter);
> +			if (netif_carrier_ok(priv->netdev))
> +				netif_carrier_off(priv->netdev);
> +		}
>  	}
> 
>  	for (i = 0; i < retry_num; i++) {
> @@ -3344,8 +3347,11 @@ static int mwifiex_cfg80211_resume(struct wiphy
> *wiphy)
> 
>  	for (i = 0; i < adapter->priv_num; i++) {
>  		priv = adapter->priv[i];
> -		if (priv && priv->netdev)
> +		if (priv && priv->netdev) {
> +			if (!netif_carrier_ok(priv->netdev))
> +				netif_carrier_on(priv->netdev);
>  			mwifiex_wake_up_net_dev_queue(priv->netdev, adapter);
> +		}
>  	}
> 
>  	priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA);
> --
> 1.8.1.4


Could you please take this patch? It fixes an issue introduced by "mwifiex: Empty Tx queue during suspend"

Regards,
Amitkumar

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

* Re: mwifiex: fix Tx timeout issue during suspend test
  2016-03-16 14:46 [PATCH] mwifiex: fix Tx timeout issue during suspend test Amitkumar Karwar
  2016-03-31 11:36 ` Amitkumar Karwar
@ 2016-04-06 18:28 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2016-04-06 18:28 UTC (permalink / raw)
  To: Amitkumar Karwar; +Cc: linux-wireless, Nishant Sarmukadam, Amitkumar Karwar


> Call netif_carrier_off/on while stoping/starting netdev queues.
> This fixes netdev watchdog warning and ->ndo_tx_timeout() invocation
> during suspend resume stress test.
> 
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
> Fixes: 54f008497b9f09f ('mwifiex: Empty Tx queue during suspend')
> Tested-by: Wei-Ning Huang <wnhuang@chromium.org>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo

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

end of thread, other threads:[~2016-04-06 18:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-16 14:46 [PATCH] mwifiex: fix Tx timeout issue during suspend test Amitkumar Karwar
2016-03-31 11:36 ` Amitkumar Karwar
2016-04-06 18:28 ` Kalle Valo

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