diff options
| author | Julius Werner <jwerner@chromium.org> | 2013-05-21 13:35:02 -0700 |
|---|---|---|
| committer | Hemant Kumar <hemantk@codeaurora.org> | 2014-05-28 15:59:07 -0700 |
| commit | b099ce3b8147e0474f44e3c098011ee541a1c04f (patch) | |
| tree | a3d18cac27fb2d4f16cc5bdcffc76987af8b6b6e /fs/ubifs/commit.c | |
| parent | 60d75479873ef377ecdc183e9841bef4108148a8 (diff) | |
usb: xhci: Fix Command Ring Stopped Event handling
The current XHCI code treats a command completion event with the
COMP_CMD_STOP code as a slightly different version of COMP_CMD_ABORT. In
particular, it puts the pointed-to command TRB through the normal
command completion handlers. This is not how this event works.
As XHCI spec 4.6.1.1 describes, unlike other command completion events
Command Ring Stopped sets the Command TRB Pointer to the *current*
Command Ring Dequeue Pointer. This is the command TRB that the XHCI will
execute next, and not a command that has already been executed. The
driver's internal command ring dequeue pointer should not be increased
after this event, since it does not really mark a command completion...
it's just a hint for the driver that execution is stopped now and where
it will be picked up again if the ring gets restarted.
This patch gets rid of the handle_stopped_command_ring() function and
splits its behavior into two distinct parts for COMP_CMD_STOP and
COMP_CMD_ABORT events. It ensures that the former no longer messes with
the dequeue pointer, while the latter's behavior is unchanged. This
prevents the hardware and software dequeue pointer from going out of
sync during command cancellations, which can lead to a variety of
problems (up to a total HCD death if the next command after the one that
was cancelled is Stop Endpoint, and the stop_endpoint_watchdog won't see
the command's completion because it got skipped by the software dequeue
pointer).
BUG=chrome-os-partner:19579
TEST=Manual
This patch can be dropped when we rebase onto upstream's new global
command queue rework (in particular "xhci: rework command timeout and
cancellation") which will probably go into 3.15.
Change-Id: Ia30e6fa7fd24908fbb8f48dd9f2d6fa3f6db4a75
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/186091
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Git-commit: 1ebfca337a6095e23b942196781c5ef030a13898
Git-repo: https://chromium.googlesource.com/chromiumos/third_party/kernel-next
CRs-Fixed: 671440
[hemantk@codeaurora.org: amended the subject line of the commit text]
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Diffstat (limited to 'fs/ubifs/commit.c')
0 files changed, 0 insertions, 0 deletions
