summaryrefslogtreecommitdiff
path: root/src/etc/udev/rules.d/90-vyos-serial.rules
AgeCommit message (Collapse)Author
2026-04-08serial: T8211: refactor rule to reduce duplicationStephen Nothnagel
Store the PROGRAM output in a temporary .BY_BUS ENV variable, then reference it via %E{.BY_BUS} in the SYMLINK+= assignments. This collapses the three duplicated PROGRAM pipelines into a single invocation and removes the mixed usage of $result and %c. No functional change: tested on MosChip MCS7840 (2x 4-port chips, 8 ports total), FTDI FT4232H, and Sierra EM7455 -- all symlinks identical before and after, verified with udevadm test. Reduces duplication; refactor suggested by @copilot-pull-request-reviewer on PR #5113.
2026-04-06serial: T8211: fix symlink collisions for multi-port USB serial adaptersStephen Nothnagel
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.
2026-03-24T8410: Fix typos and mistakes for operational and configuration commandsViacheslav Hletenko
Fix typos and mistakes in the commands and comments No functional changes
2024-12-28udev: T6985: Fix udev rule to also register ttyACM serial devicesGrant Slater
2021-10-31console: udev: T3954: adjust rule script to new systemd-udev versionChristian Poessinger
We can no longer use bash veriable string code vor string manipulation. Move to a more robust "cut" implementation.
2021-08-21udev: T2490: fix substitution error reported by udevChristian Poessinger
2020-06-07udev: T2490: add persistent USB device filesChristian Poessinger
During testing it was discovered that on 5 out of 10 reboots the USB enumeration/mapping from physical port to /dev/ttyUSB is different. The root cause is that it's a FIFO so first found/loaded driver module will be assigned ttyUSB0. This mixed up the serial interfaces of my FTDI chips and my connected Sierra Wireless MC7710 card which was no longer functioning as it now was mapped to a different USB interface. The solution is a udev rule which persistently maps the USB-tree-device to a device file in /dev. Wait? isn't this what /dev/serial/by-{id,path} is for? Correct, it does the very same thing but the problem is as follows: * by-path uses device file names which also incorporate the parent bus system, this results in "pci-0000:00:10.0-usb-0:2.4:1.0-port0" * by-id will overwrite the assigned device symlink if a new USB device with the same name appears. This happens to some FTDI devices with no serial number programmed so the device added last wins and will be the only one in the by-id folder - cruel world! This commit adds a new directory /dev/serial/by-bus which holds the following device files (as example): $ ls -1 /dev/serial/by-bus/ usb0b1.3p1.0 usb0b1.3p1.2 usb0b1.3p1.3 usb0b2.4p1.0 usb0b2.4p1.1 usb0b2.4p1.2 usb0b2.4p1.3