Skip to content

usb/xhci and usb/msd improvements and tests

Nicholas Piggin qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest22 patches 22 repliesIn review
  2. v38 patches 0 repliesSuperseded
  3. v28 patches 0 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/22hw/usb/xhci: Move HCD constants to a header and add register constantshw/usb/hcd-xhci.c hw/usb/hcd-xhci.h+360 -3041 reply
2/22hw/usb/xhci: Rename and move HCD register region constants to headerhw/usb/hcd-xhci.c hw/usb/hcd-xhci.h+38 -261 reply
3/22tests/qtest/xhci: test the qemu-xhci devicetests/qtest/usb-hcd-xhci-test.c+176 -141 reply
4/22tests/qtest/xhci: Add controller and device setup and ring testshw/usb/hcd-xhci.c hw/usb/hcd-xhci.h tests/qtest/usb-hcd-xhci-test.c+343 -71 reply
5/22tests/qtest/xhci: Add basic USB Mass Storage teststests/qtest/usb-hcd-xhci-test.c+351 -81 reply
6/22hw/usb/xhci: Support TR NOOP commandshw/usb/hcd-xhci.c+27 -11 reply
7/22tests/qtest/xhci: add a test for TR NOOP commandstests/qtest/usb-hcd-xhci-test.c+36 -01 reply
8/22tests/qtest/usb-hcd-xhci: Deliver msix interruptstests/qtest/usb-hcd-xhci-test.c+13 -12 replies
9/22hw/usb/hcd-xhci-pci: Make PCI device more configurablehw/usb/hcd-xhci-pci.c hw/usb/hcd-xhci-pci.h+103 -241 reply
10/22hw/usb/hcd-xhci-pci: Add TI TUSB73X0 XHCI controller modelhw/usb/Kconfig hw/usb/hcd-xhci-ti.c hw/usb/meson.build +3 more+88 -01 reply
11/22usb/msd: Split in and out packet handlinghw/usb/dev-storage.c+145 -1211 reply
12/22usb/msd: Ensure packet structure layout is correcthw/usb/dev-storage.c+16 -51 reply
13/22usb/msd: Improved handling of mass storage resethw/usb/dev-storage.c+1 -10 replies
14/22usb/msd: Improve packet validation error logginghw/usb/dev-storage.c+42 -111 reply
15/22usb/msd: Allow CBW packet size greater than 31hw/usb/dev-storage.c+1 -11 reply
16/22usb/msd: Split async packet tracking into data and cswhw/usb/dev-storage.c include/hw/usb/msd.h+79 -472 replies
17/22usb/msd: Add some additional assertionshw/usb/dev-storage.c+19 -40 replies
18/22usb/msd: Rename mode to cbw_state, and tweak nameshw/usb/dev-storage.c include/hw/usb/msd.h+33 -310 replies
19/22usb/msd: Add NODATA CBW statehw/usb/dev-storage.c include/hw/usb/msd.h+8 -30 replies
20/22usb/msd: Permit a DATA-IN or CSW packet before CBW packethw/usb/dev-storage.c include/hw/usb/msd.h+44 -00 replies
21/22tests/qtest/xhci: Test USB Mass Storage relaxed CSW ordertests/qtest/usb-hcd-xhci-test.c+158 -221 reply
22/22usb/msd: Add more tracinghw/usb/dev-storage.c hw/usb/trace-events+56 -160 replies

Reviews trailers per patch

14 of 22 patches have a Reviewed-by or Acked-by.

PatchPhilippe Mathieu-DaudéKevin WolfPeter MaydellFabiano Rosas
1/22
2/22
3/22R-b
4/22R-b
5/22R-b
6/22R-b
7/22R-b
8/22
9/22
10/22R-b
11/22R-b
12/22R-b R-b
13/22R-b
14/22R-b
15/22
16/22
17/22R-b
18/22R-b
19/22
20/22
21/22R-b R-b
22/22R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v4 thread

Cover letter [PATCH v4 00/22] usb/xhci and usb/msd improvements and tests

This is merged from two series now because code especially the test cases have started to depend on one another.

The series are "usb/xhci: TR NOOP, TI HCD device, more qtests" from:
https://lore.kernel.org/qemu-devel/[email protected]/

And "usb/msd: Permit relaxed ordering of IN packets" from:
https://lore.kernel.org/qemu-devel/[email protected]/

The qtests also depends on the qtest fixes:
https://lore.kernel.org/qemu-devel/[email protected]/

This series adds better support qtests support for the xhci controller, adds support for the "TR NOOP" command used by AIX, and adds a new USB controller model from TI that PowerVM and AIX use.

It also permits relaxed ordering of USB mass-storage packets from the host, as allowed by the usbmassbulk 1.0 spec, but not usually seen in drivers. AIX drivers do require this ordering.

Since previous posting the usb/msd series had some changes that Phil noted. But otherwise the qemu code is mostly unchanged. The qtest code has had some big changes, cleaned up a lot and started adding some USB Mass Storage Device tests including one which verifies the relaxed ordering change. It would be nice if we could plug these into more comprehensive SCSI tests, but so far it mainly just tests the USB MSD protocol.

Nicholas Piggin (22):
hw/usb/xhci: Move HCD constants to a header and add register constants hw/usb/xhci: Rename and move HCD register region constants to header tests/qtest/xhci: test the qemu-xhci device tests/qtest/xhci: Add controller and device setup and ring tests tests/qtest/xhci: Add basic USB Mass Storage tests hw/usb/xhci: Support TR NOOP commands
tests/qtest/xhci: add a test for TR NOOP commands tests/qtest/usb-hcd-xhci: Deliver msix interrupts hw/usb/hcd-xhci-pci: Make PCI device more configurable hw/usb/hcd-xhci-pci: Add TI TUSB73X0 XHCI controller model usb/msd: Split in and out packet handling
usb/msd: Ensure packet structure layout is correct usb/msd: Improved handling of mass storage reset
usb/msd: Improve packet validation error logging
usb/msd: Allow CBW packet size greater than 31
usb/msd: Split async packet tracking into data and csw usb/msd: Add some additional assertions
usb/msd: Rename mode to cbw_state, and tweak names usb/msd: Add NODATA CBW state
usb/msd: Permit a DATA-IN or CSW packet before CBW packet tests/qtest/xhci: Test USB Mass Storage relaxed CSW order usb/msd: Add more tracing

 hw/usb/hcd-xhci-pci.h           |    9 +
 hw/usb/hcd-xhci.h               |  237 +++++++
 include/hw/pci/pci_ids.h        |    1 +
 include/hw/usb/msd.h            |   21 +-
 include/hw/usb/xhci.h           |    1 +
 hw/usb/dev-storage.c            |  532 +++++++++++-----
 hw/usb/hcd-xhci-pci.c           |  118 +++-
 hw/usb/hcd-xhci-ti.c            |   77 +++
 hw/usb/hcd-xhci.c               |  527 ++++++---------
 tests/qtest/usb-hcd-xhci-test.c | 1056 ++++++++++++++++++++++++++++++-
 hw/usb/Kconfig                  |    5 +
 hw/usb/meson.build              |    1 +
 hw/usb/trace-events             |   11 +-
 13 files changed, 2043 insertions(+), 553 deletions(-)
 create mode 100644 hw/usb/hcd-xhci-ti.c
Signature · 1 line
2.47.1