All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: Herman Semenoff <germanaizek0@gmail.com>,
	kuba@kernel.org, kvalo@kernel.org,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH wireless-next] wifi: mt7601u: add vnd_reset parameter to fix probe failure on Tenda U2
Date: Sun, 6 Sep 2026 23:44:08 +0300	[thread overview]
Message-ID: <e864365d-c9c5-4609-94b7-4ec4e3754136@gmail.com> (raw)
In-Reply-To: <CAMnMt5aJwVXEVKyBR7MvVBd=qCn7fNijMC+O_cZn82zGuNPc3A@mail.gmail.com>

On 06/09/2026 23:20, Herman Semenoff wrote:
> From c03d73d37df440d0046d68406fde2aa1f62fe0d1 Mon Sep 17 00:00:00 2001
> From: Herman Semenoff <GermanAizek@aizekgroup.ru>
> Date: Thu, 3 Sep 2026 07:14:32 +0300
> Subject: [PATCH wireless-next] wifi: mt7601u: add vnd_reset parameter
> to fix probe failure on Tenda U2
> 
> On certain MT7601U adapters, such as Tenda U2 and other newer hardware
> revisions, driver initialization consistently fails during probe with
> vendor request timeouts (-110 / -ETIMEDOUT):
> 
>     mt7601u 3-14:1.0: ASIC revision: 76010001 MAC revision: 76010500
>     mt7601u 3-14:1.0: Firmware Version: 0.1.00 Build: 7640
>     mt7601u 3-14:1.0: Vendor request req:07 off:09a8 failed:-110
>     mt7601u 3-14:1.0: Vendor request req:02 off:09a8 failed:-110
>     mt7601u 3-14:1.0: Vendor request req:07 off:0734 failed:-110
>     mt7601u 3-14:1.0: Vendor request req:42 off:0230 failed:-110
>     mt7601u 3-14:1.0: probe with driver mt7601u failed with error -110
> 
> The failure occurs because mt7601u_load_firmware() unconditionally calls
> mt7601u_vendor_reset() (MT_VEND_DEV_MODE_RESET) before uploading firmware
> chunks. On these devices, issuing this vendor reset leaves the internal
> MCU / FCE DMA engine in an unresponsive state after the first firmware
> URB is submitted. As a result, reading MT_TX_CPU_FROM_FCE_CPU_DESC_IDX
> (0x09a8) immediately times out.
> 
> Introduce a boolean module parameter 'vnd_reset' (default: false) to
> make this vendor reset optional. When the vendor reset is skipped,
> firmware upload succeeds and the wireless interface initializes normally.
> 

Hi,

I don't think a new module parameter will be accepted.

You could just delete the vendor reset. The devices which currently work
with the vendor reset will probably still work without it:

https://lore.kernel.org/linux-wireless/62826d1d-9cef-4eff-b6c5-5ed11405a482@gmail.com/

> Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1716301
> Link: https://www.opena.tv/viewtopic.php?t=63919
> Link: https://askubuntu.com/questions/1418850/the-problem-with-wi-fi-u2
> Link: https://bbs.archlinux.org/viewtopic.php?id=224859
> Link: https://reddit.com/r/archlinux/comments/1d6dfv5/mt7601u_usb_wifi_not_working/
> Signed-off-by: Herman Semenoff <GermanAizek@aizekgroup.ru>
> ---
> This patch is based on linux-next (tag: next-20260904, commit af5f12805e5c)
> and targets the wireless-next tree.
> 
> Note: Alternatively, if maintainers prefer to avoid adding a module
> parameter and can confirm that mt7601u_vendor_reset() is not required
> on any supported hardware, the vendor reset call could instead be dropped
> entirely.
> 
>  drivers/net/wireless/mediatek/mt7601u/mcu.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt7601u/mcu.c
> b/drivers/net/wireless/mediatek/mt7601u/mcu.c
> index bad6ca821400..c7c5bd9bb9df 100644
> --- a/drivers/net/wireless/mediatek/mt7601u/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt7601u/mcu.c
> @@ -10,6 +10,7 @@
>  #include <linux/delay.h>
>  #include <linux/usb.h>
>  #include <linux/skbuff.h>
> +#include <linux/moduleparam.h>
> 
>  #include "mt7601u.h"
>  #include "dma.h"
> @@ -21,6 +22,10 @@
>  #define MCU_FW_URB_SIZE (MCU_FW_URB_MAX_PAYLOAD + 12)
>  #define MCU_RESP_URB_SIZE 1024
> 
> +static bool vnd_reset;
> +module_param(vnd_reset, bool, 0644);
> +MODULE_PARM_DESC(vnd_reset, "Perform vendor reset during firmware
> upload (default: false)");
> +
>  static inline int firmware_running(struct mt7601u_dev *dev)
>  {
>   return mt7601u_rr(dev, MT_MCU_COM_REG0) == 1;
> @@ -459,8 +464,10 @@ static int mt7601u_load_firmware(struct mt7601u_dev *dev)
>   mt7601u_wr(dev, 0x94c, 0);
>   mt7601u_wr(dev, MT_FCE_PSE_CTRL, 0);
> 
> - mt7601u_vendor_reset(dev);
> - msleep(5);
> + if (vnd_reset) {
> + mt7601u_vendor_reset(dev);
> + usleep_range(5000, 10000);
> + }
> 
>   mt7601u_wr(dev, 0xa44, 0);
>   mt7601u_wr(dev, 0x230, 0x84210);


  reply	other threads:[~2026-09-06 20:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-06 20:20 [PATCH wireless-next] wifi: mt7601u: add vnd_reset parameter to fix probe failure on Tenda U2 Herman Semenoff
2026-09-06 20:44 ` Bitterblue Smith [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-09-06 20:17 Herman Semenoff

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=e864365d-c9c5-4609-94b7-4ec4e3754136@gmail.com \
    --to=rtl8821cerfe2@gmail.com \
    --cc=germanaizek0@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /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 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.