OSDN Git Service

xhci: Remove "FIXME - check all the stream rings for pending cancellations"
authorHans de Goede <hdegoede@redhat.com>
Wed, 20 Aug 2014 13:41:54 +0000 (16:41 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Sep 2014 04:46:11 +0000 (21:46 -0700)
commitf85c9fb62c59b78a1169b269f4ca697b1e06ee98
tree39d41b1d493170de7cc742aec5e634c725970c5b
parent0d4976ec8ec17f331a094e3d6dd3917f4c8dd1ce
xhci: Remove "FIXME - check all the stream rings for pending cancellations"

Even though a Set TR deq ptr command operates on a ring, and an endpoint
can have multiple rings, we can have only one Set TR deq ptr command pending.

When an endpoint with streams halts or is stopped to unlink urbs, there
will only be at most one ring active / one td being executed (the td
stopped_td points to).

So when we reset the endpoint (for a halt), or the stop command completes, we
will queue one Set TR deq ptr command at most, cancelled urbs on other stream
rings then the one being executed will have there trbs turned to nops, and
once the hcd gets around to execute that stream ring they will be simply
skipped.

So the SET_DEQ_PENDING flag in the endpoint is sufficient protection against
starting the endpoing before all stream rings are cleaned up.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c