All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.3] mt76: mt76x0u: do not reset radio on resume
@ 2019-07-18 10:38 Stanislaw Gruszka
       [not found] ` <20190719004524.4AC232184E@mail.kernel.org>
  2019-08-20 13:58 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Stanislaw Gruszka @ 2019-07-18 10:38 UTC (permalink / raw)
  To: linux-wireless; +Cc: Felix Fietkau, Lorenzo Bianconi

On some machines mt76x0u firmware can hung during resume,
what result on messages like below:

[  475.480062] mt76x0 1-8:1.0: Error: MCU response pre-completed!
[  475.990066] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110
[  475.990075] mt76x0 1-8:1.0: Error: MCU response pre-completed!
[  476.500003] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110
[  476.500012] mt76x0 1-8:1.0: Error: MCU response pre-completed!
[  477.010046] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110
[  477.010055] mt76x0 1-8:1.0: Error: MCU response pre-completed!
[  477.529997] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110
[  477.530006] mt76x0 1-8:1.0: Error: MCU response pre-completed!
[  477.824907] mt76x0 1-8:1.0: Error: send MCU cmd failed:-71
[  477.824916] mt76x0 1-8:1.0: Error: MCU response pre-completed!
[  477.825029] usb 1-8: USB disconnect, device number 6

and possible whole system freeze.

This can be avoided, if we do not perform mt76x0_chip_onoff() reset.

Cc: stable@vger.kernel.org
Fixes: 134b2d0d1fcf ("mt76x0: init files")
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
index 627ed1fc7b15..645f4d15fb61 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
@@ -136,11 +136,11 @@ static int mt76x0u_start(struct ieee80211_hw *hw)
 	.release_buffered_frames = mt76_release_buffered_frames,
 };
 
-static int mt76x0u_init_hardware(struct mt76x02_dev *dev)
+static int mt76x0u_init_hardware(struct mt76x02_dev *dev, bool reset)
 {
 	int err;
 
-	mt76x0_chip_onoff(dev, true, true);
+	mt76x0_chip_onoff(dev, true, reset);
 
 	if (!mt76x02_wait_for_mac(&dev->mt76))
 		return -ETIMEDOUT;
@@ -173,7 +173,7 @@ static int mt76x0u_register_device(struct mt76x02_dev *dev)
 	if (err < 0)
 		goto out_err;
 
-	err = mt76x0u_init_hardware(dev);
+	err = mt76x0u_init_hardware(dev, true);
 	if (err < 0)
 		goto out_err;
 
@@ -309,7 +309,7 @@ static int __maybe_unused mt76x0_resume(struct usb_interface *usb_intf)
 	if (ret < 0)
 		goto err;
 
-	ret = mt76x0u_init_hardware(dev);
+	ret = mt76x0u_init_hardware(dev, false);
 	if (ret)
 		goto err;
 
-- 
1.9.3


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

* Re: [PATCH 5.3] mt76: mt76x0u: do not reset radio on resume
       [not found] ` <20190719004524.4AC232184E@mail.kernel.org>
@ 2019-07-19  5:48   ` Stanislaw Gruszka
  0 siblings, 0 replies; 3+ messages in thread
From: Stanislaw Gruszka @ 2019-07-19  5:48 UTC (permalink / raw)
  To: Sasha Levin; +Cc: linux-wireless, Felix Fietkau, stable

On Fri, Jul 19, 2019 at 12:45:23AM +0000, Sasha Levin wrote:
> v5.1.18: Failed to apply! Possible dependencies:
>     Unable to calculate
> 
> v4.19.59: Failed to apply! Possible dependencies:
<snip>

> How should we proceed with this patch?

I'll provide backported version of the patch for 4.19 and 5.1 
after it will be merged to Linus' tree.

Stanislaw

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

* Re: [PATCH 5.3] mt76: mt76x0u: do not reset radio on resume
  2019-07-18 10:38 [PATCH 5.3] mt76: mt76x0u: do not reset radio on resume Stanislaw Gruszka
       [not found] ` <20190719004524.4AC232184E@mail.kernel.org>
@ 2019-08-20 13:58 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2019-08-20 13:58 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-wireless, Felix Fietkau, Lorenzo Bianconi

Stanislaw Gruszka <sgruszka@redhat.com> wrote:

> On some machines mt76x0u firmware can hung during resume,
> what result on messages like below:
> 
> [  475.480062] mt76x0 1-8:1.0: Error: MCU response pre-completed!
> [  475.990066] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110
> [  475.990075] mt76x0 1-8:1.0: Error: MCU response pre-completed!
> [  476.500003] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110
> [  476.500012] mt76x0 1-8:1.0: Error: MCU response pre-completed!
> [  477.010046] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110
> [  477.010055] mt76x0 1-8:1.0: Error: MCU response pre-completed!
> [  477.529997] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110
> [  477.530006] mt76x0 1-8:1.0: Error: MCU response pre-completed!
> [  477.824907] mt76x0 1-8:1.0: Error: send MCU cmd failed:-71
> [  477.824916] mt76x0 1-8:1.0: Error: MCU response pre-completed!
> [  477.825029] usb 1-8: USB disconnect, device number 6
> 
> and possible whole system freeze.
> 
> This can be avoided, if we do not perform mt76x0_chip_onoff() reset.
> 
> Cc: stable@vger.kernel.org
> Fixes: 134b2d0d1fcf ("mt76x0: init files")
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>

Patch applied to wireless-drivers.git, thanks.

8f2d163cb26d mt76: mt76x0u: do not reset radio on resume

-- 
https://patchwork.kernel.org/patch/11048769/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


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

end of thread, other threads:[~2019-08-20 13:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18 10:38 [PATCH 5.3] mt76: mt76x0u: do not reset radio on resume Stanislaw Gruszka
     [not found] ` <20190719004524.4AC232184E@mail.kernel.org>
2019-07-19  5:48   ` Stanislaw Gruszka
2019-08-20 13:58 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.