- Extended USB callback definition to support different event types sent from
device to HC. Currently we only have the two events "async completion" and
"remote wakeup".
- Implemented event handlers in the UHCI, OHCI and EHCI. For the EHCI version
we currently have no test case.
- The external USB hub now uses this feature at device connect/disconnect.
Now the device change on the hub is correctly detected by the guest OS.
- TODO #1: remote wakeup and async completion for the xHCI.
- TODO #2: event handler for the external hub to make a USB device work on
a chain of hubs.
- TODO #3: the event handler possibly could be used for the packet copy code.
- use get_dwords() and put_dwords() from EHCI sources for reading / writing
xHCI data structures as dword array. This fixes some endianness issues.
- simplified copying data from / to data structures since we can now use the
dword array with the correct byte order directly.
- fixed all remaining "strict-aliasing" GCC warnings.
configuration, get/set status, get descriptor) to the base class to reduce code
duplication. The device calls the common handle_control() method and then it
processes unhandled requests in it's specific code. (similar to Qemu).
- USB xHCI NAK handling fix by Ben. Now openSUSE 13.2 boots without hang with
hub connected to an xHCI port.
- Updated Ben's email address and year in some copyright headers.
- Get rid of device_buffer and use packet init / cleanup functions.
- Read immediate data from memory location instead of possibly byte-swapped
TRB parameter.
- Moved UHCI async packet functions to usb_common.h for using then on both
UHCI and OHCI.
- Modified OHCI packet handling based on the UHCI implementation.
- Renamed EHCI helper function to avoid conflicts.
- TODO: async packet support on xHCI.
- Added missing queue handling code for init, reset and device disconnect.
- Added EHCI status access methods for async and periodic state.
- Added a lot of comments (mostly from the original EHCI core code).
- UFI/CBI floppy: bus-powered, no remote wakeup
- HID (mouse, tablet, keypad): bus-powered, remote wakeup
- MSD (disk, cdrom), printer: self-powered, no remote wakeup
TODO: Remote wakeup is not yet implemented. A device should be able to resume
it's upstream port if suspended.
- HcLSThreshold is writable, but it's usually not modified (same as Qemu).
- BX_ERROR should only occur on an attempt to change the number of ports.
- Don't register read-only items for save/restore.
- Changed some device descriptor fields (using values from Qemu).
- Ported device reset code from Qemu.
- Check device speed setting on connect (only low/full speed supported yet).
- TODO: External hub doesn't work properly in some test cases (device change
not detected by guest OS, openSUSE 13.2 hangs with hub on xHCI).
- USB mouse and keypad now return NAK response when idle and there is no change.
- Implemented HID commands for get/set idle duration.
- Fixed NAK behaviour in UHCI and OHCI.
TODO list: USB tablet should also return NAK (doesn't work yet), review xHCI for
the NAK behaviour, accurate implementation of the idle duration
is currently supported per hub at the same time (same as OHCI).
TODO #1: We should support at least one async operation per connected device.
TODO #2: Async packet support for EHCI and xHCI.
- added a hack to make EHCI work in Bochs, but without asynchronous packet
support (tested with "high-speed" USB disk).
- added missing list for connected USB device state.
- fixed some of the endianness issues
- fixed some of the GCC warnings
- changed some BX_INFO to BX_DEBUG
- FIXME: non-bulk devices not yet working on xHCI. Linux guest hangs during boot
when HID or hub device is connected.
instead of the hub's remove_device() method. The external hub removes connected
devices before clearing it's own list. This fixes crash on exit when devices
are present on external hub.
ignores connected high speed device (fixes panic with EHCI on guest OS init or
shutdown). The other HC's now panic and disconnect device if the user decides
to continue.
Asynchronous transfers are not yet working properly (tested with USB disk device
in high speed mode). That's why the support for "speed:high" is still disabled.
Since we have no test case for the isosynchronous mode, I have not yet ported
the main code for it.