Search Linux Wireless

Re: [RESEND. PATCH] drivers/mediatek: Fix some mt7601u vendor could not connect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux