]> git.ipfire.org Git - thirdparty/linux.git/commit
USB: serial: f81232: fix incomplete serial port generation
authorJi-Ze Hong (Peter Hong) <peter_hong@fintek.com.tw>
Fri, 12 Dec 2025 07:08:31 +0000 (15:08 +0800)
committerJohan Hovold <johan@kernel.org>
Tue, 13 Jan 2026 14:59:07 +0000 (15:59 +0100)
commitcd644b805da8a253198718741bf363c4c58862ff
tree9c31a2bf037c689b7a3b797d9f0470345572ac5d
parentc0afe95e62984ceea171c3ea319beaf84a21181c
USB: serial: f81232: fix incomplete serial port generation

The Fintek F81532A/534A/535/536 family relies on the
F81534A_CTRL_CMD_ENABLE_PORT (116h) register during initialization to
both determine serial port status and control port creation. If the
driver experiences fast load/unload cycles, the device state may becomes
unstable, resulting in the incomplete generation of serial ports.

Performing a dummy read operation on the register prior to the initial
write command resolves the issue. This clears the device's stale internal
state. Subsequent write operations will correctly generate all serial
ports.

This patch also removes the retry loop in f81534a_ctrl_set_register()
because the stale state has been fixed.

Tested on: HygonDM1SLT(Hygon C86 3250 8-core Processor)

Signed-off-by: Ji-Ze Hong (Peter Hong) <peter_hong@fintek.com.tw>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/f81232.c