* Patch "usb: dwc3: gadget: properly account queued requests" has been added to the 4.8-stable tree
@ 2016-11-13 11:22 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-11-13 11:22 UTC (permalink / raw)
To: felipe.balbi, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
usb: dwc3: gadget: properly account queued requests
to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
usb-dwc3-gadget-properly-account-queued-requests.patch
and it can be found in the queue-4.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From a9c3ca5fae6bf73770f0576eaf57d5f1305ef4b3 Mon Sep 17 00:00:00 2001
From: Felipe Balbi <felipe.balbi@linux.intel.com>
Date: Wed, 5 Oct 2016 14:24:37 +0300
Subject: usb: dwc3: gadget: properly account queued requests
From: Felipe Balbi <felipe.balbi@linux.intel.com>
commit a9c3ca5fae6bf73770f0576eaf57d5f1305ef4b3 upstream.
Some requests could be accounted for multiple
times. Let's fix that so each and every requests is
accounted for only once.
Fixes: 55a0237f8f47 ("usb: dwc3: gadget: use allocated/queued reqs for LST bit")
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/dwc3/gadget.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -789,6 +789,7 @@ static void dwc3_prepare_one_trb(struct
req->trb = trb;
req->trb_dma = dwc3_trb_dma_offset(dep, trb);
req->first_trb_index = dep->trb_enqueue;
+ dep->queued_requests++;
}
dwc3_ep_inc_enq(dep);
@@ -841,8 +842,6 @@ static void dwc3_prepare_one_trb(struct
trb->ctrl |= DWC3_TRB_CTRL_HWO;
- dep->queued_requests++;
-
trace_dwc3_prepare_trb(dep, trb);
}
@@ -1963,7 +1962,9 @@ static int __dwc3_cleanup_done_trbs(stru
unsigned int s_pkt = 0;
unsigned int trb_status;
- dep->queued_requests--;
+ if (req->trb == trb)
+ dep->queued_requests--;
+
trace_dwc3_complete_trb(dep, trb);
/*
Patches currently in stable-queue which might be from felipe.balbi@linux.intel.com are
queue-4.8/usb-dwc3-gadget-properly-account-queued-requests.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-11-13 11:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-13 11:22 Patch "usb: dwc3: gadget: properly account queued requests" has been added to the 4.8-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.