UPSTREAM: usb: dwc3: gadget: Account for link TRB in TRBs left
authorJohn Youn <johnyoun@synopsys.com>
Fri, 20 May 2016 00:26:15 +0000 (17:26 -0700)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 16 Aug 2016 12:48:19 +0000 (20:48 +0800)
commitbf8f5fbf04f17ac64b2cc4e87701a931e9922fe5
tree214d3eed71ec49fc4e22bc3c9853ec19795cd531
parent1b10886a49d66a39bd9148ab7620fb36601883b3
UPSTREAM: usb: dwc3: gadget: Account for link TRB in TRBs left

The TRBs left calculation didn't account for the link TRB taking up one
spot.

If the trb_dequeue < trb_enqueue, then the result includes the link
TRB slot so it must be adjusted.

Change-Id: If03f89ea1f523b4bce1b5f096ae81aebc891c63f
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
(cherry picked from commit 7d0a038b130cde7265d6bbc5e148734cb127f341)
drivers/usb/dwc3/gadget.c