Skip to content

serial: T8211: fix symlink collisions for multi-port USB serial adapters#5113

Open
srnoth wants to merge 1 commit intovyos:currentfrom
srnoth:T8211-multiport-serial-symlinks
Open

serial: T8211: fix symlink collisions for multi-port USB serial adapters#5113
srnoth wants to merge 1 commit intovyos:currentfrom
srnoth:T8211-multiport-serial-symlinks

Conversation

@srnoth
Copy link
Copy Markdown

@srnoth srnoth commented Apr 6, 2026

Change summary

Multi-port USB serial adapters where all ports share the same USB
ID_PATH (e.g., MosChip MCS7840) create identical symlink names in
/dev/serial/by-bus/, so only the last-enumerated port is accessible.

The existing udev rule captures .ID_PORT but never includes it in the
symlink name. This splits the catch-all .ID_PORT rule into two cases:

  • Port 0: keeps the base symlink name (backward compatible)
  • Port 1+: appends pN suffix following the existing naming scheme

Adapters where each port is a separate USB interface with a unique
ID_PATH (e.g., FTDI FT4232H) and single-port devices are unaffected.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

N/A

How to test / Smoketest result

Tested on VyOS 2026.02 (circinus) with:

  • MosChip MCS7840 8-port adapter (2× 4-port chips)
  • FTDI FT4232H 4-port adapter
  • Single-port USB serial adapters

Before (MCS7840 — only 1 symlink per 4-port chip):

usb0b1.4.1p1.0 -> ../../ttyUSB7
usb0b1.4.2p1.0 -> ../../ttyUSB11

After (all 8 ports visible):

usb0b1.4.1p1.0   -> ../../ttyUSB6
usb0b1.4.1p1.0p1 -> ../../ttyUSB7
usb0b1.4.1p1.0p2 -> ../../ttyUSB8
usb0b1.4.1p1.0p3 -> ../../ttyUSB9
usb0b1.4.2p1.0   -> ../../ttyUSB11
usb0b1.4.2p1.0p1 -> ../../ttyUSB12
usb0b1.4.2p1.0p2 -> ../../ttyUSB13
usb0b1.4.2p1.0p3 -> ../../ttyUSB14

FTDI FT4232H and single-port devices unchanged. No applicable smoketest exists for udev rules.

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

Multi-port USB serial adapters (e.g., MosChip MCS7840) where all ports
share the same USB ID_PATH create identical symlink names in
/dev/serial/by-bus/, causing only the last-enumerated port to be
accessible.

Split the existing catch-all rule for devices with .ID_PORT into two
cases:
- Port 0: keeps the base symlink name (backward compatible)
- Port 1+: appends pN suffix (e.g., usb0b1.4.1p1.0p1)

Devices where each port has a unique ID_PATH (e.g., FTDI FT4232H) and
single-port devices are unaffected.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

👍
No issues in PR Title / Commit Title

@srnoth srnoth marked this pull request as ready for review April 6, 2026 19:19
@srnoth
Copy link
Copy Markdown
Author

srnoth commented Apr 6, 2026

I have read the CLA Document and I hereby sign the CLA

vyosbot added a commit to vyos/vyos-cla-signatures that referenced this pull request Apr 6, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

CI integration ❌ failed!

Details

CI logs

  • CLI Smoketests 👍 passed
  • CLI Smoketests (interfaces only) ❌ failed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • CLI Smoketests VPP 👍 passed
  • Config tests VPP 👍 passed
  • TPM tests 👍 passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant