> We need to reset MCU and do other initalizations on resume otherwise > MT7610U device will fail to initalize, what cause system hung due to > USB requests timeouts. > > Patch fixes 4.19 -> 4.20 regression. > > Cc: stable@xxxxxxxxxxxxxxx # 4.20+ > Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx> > --- > .../net/wireless/mediatek/mt76/mt76x0/usb.c | 43 +++++++++++++------ > 1 file changed, 29 insertions(+), 14 deletions(-) > > diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c > index 0e6b43bb4678..bd1dedcb7952 100644 > --- a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c > +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c > @@ -158,39 +158,52 @@ static const struct ieee80211_ops mt76x0u_ops = { > .get_txpower = mt76x02_get_txpower, > }; > > -static int mt76x0u_register_device(struct mt76x02_dev *dev) > +static int mt76x0u_init_hardware(struct mt76x02_dev *dev) > { > - struct ieee80211_hw *hw = dev->mt76.hw; > int err; > > - err = mt76u_alloc_queues(&dev->mt76); > - if (err < 0) > - goto out_err; > - > - err = mt76u_mcu_init_rx(&dev->mt76); > - if (err < 0) > - goto out_err; > - > mt76x0_chip_onoff(dev, true, true); > + Why this new line here? it is not related to the patch > if (!mt76x02_wait_for_mac(&dev->mt76)) { > err = -ETIMEDOUT; > - goto out_err; > + return err; just return -ETIMEDOUT here For the rest looks good to me Regards, Lorenzo > } > > err = mt76x0u_mcu_init(dev); > if (err < 0) > - goto out_err; > + return err; > > mt76x0_init_usb_dma(dev); > + > err = mt76x0_init_hardware(dev); > if (err < 0) > - goto out_err; > + return err; >