]> git.baikalelectronics.ru Git - kernel.git/commit
xhci: properly prepare zero packet TD after normal bulk TD.
authorMathias Nyman <mathias.nyman@linux.intel.com>
Tue, 21 Jun 2016 07:57:58 +0000 (10:57 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Jun 2016 18:43:39 +0000 (11:43 -0700)
commitd40b1c8e5b5673044e43b7d58bc65f957d348575
tree2843194527625afe2e315c77a798b64e97497cbb
parent0d86db50d25707c3a350d84dd7dedf0fc5319d35
xhci: properly prepare zero packet TD after normal bulk TD.

If a zero-length packet is needed after a bulk transfer, then an
additional zero length TD was prepared before enqueueing the bulk transfer
This set up the zero packet TD structure with incorrect td->start_seg
and td->first_trb pointers.

Prepare the zero packet TD after the data bulk TD is enqueued instead.
It sets these pointers correctly.

This change also simplifies unnecessary complexity related to keeping
track of the last trb when enqueuing trbs.

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