diff options
| author | Crescent Hsieh <crescentcy.hsieh@moxa.com> | 2026-08-11 14:05:00 +0800 |
|---|---|---|
| committer | Johan Hovold <johan@kernel.org> | 2026-10-15 11:28:49 +0200 |
| commit | 83b54ef616b729a6100d418970246e58d10d163f (patch) | |
| tree | f043a12902fccab7ffaeb69f7e51ee5d929105df /include/linux/debugobjects.h | |
| parent | 296ebbfc856e25bf0f10af648b3fe899a381bfce (diff) | |
USB: serial: mxuport: handle SEND_NEXT transmit flow control
The device uses a per-port SEND_NEXT request and event to pace
host-to-device transmission. During burn-in testing, sustained writes
without waiting for this event resulted in per-port buffer overflows and
data errors. The issue can be reproduced on existing G1 devices as well.
The driver initiates the protocol by setting the SEND_NEXT bit in a
bulk-out header and then stops submitting data for that port. The
firmware reports a SEND_NEXT event when the corresponding per-port
buffer is empty, at which point the driver resumes transmission.
Track the payload placed in bulk-out transfers for each port and set the
request bit when it reaches bulk_out_size. Use the generic write control
callbacks to hold further submissions until the event arrives and to
roll back the payload count and hold state if usb_submit_urb() fails.
Use bulk_out_size as a common threshold for all device families instead
of encoding their firmware buffer sizes in the driver.
Signed-off-by: Crescent Hsieh <crescentcy.hsieh@moxa.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
