This project will enable gPXE to use USB Ethernet Adapters. This includes,
- Adding USB support to gPXE.
- Writing a network device driver for an USB Ethernet Adapter.
Adding USB support to gPXE mainly has two parts.
- Support for the USB protocol itself.
- Write a device driver for a USB host controller.
- Write a USB device driver for a USB Ethernet card.
USB protocol support involves adding routines to create communication structures as defined by the protocol specification. Device drivers for actual USB devices shall use these routines to communicate with their devices. The USB protocol layer also handles USB device configuration which involves assigning addresses to devices and preparing them for use.
An USB host controller is a device, mostly available as a PCI card which talks to USB devices connected to it using instructions from the USB protocol layer. Two commonly used variants of USB Host Controllers exist. They are UHCI (Universal Host Controller Interface) supporting Full Speed (12Mbps) and Low Speed (1.5 Mbps) devices and EHCI (Enhanced Host Controller Interface) in addition to Full Speed and Low Speed devices, supports devices operating at 480 Mbps, called High Speed devices.
I propose to follow the Linux Kernel model here - to split the device driver into a generic driver and a device specific mini driver.
UCHI controller support will be done first. EHCI support is seen as a later (stretch ?) goal.
- USB protocol layer completed.
- USB host controller layer completed.
- USB NIC driver completed.
Here's a rough timeline.
- Write a PCI driver fpr UHCI controller. Write support for control and bulk urbs.
- Write a driver for dm9601 usb ethernet adapter. Factor out generic USB networking code out of dm9601 and write a pegasus usbnet driver.
- Clean up and sanitize the uhci source. This includes proper lifecycle management of urbs and correct error handling across all control paths.
- Write a PCI driver for EHCI controller along with schedule management code.
- Debugging, optimization etc.