|
Takashi Iwai |
3ae49d |
From 2fc6d4be35fb1e262f209758e25bfe2b7a113a7f Mon Sep 17 00:00:00 2001
|
|
Takashi Iwai |
3ae49d |
From: Felipe Balbi <felipe.balbi@linux.intel.com>
|
|
Takashi Iwai |
3ae49d |
Date: Wed, 1 Aug 2018 09:37:34 +0300
|
|
Takashi Iwai |
3ae49d |
Subject: [PATCH] usb: dwc3: gadget: fix ISOC TRB type on unaligned transfers
|
|
Takashi Iwai |
3ae49d |
Git-commit: 2fc6d4be35fb1e262f209758e25bfe2b7a113a7f
|
|
Takashi Iwai |
3ae49d |
Patch-mainline: v4.20-rc4
|
|
Takashi Iwai |
3ae49d |
References: bsc#1051510
|
|
Takashi Iwai |
3ae49d |
|
|
Takashi Iwai |
3ae49d |
When chaining ISOC TRBs together, only the first ISOC TRB should be of
|
|
Takashi Iwai |
3ae49d |
type ISOC_FIRST, all others should be of type ISOC. This patch fixes
|
|
Takashi Iwai |
3ae49d |
that.
|
|
Takashi Iwai |
3ae49d |
|
|
Takashi Iwai |
3ae49d |
Fixes: c6267a51639b ("usb: dwc3: gadget: align transfers to wMaxPacketSize")
|
|
Takashi Iwai |
3ae49d |
Cc: <stable@vger.kernel.org> # v4.11+
|
|
Takashi Iwai |
3ae49d |
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
|
Takashi Iwai |
3ae49d |
Acked-by: Takashi Iwai <tiwai@suse.de>
|
|
Takashi Iwai |
3ae49d |
|
|
Takashi Iwai |
3ae49d |
---
|
|
Takashi Iwai |
3ae49d |
drivers/usb/dwc3/gadget.c | 6 +++---
|
|
Takashi Iwai |
3ae49d |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
Takashi Iwai |
3ae49d |
|
|
Takashi Iwai |
3ae49d |
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
|
|
Takashi Iwai |
3ae49d |
index 06e22afdf3d1..9faad896b3a1 100644
|
|
Takashi Iwai |
3ae49d |
--- a/drivers/usb/dwc3/gadget.c
|
|
Takashi Iwai |
3ae49d |
+++ b/drivers/usb/dwc3/gadget.c
|
|
Takashi Iwai |
3ae49d |
@@ -1081,7 +1081,7 @@ static void dwc3_prepare_one_trb_sg(struct dwc3_ep *dep,
|
|
Takashi Iwai |
3ae49d |
/* Now prepare one extra TRB to align transfer size */
|
|
Takashi Iwai |
3ae49d |
trb = &dep->trb_pool[dep->trb_enqueue];
|
|
Takashi Iwai |
3ae49d |
__dwc3_prepare_one_trb(dep, trb, dwc->bounce_addr,
|
|
Takashi Iwai |
3ae49d |
- maxp - rem, false, 0,
|
|
Takashi Iwai |
3ae49d |
+ maxp - rem, false, 1,
|
|
Takashi Iwai |
3ae49d |
req->request.stream_id,
|
|
Takashi Iwai |
3ae49d |
req->request.short_not_ok,
|
|
Takashi Iwai |
3ae49d |
req->request.no_interrupt);
|
|
Takashi Iwai |
3ae49d |
@@ -1125,7 +1125,7 @@ static void dwc3_prepare_one_trb_linear(struct dwc3_ep *dep,
|
|
Takashi Iwai |
3ae49d |
/* Now prepare one extra TRB to align transfer size */
|
|
Takashi Iwai |
3ae49d |
trb = &dep->trb_pool[dep->trb_enqueue];
|
|
Takashi Iwai |
3ae49d |
__dwc3_prepare_one_trb(dep, trb, dwc->bounce_addr, maxp - rem,
|
|
Takashi Iwai |
3ae49d |
- false, 0, req->request.stream_id,
|
|
Takashi Iwai |
3ae49d |
+ false, 1, req->request.stream_id,
|
|
Takashi Iwai |
3ae49d |
req->request.short_not_ok,
|
|
Takashi Iwai |
3ae49d |
req->request.no_interrupt);
|
|
Takashi Iwai |
3ae49d |
} else if (req->request.zero && req->request.length &&
|
|
Takashi Iwai |
3ae49d |
@@ -1141,7 +1141,7 @@ static void dwc3_prepare_one_trb_linear(struct dwc3_ep *dep,
|
|
Takashi Iwai |
3ae49d |
/* Now prepare one extra TRB to handle ZLP */
|
|
Takashi Iwai |
3ae49d |
trb = &dep->trb_pool[dep->trb_enqueue];
|
|
Takashi Iwai |
3ae49d |
__dwc3_prepare_one_trb(dep, trb, dwc->bounce_addr, 0,
|
|
Takashi Iwai |
3ae49d |
- false, 0, req->request.stream_id,
|
|
Takashi Iwai |
3ae49d |
+ false, 1, req->request.stream_id,
|
|
Takashi Iwai |
3ae49d |
req->request.short_not_ok,
|
|
Takashi Iwai |
3ae49d |
req->request.no_interrupt);
|
|
Takashi Iwai |
3ae49d |
} else {
|
|
Takashi Iwai |
3ae49d |
--
|
|
Takashi Iwai |
3ae49d |
2.19.1
|
|
Takashi Iwai |
3ae49d |
|