]> git.baikalelectronics.ru Git - kernel.git/commit
USB: xHCI: Fix another bug in link TRB activation change.
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Fri, 9 Jul 2010 15:08:38 +0000 (17:08 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Jul 2010 19:00:58 +0000 (12:00 -0700)
commit0018479f437873b740ab8fbd2da2e37640f7a64a
tree3f2b42d53b514823649d1343e8d77fdc8dda60bc
parent93f067bb932762f858e57037d05ed764117e5a87
USB: xHCI: Fix another bug in link TRB activation change.

Commit 90b521c2a157988e06c789a297440ec52a6717d0 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: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/xhci-ring.c