Skip to content

Replace YT6801 DKMS driver with upstream support - #9682

Draft
AFOliveira wants to merge 2 commits into
omacom:quattrofrom
AFOliveira:codex/replace-yt6801-dkms
Draft

Replace YT6801 DKMS driver with upstream support#9682
AFOliveira wants to merge 2 commits into
omacom:quattrofrom
AFOliveira:codex/replace-yt6801-dkms

Conversation

@AFOliveira

Copy link
Copy Markdown
Contributor

What

  • Stop installing the out-of-tree yt6801-dkms package for Motorcomm 1f0a:6801 adapters.
  • Add a retry-safe migration that verifies the running kernel's exact PCI alias, loads the signed in-tree dwmac-motorcomm driver, removes the vendor package, reprobes the device, and verifies the final binding.
  • Keep fresh-install hardware setup independent of the live ISO kernel.
  • Add focused regression coverage for package removal and the booted-system cutover.

Why

The vendor driver exposes a user-reachable private ioctl command interface with unsafe buffer handling and privileged hardware controls. Current Omarchy kernels already ship an in-tree driver with the exact YT6801 PCI alias, so the safest default is to remove the external driver entirely.

Verification

  • bash test/shell.d/yt6801-driver-test.sh
  • bash -n install/hardware/fix-yt6801-ethernet-adapter.sh migrations/1788279117.sh test/shell.d/yt6801-driver-test.sh
  • git diff --check
  • Verified the running Arch 7.1.9 dwmac-motorcomm module has the exact 1f0a:6801 alias, is in-tree, and is signed.

Deployment

The migration fails clearly and remains retryable when the booted kernel does not yet contain the replacement alias. A reboot into the latest Omarchy kernel is then required before rerunning migration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The migration cannot recover an unbound device when rerun after the vendor module has already been unloaded.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Replaces the vulnerable YT6801 DKMS driver with upstream kernel support.

Changes:

  • Removes yt6801-dkms from installation.
  • Adds hardware cleanup and migration logic.
  • Adds focused shell regression coverage.
File summaries
File Description
install/omarchy-other.packages Removes the DKMS package.
install/hardware/fix-yt6801-ethernet-adapter.sh Removes legacy drivers without loading modules.
migrations/1788279117.sh Performs the live driver cutover.
test/shell.d/yt6801-driver-test.sh Tests installation and migration behavior.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread migrations/1788279117.sh Outdated
Comment on lines +27 to +33
if lsmod | awk '$1 == "yt6801" { found = 1 } END { exit !found }'; then
sudo modprobe -r yt6801

for device in "${yt6801_devices[@]}"; do
printf '%s\n' "$device" | sudo tee /sys/bus/pci/drivers_probe >/dev/null
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants