From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: linux-wireless@vger.kernel.org, Felix Fietkau <nbd@nbd.name>
Subject: Re: [PATCH 5.0] mt76x0u: fix suspend/resume
Date: Tue, 5 Feb 2019 16:37:45 +0100 [thread overview]
Message-ID: <20190205153744.GA13965@localhost.localdomain> (raw)
In-Reply-To: <1549378057-13790-1-git-send-email-sgruszka@redhat.com>
> 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@vger.kernel.org # 4.20+
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
> .../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;
>
prev parent reply other threads:[~2019-02-05 15:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-05 14:47 [PATCH 5.0] mt76x0u: fix suspend/resume Stanislaw Gruszka
2019-02-05 15:37 ` Lorenzo Bianconi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190205153744.GA13965@localhost.localdomain \
--to=lorenzo.bianconi@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=sgruszka@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).