]> Git Repo - qemu.git/commit
xhci: use linked list for transfers
authorGerd Hoffmann <[email protected]>
Tue, 27 Sep 2016 08:32:48 +0000 (10:32 +0200)
committerGerd Hoffmann <[email protected]>
Wed, 12 Oct 2016 10:37:31 +0000 (12:37 +0200)
commit94b037f2a451b3dc855f9f2c346e5049a361bd55
tree393fd9925b78a355d507cbf194fa5538f2d217c2
parent7512b13dd7f77c3e93a5b856eddf78378bddcc7f
xhci: use linked list for transfers

xhci has a fixed number of 24 (TD_QUEUE) XHCITransfer structs per
endpoint, which turns out to be a problem for usb3 devices with 32 (or
more) bulk streams.  xhci re-checks the trb rings on every finished
transfer to make sure it'll pick up any pending work.  But that scheme
breaks in case the first transfer of a ring can't be started because we
ran out of XHCITransfer structs already.

So remove static XHCITransfer array from XHCIEPContext.  Use a linked
list instead, and allocate/free XHCITransfer as needed.  Add helper
functions to allocate & initialize and to cleanup & release
XHCITransfer structs.  That also simplifies trb management, we never
have to realloc XHCITransfer->trbs because we don't reuse XHCITransfer
structs any more.

New dynamic limit for in-flight xhci transfers per endpoint is
number-of-streams + 16.

Signed-off-by: Gerd Hoffmann <[email protected]>
Message-id: 1474965172[email protected]
hw/usb/hcd-xhci.c
This page took 0.02466 seconds and 4 git commands to generate.