From: <gregkh@linuxfoundation.org>
To: felipe.balbi@linux.intel.com, gregkh@linuxfoundation.org,
januszx.dziedzic@linux.intel.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "usb: dwc3: ep0: add dwc3_ep0_prepare_one_trb()" has been added to the 4.4-stable tree
Date: Mon, 09 Jan 2017 12:27:51 +0100 [thread overview]
Message-ID: <1483961271249163@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
usb: dwc3: ep0: add dwc3_ep0_prepare_one_trb()
to the 4.4-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-ep0-add-dwc3_ep0_prepare_one_trb.patch
and it can be found in the queue-4.4 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 7931ec86c1b738e4e90e58c6d95e5f720d45ee56 Mon Sep 17 00:00:00 2001
From: Felipe Balbi <felipe.balbi@linux.intel.com>
Date: Tue, 20 Dec 2016 13:57:32 +0200
Subject: usb: dwc3: ep0: add dwc3_ep0_prepare_one_trb()
From: Felipe Balbi <felipe.balbi@linux.intel.com>
commit 7931ec86c1b738e4e90e58c6d95e5f720d45ee56 upstream.
For now this is just a cleanup patch, no functional
changes. We will be using the new function to fix a
bug introduced long ago by commit 0416e494ce7d
("usb: dwc3: ep0: correct cache sync issue in case
of ep0_bounced") and further worsened by commit
c0bd5456a470 ("usb: dwc3: ep0: handle non maxpacket
aligned transfers > 512")
Reported-by: Janusz Dziedzic <januszx.dziedzic@linux.intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/dwc3/ep0.c | 30 ++++++++++++++++++------------
1 file changed, 18 insertions(+), 12 deletions(-)
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -55,20 +55,13 @@ static const char *dwc3_ep0_state_string
}
}
-static int dwc3_ep0_start_trans(struct dwc3 *dwc, u8 epnum, dma_addr_t buf_dma,
- u32 len, u32 type, bool chain)
+static void dwc3_ep0_prepare_one_trb(struct dwc3 *dwc, u8 epnum,
+ dma_addr_t buf_dma, u32 len, u32 type, bool chain)
{
- struct dwc3_gadget_ep_cmd_params params;
struct dwc3_trb *trb;
struct dwc3_ep *dep;
- int ret;
-
dep = dwc->eps[epnum];
- if (dep->flags & DWC3_EP_BUSY) {
- dwc3_trace(trace_dwc3_ep0, "%s still busy", dep->name);
- return 0;
- }
trb = &dwc->ep0_trb[dep->free_slot];
@@ -89,15 +82,28 @@ static int dwc3_ep0_start_trans(struct d
trb->ctrl |= (DWC3_TRB_CTRL_IOC
| DWC3_TRB_CTRL_LST);
- if (chain)
+ trace_dwc3_prepare_trb(dep, trb);
+}
+
+static int dwc3_ep0_start_trans(struct dwc3 *dwc, u8 epnum, dma_addr_t buf_dma,
+ u32 len, u32 type, bool chain)
+{
+ struct dwc3_gadget_ep_cmd_params params;
+ struct dwc3_ep *dep;
+ int ret;
+
+ dep = dwc->eps[epnum];
+ if (dep->flags & DWC3_EP_BUSY) {
+ dwc3_trace(trace_dwc3_ep0, "%s still busy", dep->name);
return 0;
+ }
+
+ dwc3_ep0_prepare_one_trb(dwc, epnum, buf_dma, len, type, chain);
memset(¶ms, 0, sizeof(params));
params.param0 = upper_32_bits(dwc->ep0_trb_addr);
params.param1 = lower_32_bits(dwc->ep0_trb_addr);
- trace_dwc3_prepare_trb(dep, trb);
-
ret = dwc3_send_gadget_ep_cmd(dwc, dep->number,
DWC3_DEPCMD_STARTTRANSFER, ¶ms);
if (ret < 0) {
Patches currently in stable-queue which might be from felipe.balbi@linux.intel.com are
queue-4.4/usb-dummy-hcd-fix-bug-in-stop_activity-handle-ep0.patch
queue-4.4/usb-dwc3-core-avoid-overflow-events.patch
queue-4.4/usb-gadgetfs-fix-use-after-free-bug.patch
queue-4.4/usb-gadget-composite-test-get_alt-presence-instead-of-set_alt.patch
queue-4.4/usb-dwc3-ep0-explicitly-call-dwc3_ep0_prepare_one_trb.patch
queue-4.4/usb-phy-am335x-control-fix-device-and-of_node-leaks.patch
queue-4.4/usb-gadgetfs-restrict-upper-bound-on-device-configuration-size.patch
queue-4.4/usb-gadgetfs-fix-checks-of-wtotallength-in-config-descriptors.patch
queue-4.4/usb-dwc3-gadget-always-unmap-ep0-requests.patch
queue-4.4/usb-dwc3-ep0-add-dwc3_ep0_prepare_one_trb.patch
queue-4.4/usb-dwc3-pci-add-intel-gemini-lake-pci-id.patch
queue-4.4/usb-gadgetfs-fix-unbounded-memory-allocation-bug.patch
reply other threads:[~2017-01-09 11:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1483961271249163@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=felipe.balbi@linux.intel.com \
--cc=januszx.dziedzic@linux.intel.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.