Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UsbBusDxe: Add quirk for Framework Ethernet Expansion Card #6526

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JohnAZoidberg
Copy link
Contributor

Description

The Framework Ethernet Expansion card uses an Realtek 8156 chip. It has a device descriptor with three configurations:

  • Vendor Specific
  • CDC NCM
  • CDC ECM

The default configuration cannot be used by drivers available in EDK2, so we must change it.
FreeBSD used to have the same quirk before they implemented a custom driver for Realtek adapters:
freebsd/freebsd-src@6ea4d95

Realtek provides a proprietary UEFI driver, but with this change, the open source EDK2 driver also works.

  • Breaking change?
    • Breaking change - Does this PR cause a break in build or boot behavior?
    • Examples: Does it add a new library class or move a module to a different repo.
  • Impacts security?
    • Security - Does this PR have a direct security impact?
    • Examples: Crypto algorithm change or buffer overflow fix.
  • Includes tests?
    • Tests - Does this PR include any explicit test code?
    • Examples: Unit tests or integration tests.

How This Was Tested

Selecting configuration 1 results in

drivers
8A 00000001 D - - 1 - USB NCM Driver UsbCdcNcm
Selecting configuration 2 results in
drivers
89 00000001 D - - 1 - USB ECM Driver UsbCdcEcm

Both of them can work with iPXE/netboot.xyz

Tested in QEMU/OVMF by passing the USB device through.

sudo qemu-system-x86_64 -bios Build/OvmfX64/DEBUG_GCC5/FV/OVMF.fd -m 4G
-device qemu-xhci,id=xhci -device usb-host,bus=xhci.0,vendorid=0x0bda,productid=0x8156
-nic none
-cdrom netboot.xyz.iso

The Framework Ethernet Expansion card uses an Realtek 8156 chip.
It has a device descriptor with three configurations:

- Vendor Specific
- CDC NCM
- CDC ECM

The default configuration cannot be used by drivers available in EDK2,
so we must change it.
FreeBSD used to have the same quirk before they implemented a custom
driver for Realtek adapters:
freebsd/freebsd-src@6ea4d95

Realtek provides a proprietary UEFI driver, but with this change, the
open source EDK2 driver also works.

Selecting configuration 1 results in
> drivers
8A 00000001 D - -  1  - USB NCM Driver                      UsbCdcNcm
Selecting configuration 2 results in
> drivers
89 00000001 D - -  1  - USB ECM Driver                      UsbCdcEcm

Both of them can work with iPXE/netboot.xyz

Tested in QEMU/OVMF by passing the USB device through.

> sudo qemu-system-x86_64 -bios Build/OvmfX64/DEBUG_GCC5/FV/OVMF.fd -m 4G \
  -device qemu-xhci,id=xhci -device usb-host,bus=xhci.0,vendorid=0x0bda,productid=0x8156 \
  -nic none \
  -cdrom netboot.xyz.iso

Signed-off-by: Daniel Schaefer <[email protected]>
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.

1 participant