linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND. PATCH] drivers/mediatek: Fix some mt7601u vendor could not connect
@ 2024-07-15  9:47 WangYuli
  2024-07-15 13:54 ` Jakub Kicinski
  0 siblings, 1 reply; 5+ messages in thread
From: WangYuli @ 2024-07-15  9:47 UTC (permalink / raw)
  To: kuba, kvalo, matthias.bgg, angelogioacchino.delregno, guanwentao,
	sergio.it.consultant, nbd, lorenzo, shayne.chen, deren.wu,
	mingyen.hsieh, chui-hao.chiu
  Cc: linux-wireless, linux-kernel, linux-arm-kernel, linux-mediatek,
	WangYuli

Some mt7601 devices cannot establish a connection properly.
This patch fixes the issue.
We do not know why, but it just works.

Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1716301/comments/52
Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1716301/comments/53
Link: https://github.com/kuba-moo/mt7601u/issues/64
Link: https://www.mediatek.com/products/broadband-wifi/mt7601u
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
---
 drivers/net/wireless/mediatek/mt7601u/mcu.c | 1 -
 drivers/net/wireless/mediatek/mt7601u/phy.c | 5 -----
 2 files changed, 6 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt7601u/mcu.c b/drivers/net/wireless/mediatek/mt7601u/mcu.c
index 1b5cc271a9e1..15751d11b4dc 100644
--- a/drivers/net/wireless/mediatek/mt7601u/mcu.c
+++ b/drivers/net/wireless/mediatek/mt7601u/mcu.c
@@ -446,7 +446,6 @@ 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);
 
 	mt7601u_wr(dev, 0xa44, 0);
diff --git a/drivers/net/wireless/mediatek/mt7601u/phy.c b/drivers/net/wireless/mediatek/mt7601u/phy.c
index d4cd2215aba9..f3c14a1552df 100644
--- a/drivers/net/wireless/mediatek/mt7601u/phy.c
+++ b/drivers/net/wireless/mediatek/mt7601u/phy.c
@@ -589,8 +589,6 @@ void mt7601u_phy_recalibrate_after_assoc(struct mt7601u_dev *dev)
 	if (test_bit(MT7601U_STATE_REMOVED, &dev->state))
 		return;
 
-	mt7601u_mcu_calibrate(dev, MCU_CAL_DPD, dev->curr_temp);
-
 	mt7601u_rxdc_cal(dev);
 }
 
@@ -1160,9 +1158,6 @@ static int mt7601u_init_cal(struct mt7601u_dev *dev)
 	if (ret)
 		return ret;
 	ret = mt7601u_mcu_calibrate(dev, MCU_CAL_RXIQ, 0);
-	if (ret)
-		return ret;
-	ret = mt7601u_mcu_calibrate(dev, MCU_CAL_DPD, dev->dpd_temp);
 	if (ret)
 		return ret;
 
-- 
2.43.4


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

* Re: [RESEND. PATCH] drivers/mediatek: Fix some mt7601u vendor could not connect
  2024-07-15  9:47 [RESEND. PATCH] drivers/mediatek: Fix some mt7601u vendor could not connect WangYuli
@ 2024-07-15 13:54 ` Jakub Kicinski
  2025-01-09 22:42   ` Bitterblue Smith
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2024-07-15 13:54 UTC (permalink / raw)
  To: WangYuli
  Cc: kvalo, matthias.bgg, angelogioacchino.delregno, guanwentao,
	sergio.it.consultant, nbd, lorenzo, shayne.chen, deren.wu,
	mingyen.hsieh, chui-hao.chiu, linux-wireless, linux-kernel,
	linux-arm-kernel, linux-mediatek

On Mon, 15 Jul 2024 17:47:14 +0800 WangYuli wrote:
> Some mt7601 devices cannot establish a connection properly.
> This patch fixes the issue.
> We do not know why, but it just works.

Any chance we can gate this on the version of EEPROM or chip or
something else? It'd be good to avoid regressions on older devices.
Or possibly - could we issue the MCU command as a test and disable
the calibration if it fails?

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

* Re: [RESEND. PATCH] drivers/mediatek: Fix some mt7601u vendor could not connect
  2024-07-15 13:54 ` Jakub Kicinski
@ 2025-01-09 22:42   ` Bitterblue Smith
  2025-01-15 15:51     ` Bitterblue Smith
  0 siblings, 1 reply; 5+ messages in thread
From: Bitterblue Smith @ 2025-01-09 22:42 UTC (permalink / raw)
  To: Jakub Kicinski, WangYuli; +Cc: guanwentao, linux-wireless

On 15/07/2024 16:54, Jakub Kicinski wrote:
> On Mon, 15 Jul 2024 17:47:14 +0800 WangYuli wrote:
>> Some mt7601 devices cannot establish a connection properly.
>> This patch fixes the issue.
>> We do not know why, but it just works.
> 
> Any chance we can gate this on the version of EEPROM or chip or
> something else? It'd be good to avoid regressions on older devices.
> Or possibly - could we issue the MCU command as a test and disable
> the calibration if it fails?

(Removed some people and lists from CC because they seemed
unnecessary.)

Hi Jakub,

I have Tenda W311MI2 which works with vanilla mt7601u, and a no-name
"free driver" device from Aliexpress which doesn't. They have the
same USB IDs.

The Tenda:

Jan 09 22:39:40 ideapad2 kernel: mt7601u 1-2:1.0: ASIC revision: 76010001 MAC revision: 76010500                
Jan 09 22:39:40 ideapad2 kernel: mt7601u 1-2:1.0: Firmware Version: 0.1.00 Build: 7640 Build time: 201302052146____
Jan 09 22:39:40 ideapad2 kernel: mt7601u 1-2:1.0: EEPROM ver:0d fae:00                                                                                                     

00000000: 01 76 00 0d 50 2b 73 e8 19 76 ff ff ff ff ff ff  .v..P+s..v......
00000010: 01 02 8f 14 01 76 00 00 4a 00 01 00 80 50 08 00  .....v..J....P..
00000020: 03 00 02 00 00 00 ff 01 40 60 80 ff ff ff ff ff  ........@`......
00000030: ff ff ff ff 11 ff 04 28 ff ff 78 01 ff ff 99 99  .......(..x.....
00000040: 8c 88 ff 07 08 00 00 00 00 00 00 00 00 00 00 00  ................
00000050: 00 00 1b 1b 1b 1b 1b 1b 1c 1c 1c 1c 1c 1c 1c 1c  ................
00000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff 80 00  ................
00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
00000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
000000a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
000000b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
000000c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
000000d0: 20 f9 00 00 00 00 00 00 00 00 00 00 00 00 05 05   ...............
000000e0: 03 03 04 00 00 00 02 00 00 00 02 00 00 00 02 00  ................
000000f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................

The no-name:

Jan 09 21:50:34 ideapad2 kernel: mt7601u 1-4:1.0: ASIC revision: 76010001 MAC revision: 76010500                                                
Jan 09 21:50:34 ideapad2 kernel: mt7601u 1-4:1.0: EEPROM ver:0d fae:00                                                                                                     

00000000: 01 76 00 0d 00 50 11 00 5b 9b ff ff ff ff ff ff  .v...P..[.......
00000010: 01 02 8f 14 01 76 00 00 4a 00 01 00 80 50 08 00  .....v..J....P..
00000020: 03 00 02 00 00 00 ff 01 40 60 80 ff ff ff ff ff  ........@`......
00000030: ff ff ff ff 11 ff 04 10 ff ff 82 01 ff ff 99 99  ................
00000040: 8c 88 ff 07 08 00 00 00 00 00 00 00 00 00 00 00  ................
00000050: 00 00 05 05 05 04 04 04 05 05 06 06 07 07 07 07  ................
00000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff 80 00  ................
00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
00000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
000000a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
000000b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
000000c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
000000d0: 1e f9 00 00 00 00 00 00 00 00 00 00 00 00 05 05  ................
000000e0: 03 03 04 00 00 00 02 00 00 00 02 00 00 00 02 00  ................
000000f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................

The no-name device seems to die after uploading the third chunk of
the firmware:

Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Firmware Version: 0.1.00 Build: 7640 Build time: 201302052146____
Jan 09 16:48:43 ideapad2 kernel: __mt7601u_dma_fw:327 len 14336 dst_addr 64
Jan 09 16:48:43 ideapad2 kernel: __mt7601u_dma_fw:327 len 14336 dst_addr 14400
Jan 09 16:48:43 ideapad2 kernel: __mt7601u_dma_fw:327 len 14336 dst_addr 28736
Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:07 off:09a8 failed:-110
Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:02 off:09a8 failed:-110
Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:07 off:0734 failed:-110
Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:42 off:0230 failed:-110
Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:07 off:0080 failed:-110
Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:02 off:0080 failed:-110
Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:02 off:0080 failed:-110
Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: probe with driver mt7601u failed with error -110

Removing the call to mt7601u_vendor_reset() fixes that problem.
The firmware uploads, the device connects to my network. The
Tenda still works. The driver included in Windows 10 doesn't do
that reset with either device.

At first I tried with len=8192 because that's what the Windows
driver does but it didn't help.

After fixing the firmware upload, I had some USB disconnects with
the no-name device. They were kind of random. Now I'm testing it
with those two MCU_CAL_DPD removed. The Windows driver doesn't
seem to use MCU_CAL_DPD with the Tenda. I didn't check with the
other one.

I hope this helps.

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

* Re: [RESEND. PATCH] drivers/mediatek: Fix some mt7601u vendor could not connect
  2025-01-09 22:42   ` Bitterblue Smith
@ 2025-01-15 15:51     ` Bitterblue Smith
  2025-01-20 19:42       ` Bitterblue Smith
  0 siblings, 1 reply; 5+ messages in thread
From: Bitterblue Smith @ 2025-01-15 15:51 UTC (permalink / raw)
  To: Jakub Kicinski, WangYuli; +Cc: guanwentao, linux-wireless

On 10/01/2025 00:42, Bitterblue Smith wrote:
> On 15/07/2024 16:54, Jakub Kicinski wrote:
>> On Mon, 15 Jul 2024 17:47:14 +0800 WangYuli wrote:
>>> Some mt7601 devices cannot establish a connection properly.
>>> This patch fixes the issue.
>>> We do not know why, but it just works.
>>
>> Any chance we can gate this on the version of EEPROM or chip or
>> something else? It'd be good to avoid regressions on older devices.
>> Or possibly - could we issue the MCU command as a test and disable
>> the calibration if it fails?
> 
> (Removed some people and lists from CC because they seemed
> unnecessary.)
> 
> Hi Jakub,
> 
> I have Tenda W311MI2 which works with vanilla mt7601u, and a no-name
> "free driver" device from Aliexpress which doesn't. They have the
> same USB IDs.
> 
> The Tenda:
> 
> Jan 09 22:39:40 ideapad2 kernel: mt7601u 1-2:1.0: ASIC revision: 76010001 MAC revision: 76010500                
> Jan 09 22:39:40 ideapad2 kernel: mt7601u 1-2:1.0: Firmware Version: 0.1.00 Build: 7640 Build time: 201302052146____
> Jan 09 22:39:40 ideapad2 kernel: mt7601u 1-2:1.0: EEPROM ver:0d fae:00                                                                                                     
> 
> 00000000: 01 76 00 0d 50 2b 73 e8 19 76 ff ff ff ff ff ff  .v..P+s..v......
> 00000010: 01 02 8f 14 01 76 00 00 4a 00 01 00 80 50 08 00  .....v..J....P..
> 00000020: 03 00 02 00 00 00 ff 01 40 60 80 ff ff ff ff ff  ........@`......
> 00000030: ff ff ff ff 11 ff 04 28 ff ff 78 01 ff ff 99 99  .......(..x.....
> 00000040: 8c 88 ff 07 08 00 00 00 00 00 00 00 00 00 00 00  ................
> 00000050: 00 00 1b 1b 1b 1b 1b 1b 1c 1c 1c 1c 1c 1c 1c 1c  ................
> 00000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff 80 00  ................
> 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> 00000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 00000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 000000a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 000000b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 000000c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 000000d0: 20 f9 00 00 00 00 00 00 00 00 00 00 00 00 05 05   ...............
> 000000e0: 03 03 04 00 00 00 02 00 00 00 02 00 00 00 02 00  ................
> 000000f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 
> The no-name:
> 
> Jan 09 21:50:34 ideapad2 kernel: mt7601u 1-4:1.0: ASIC revision: 76010001 MAC revision: 76010500                                                
> Jan 09 21:50:34 ideapad2 kernel: mt7601u 1-4:1.0: EEPROM ver:0d fae:00                                                                                                     
> 
> 00000000: 01 76 00 0d 00 50 11 00 5b 9b ff ff ff ff ff ff  .v...P..[.......
> 00000010: 01 02 8f 14 01 76 00 00 4a 00 01 00 80 50 08 00  .....v..J....P..
> 00000020: 03 00 02 00 00 00 ff 01 40 60 80 ff ff ff ff ff  ........@`......
> 00000030: ff ff ff ff 11 ff 04 10 ff ff 82 01 ff ff 99 99  ................
> 00000040: 8c 88 ff 07 08 00 00 00 00 00 00 00 00 00 00 00  ................
> 00000050: 00 00 05 05 05 04 04 04 05 05 06 06 07 07 07 07  ................
> 00000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff 80 00  ................
> 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> 00000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 00000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 000000a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 000000b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 000000c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 000000d0: 1e f9 00 00 00 00 00 00 00 00 00 00 00 00 05 05  ................
> 000000e0: 03 03 04 00 00 00 02 00 00 00 02 00 00 00 02 00  ................
> 000000f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 
> The no-name device seems to die after uploading the third chunk of
> the firmware:
> 
> Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Firmware Version: 0.1.00 Build: 7640 Build time: 201302052146____
> Jan 09 16:48:43 ideapad2 kernel: __mt7601u_dma_fw:327 len 14336 dst_addr 64
> Jan 09 16:48:43 ideapad2 kernel: __mt7601u_dma_fw:327 len 14336 dst_addr 14400
> Jan 09 16:48:43 ideapad2 kernel: __mt7601u_dma_fw:327 len 14336 dst_addr 28736
> Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:07 off:09a8 failed:-110
> Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:02 off:09a8 failed:-110
> Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:07 off:0734 failed:-110
> Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:42 off:0230 failed:-110
> Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:07 off:0080 failed:-110
> Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:02 off:0080 failed:-110
> Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:02 off:0080 failed:-110
> Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: probe with driver mt7601u failed with error -110
> 
> Removing the call to mt7601u_vendor_reset() fixes that problem.
> The firmware uploads, the device connects to my network. The
> Tenda still works. The driver included in Windows 10 doesn't do
> that reset with either device.
> 
> At first I tried with len=8192 because that's what the Windows
> driver does but it didn't help.
> 
> After fixing the firmware upload, I had some USB disconnects with
> the no-name device. They were kind of random. Now I'm testing it
> with those two MCU_CAL_DPD removed. The Windows driver doesn't
> seem to use MCU_CAL_DPD with the Tenda. I didn't check with the
> other one.
> 
> I hope this helps.

So after using the no-name device some more, I can say that only
the mt7601u_vendor_reset() needs to be removed to make this device
work.

The USB disconnects only happen in one port, no idea why. They
happen with or without the MCU_CAL_DPD.

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

* Re: [RESEND. PATCH] drivers/mediatek: Fix some mt7601u vendor could not connect
  2025-01-15 15:51     ` Bitterblue Smith
@ 2025-01-20 19:42       ` Bitterblue Smith
  0 siblings, 0 replies; 5+ messages in thread
From: Bitterblue Smith @ 2025-01-20 19:42 UTC (permalink / raw)
  To: Jakub Kicinski, WangYuli; +Cc: guanwentao, linux-wireless

On 15/01/2025 17:51, Bitterblue Smith wrote:
> On 10/01/2025 00:42, Bitterblue Smith wrote:
>> On 15/07/2024 16:54, Jakub Kicinski wrote:
>>> On Mon, 15 Jul 2024 17:47:14 +0800 WangYuli wrote:
>>>> Some mt7601 devices cannot establish a connection properly.
>>>> This patch fixes the issue.
>>>> We do not know why, but it just works.
>>>
>>> Any chance we can gate this on the version of EEPROM or chip or
>>> something else? It'd be good to avoid regressions on older devices.
>>> Or possibly - could we issue the MCU command as a test and disable
>>> the calibration if it fails?
>>
>> (Removed some people and lists from CC because they seemed
>> unnecessary.)
>>
>> Hi Jakub,
>>
>> I have Tenda W311MI2 which works with vanilla mt7601u, and a no-name
>> "free driver" device from Aliexpress which doesn't. They have the
>> same USB IDs.
>>
>> The Tenda:
>>
>> Jan 09 22:39:40 ideapad2 kernel: mt7601u 1-2:1.0: ASIC revision: 76010001 MAC revision: 76010500                
>> Jan 09 22:39:40 ideapad2 kernel: mt7601u 1-2:1.0: Firmware Version: 0.1.00 Build: 7640 Build time: 201302052146____
>> Jan 09 22:39:40 ideapad2 kernel: mt7601u 1-2:1.0: EEPROM ver:0d fae:00                                                                                                     
>>
>> 00000000: 01 76 00 0d 50 2b 73 e8 19 76 ff ff ff ff ff ff  .v..P+s..v......
>> 00000010: 01 02 8f 14 01 76 00 00 4a 00 01 00 80 50 08 00  .....v..J....P..
>> 00000020: 03 00 02 00 00 00 ff 01 40 60 80 ff ff ff ff ff  ........@`......
>> 00000030: ff ff ff ff 11 ff 04 28 ff ff 78 01 ff ff 99 99  .......(..x.....
>> 00000040: 8c 88 ff 07 08 00 00 00 00 00 00 00 00 00 00 00  ................
>> 00000050: 00 00 1b 1b 1b 1b 1b 1b 1c 1c 1c 1c 1c 1c 1c 1c  ................
>> 00000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff 80 00  ................
>> 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>> 00000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
>> 00000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
>> 000000a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
>> 000000b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
>> 000000c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
>> 000000d0: 20 f9 00 00 00 00 00 00 00 00 00 00 00 00 05 05   ...............
>> 000000e0: 03 03 04 00 00 00 02 00 00 00 02 00 00 00 02 00  ................
>> 000000f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
>>
>> The no-name:
>>
>> Jan 09 21:50:34 ideapad2 kernel: mt7601u 1-4:1.0: ASIC revision: 76010001 MAC revision: 76010500                                                
>> Jan 09 21:50:34 ideapad2 kernel: mt7601u 1-4:1.0: EEPROM ver:0d fae:00                                                                                                     
>>
>> 00000000: 01 76 00 0d 00 50 11 00 5b 9b ff ff ff ff ff ff  .v...P..[.......
>> 00000010: 01 02 8f 14 01 76 00 00 4a 00 01 00 80 50 08 00  .....v..J....P..
>> 00000020: 03 00 02 00 00 00 ff 01 40 60 80 ff ff ff ff ff  ........@`......
>> 00000030: ff ff ff ff 11 ff 04 10 ff ff 82 01 ff ff 99 99  ................
>> 00000040: 8c 88 ff 07 08 00 00 00 00 00 00 00 00 00 00 00  ................
>> 00000050: 00 00 05 05 05 04 04 04 05 05 06 06 07 07 07 07  ................
>> 00000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff 80 00  ................
>> 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>> 00000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
>> 00000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
>> 000000a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
>> 000000b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
>> 000000c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
>> 000000d0: 1e f9 00 00 00 00 00 00 00 00 00 00 00 00 05 05  ................
>> 000000e0: 03 03 04 00 00 00 02 00 00 00 02 00 00 00 02 00  ................
>> 000000f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
>>
>> The no-name device seems to die after uploading the third chunk of
>> the firmware:
>>
>> Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Firmware Version: 0.1.00 Build: 7640 Build time: 201302052146____
>> Jan 09 16:48:43 ideapad2 kernel: __mt7601u_dma_fw:327 len 14336 dst_addr 64
>> Jan 09 16:48:43 ideapad2 kernel: __mt7601u_dma_fw:327 len 14336 dst_addr 14400
>> Jan 09 16:48:43 ideapad2 kernel: __mt7601u_dma_fw:327 len 14336 dst_addr 28736
>> Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:07 off:09a8 failed:-110
>> Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:02 off:09a8 failed:-110
>> Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:07 off:0734 failed:-110
>> Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:42 off:0230 failed:-110
>> Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:07 off:0080 failed:-110
>> Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:02 off:0080 failed:-110
>> Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: Vendor request req:02 off:0080 failed:-110
>> Jan 09 16:48:43 ideapad2 kernel: mt7601u 1-4:1.0: probe with driver mt7601u failed with error -110
>>
>> Removing the call to mt7601u_vendor_reset() fixes that problem.
>> The firmware uploads, the device connects to my network. The
>> Tenda still works. The driver included in Windows 10 doesn't do
>> that reset with either device.
>>
>> At first I tried with len=8192 because that's what the Windows
>> driver does but it didn't help.
>>
>> After fixing the firmware upload, I had some USB disconnects with
>> the no-name device. They were kind of random. Now I'm testing it
>> with those two MCU_CAL_DPD removed. The Windows driver doesn't
>> seem to use MCU_CAL_DPD with the Tenda. I didn't check with the
>> other one.
>>
>> I hope this helps.
> 
> So after using the no-name device some more, I can say that only
> the mt7601u_vendor_reset() needs to be removed to make this device
> work.
> 
> The USB disconnects only happen in one port, no idea why. They
> happen with or without the MCU_CAL_DPD.

I pulled it apart and disconnected pins 9, 10, and 25 (the CHIP_MODE
pins) according to the advice found here:
https://github.com/openwrt/mt76/issues/393#issuecomment-1092754717

Now the CDROM mode is gone and the device works with unpatched
mt7601u.

So I guess you can make it call mt7601u_vendor_reset() only when
the device doesn't have the CDROM mode... if there is a way for
mt7601u to know this.

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

end of thread, other threads:[~2025-01-20 19:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-15  9:47 [RESEND. PATCH] drivers/mediatek: Fix some mt7601u vendor could not connect WangYuli
2024-07-15 13:54 ` Jakub Kicinski
2025-01-09 22:42   ` Bitterblue Smith
2025-01-15 15:51     ` Bitterblue Smith
2025-01-20 19:42       ` Bitterblue Smith

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).