Skip to content
Commit d1dc908a authored by Sarah Sharp's avatar Sarah Sharp Committed by Greg Kroah-Hartman
Browse files

USB: xHCI: Fix another bug in link TRB activation change.

Commit 6c12db90

 also seems to have
introduced a bug that is triggered when the command ring is about to wrap.
The inc_enq() function will not have moved the enqueue pointer past the
link TRB.  It is supposed to be moved past the link TRB in prepare_ring(),
which should be called before a TD is enqueued.  However, the
queue_command() function never calls the prepare_ring() function because
prepare_ring() is only supposed to be used for endpoint rings.  That means
the enqueue pointer will not be moved past the link TRB, and will get
overwritten.

The fix is to make queue_command() call prepare_ring() with a fake
endpoint status (set to running).  Then the enqueue pointer will get moved
past the link TRB.

Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7595931c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment