Skip to content

Fix ChibiOS virtual serial short packet receive - #26356

Open
giri256 wants to merge 1 commit into
qmk:developfrom
giri256:fix/virtser-recv-short-packets-26326
Open

Fix ChibiOS virtual serial short packet receive#26356
giri256 wants to merge 1 commit into
qmk:developfrom
giri256:fix/virtser-recv-short-packets-26326

Conversation

@giri256

@giri256 giri256 commented Jul 23, 2026

Copy link
Copy Markdown

Description

ChibiOS virtual serial currently asks the USB OUT queue for a full CDC_EPSIZE buffer. The queue copies short CDC packets into that buffer, but the existing boolean receive helper returns false unless the requested size was filled exactly. As a result, normal short host writes are consumed and silently discarded before virtser_recv() is called.

This change adds a byte-count receive helper and keeps the existing exact-size boolean wrapper for Raw HID and MIDI. virtser_task() now dispatches exactly the bytes that were received, matching the LUFA implementation.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Verification

  • Formatted the touched files with QMK's repository .clang-format configuration.
  • git diff --check passes.
  • Confirmed Raw HID and MIDI retain exact-size receive behavior through the existing wrapper.
  • Confirmed the new virtual-serial path processes only the byte count returned by the ChibiOS input queue.

The first-time QMK container image pull stalled locally, so the authoritative ChibiOS compile result is left to upstream CI.

Signed-off-by: Giridhar <giridharpavan593@gmail.com>
@github-actions github-actions Bot added the core label Jul 23, 2026
@zvecr
zvecr changed the base branch from master to develop July 23, 2026 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] virtser_recv appears inoperative

1 participant