#1114482 mtk_t7xx fails to open AT and MBIM ports, drops packets on boot (Debian 13, kernel 6.12.41)

#1114482#5
Date:
2025-09-06 00:23:15 UTC
From:
To:
Dear Maintainer,

I am experiencing an issue with the `mtk_t7xx` driver on Debian 13 (Trixie)
using kernel 6.12.41+deb13-amd64, where the modem device fails to initialize
properly. The kernel logs report that the AT and MBIM ports are not opened, and
packets are being dropped:

[   10.332127] mtk_t7xx 0000:72:00.0: Port AT is not opened, drop packets
[   11.008331] mtk_t7xx 0000:72:00.0: Packet drop on channel 0x1004, port not
found
[   11.163449] mtk_t7xx 0000:72:00.0: Port MBIM is not opened, drop packets
[   38.845861] mtk_t7xx 0000:72:00.0: Port MBIM is not opened, drop packets
[   38.845897] mtk_t7xx 0000:72:00.0: Port AT is not opened, drop packets

This happens consistently at boot. The modem is detected, but the communication
ports remain closed, preventing any cellular connection via MBIM or AT
commands. The problem appears to be with port initialization in the driver.

**System details**:
- Debian GNU/Linux 13 (Trixie)
- Kernel: 6.12.41+deb13-amd64 (#1 SMP PREEMPT_DYNAMIC Debian 6.12.41-1, built
on 2025-08-12)
- Architecture: x86_64
- Affected driver: `mtk_t7xx`
- Affected hardware: MediaTek T7xx 5G modem (PCI device at 0000:72:00.0)

**Expected behavior**:
- Ports such as MBIM and AT should be initialized and usable after boot,
allowing modem control and WWAN connections.

**Additional context**:
- A similar bug has been observed on Ubuntu, where the AT port failed to open
at startup: https://bugs.launchpad.net/bugs/2049358
- There have also been related upstream issues and CVEs such as:
  - CVE-2024-39282: Fixes a race condition during driver shutdown
  - CVE-2024-35909: Fixes a misalignment bug on 64-bit systems
- This issue seems related to device/port registration logic within
`mtk_t7xx_pci_probe`.

Please let me know if further debugging, logs (full dmesg or lspci), or testing
patches would help. I would be happy to assist in reproducing or validating any
fixes.

Thank you for your work on Debian.

Best regards,

Enrique