[PATCH] hw/usb/hcd-ohci: Fix ohci_service_td: accept valid TDs

2024-05-20 Thread David Hubbard
From: Cord Amfmgm This changes the way the ohci emulation handles a Transfer Descriptor with "Current Buffer Pointer" set to "Buffer End" + 1. The OHCI spec 4.3.1.2 Table 4-2 allows td.cbp to be one byte more than td.be to signal the buffer has zero length. Currently qemu only accepts

[PATCH] hw/usb/hcd-ohci: Fix ohci_service_td: accept valid TDs

2024-05-20 Thread David Hubbard
From: Cord Amfmgm This changes the way the ohci emulation handles a Transfer Descriptor with "Current Buffer Pointer" set to "Buffer End" + 1. The OHCI spec 4.3.1.2 Table 4-2 allows td.cbp to be one byte more than td.be to signal the buffer has zero length. Currently qemu only accepts

[PATCH 2/2] hw/usb/hcd-ohci: Fix ohci_service_td: accept valid TDs

2024-05-08 Thread David Hubbard
From: Cord Amfmgm This changes the way the ohci emulation handles a Transfer Descriptor with "Current Buffer Pointer" set to "Buffer End" + 1. The OHCI spec 4.3.1.2 Table 4-2 allows td.cbp to be one byte more than td.be to signal the buffer has zero length. Currently qemu only accepts

[PATCH 1/2] hw/usb/hcd-ohci: Fix #1510, #303: pid not IN or OUT

2024-05-08 Thread David Hubbard
From: Cord Amfmgm This changes the ohci validation to not assert if invalid data is fed to the ohci controller. The poc in https://bugs.launchpad.net/qemu/+bug/1907042 and migrated to bug #303 does the following to feed it a SETUP pid (valid) at an EndPt of 1 (invalid - all SETUP pids must be

[PATCH] hw/usb/hcd-ohci: Fix #1510, #303: pid not IN or OUT

2024-02-06 Thread David Hubbard
signal the buffer has zero length. The new check in qemu appears to have been added since qemu-4.2. This patch includes both fixes since they are located very close to each other. Signed-off-by: David Hubbard --- hw/usb/hcd-ohci.c | 9 +++-- hw/usb/trace-events | 2 ++ 2 files changed, 9 i