Skip to content

Commit

Permalink
mt76: mt76x0u: do not reset radio on resume
Browse files Browse the repository at this point in the history
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: [email protected]
Fixes: 134b2d0d1fcf ("mt76x0: init files")
Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
  • Loading branch information
Stanislaw Gruszka authored and nbd168 committed Dec 13, 2019
1 parent b3bf83d commit efcbee1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mt76x0/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ static const struct ieee80211_ops mt76x0u_ops = {
.get_antenna = mt76_get_antenna,
};

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;
Expand Down Expand Up @@ -185,7 +185,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;

Expand Down Expand Up @@ -326,7 +326,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;

Expand Down

0 comments on commit efcbee1

Please sign in to comment.