fix(legacy-mcu1): preserve Bluetooth patches for product 0x8820

Keep the product-specific syscfg writes and restore all patch uploads, including patch configuration. Derive the syscfg condition from the current product readback without retaining a loader flag.

Update regression checks for full patch uploads on both products and syscfg write failures, and document the reported hardware results and remaining validation.
This commit is contained in:
Shen Mintao committed 2026-10-28 20:51:06 +08:00
1 parent 35d815c0ae
commit c79f1b9fec
5 files changed
+46 -35

No files matched your search

+21 -9
View File
@@ -3,14 +3,26 @@
Run `python3 tests/issue119-8820/test_loader.py` with a C compiler available.
The test extracts the actual system configuration, normal-mode upload branch,
and busy-connect guard and runs them against mocked USB requests. It checks
that alternating/reprobing M80 and regular D80 devices preserves each loader
sequence, retains the MCU1 cache fix, propagates configuration errors, and
rejects a new connect without overwriting an operation already in progress.
that both product `0x8820` and regular D80 devices upload the complete
adid/patch/extended-patch/patch-table/patch-config layer before starting FMAC.
Alternating and reprobed devices receive the extra syscfg writes only when
their current product readback is `0x8820`. The checks also retain the MCU1
cache fix, propagate read/cache/syscfg write errors, and reject a new connect
without overwriting an operation already in progress.
These checks do not establish hardware or Bluetooth compatibility. Issue #118
reports working Wi-Fi on one UGREEN `a69c:5723`, chip revision 7, MCU1 unit
with product `0x8820` and the branch's 327,037-byte V3 FMAC. Bluetooth pairing
and audio remain unverified. Product `0x8820` is not a rule to skip patches
on every MCU1 device, and the report does not establish that every device in
issue #79 works with this firmware.
The [hardware follow-up in PR #119](https://github.com/shenmintao/aic8800d80/pull/119#issuecomment-6468608942)
corrects the initial FMAC-only hypothesis from #118. On one UGREEN
`a69c:5723`, chip revision 7, MCU1, product `0x8820` unit running Ubuntu 26.04
and kernel `7.0.0-14-generic`, the two syscfg writes alone resolve the
`MM_START` timeout. Skipping the patch layer causes Bluetooth HCI Reset
(`0x0c03`) to time out; restoring all patch uploads, including patch config,
preserves Wi-Fi and restores controller initialization and LE discovery.
The firmware remains the branch's matched V3 set, including its 327,037-byte
FMAC.
The contributor tested the restored-patch variant, rather than this exact
follow-up commit. The cold-start sequence was replayed through USB
re-enumeration; physical unplug/replug, reboot of that variant, Bluetooth
pairing/audio, and other units remain unverified. These mocked checks do not
establish hardware compatibility or support for every device in issue #79.