Hi Sarah & Alan, This is the ring expansion patchset v5, sorry for the long delay. Changelog from v4: 1. Fix the bug in handle set TRDP command completion; 2. Add patch 8 and 9, allocate 2 segments for transfer ring at the beginning, and expand the ring if the enqueue pointer will advance into dequeue segment. Thank you Alan, your suggestion makes things much more easier! I've tested with usbtest -t 10, which could hit the case with multiple control requests. Seems it works fine. Hi Paul, Can you run usbtest 10 with this patchset? Thanks. I've some questions, not quite related to the patchset... 1. Does usbtest require specific compliant device? I used a USB2.0 storage device, and some test cases fail with unmatched transfer length and unexpected status. 2. What will happen if the host driver does not call usb_hcd_link_urb_to_ep() in enqueue() method? In my original design, the host driver will "suspend" the urbs in some cases, does not queue them immediately, just return enqueue() as successful and queue them later. In this case, does the host driver need to call usb_hcd_link_urb_to_ep() before it returns? Thanks, Andiry --- Andiry Xu (9): xHCI: store ring's type xHCI: store ring's last segment and segment numbers xHCI: count free TRBs on transfer ring xHCI: factor out segments allocation and free function xHCI: set cycle state when allocate rings xHCI: dynamic ring expansion xHCI: update sg tablesize xHCI: Allocate 2 segments for transfer ring xHCI: check enqueue pointer advance into dequeue seg drivers/usb/host/xhci-mem.c | 230 +++++++++++++++++++++++++++---------- drivers/usb/host/xhci-ring.c | 257 ++++++++++++++++++++++++------------------ drivers/usb/host/xhci.c | 4 +- drivers/usb/host/xhci.h | 17 +++ 4 files changed, 334 insertions(+), 174 deletions(-) -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html