Skip to contentSkip to conversation

usb: dwc3: gadget: Don't skip updating remaining data

PATCH New Felipe Balbi 1 participant 1 message Aug 2, 2018 USB

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 usb: dwc3: gadget: Don't skip updating remaining data

Hi,

Thinh Nguyen <[email protected]> writes:

<snip>

Quoted 15 lines
Quoted 2 lines

These patches will not fix the issue.

What do you think of this fix?

drivers/usb/dwc3/gadget.c +0 -0
index f452ab708ffc..338f7ab8a8b4 100644
@@ -2277,8 +2277,10 @@ static int
 dwc3_gadget_ep_reclaim_completed_trb(struct dwc3_ep *dep,
         * with one TRB pending in the ring. We need to manually clear

HWO bit
* from that TRB.
*/

drivers/usb/dwc3/gadget.c

Quoted 8 lines
drivers/usb/dwc3/gadget.c +4 -2
-       if ((req->zero || req->unaligned) && (trb->ctrl & DWC3_TRB_CTRL_HWO)) {
-               trb->ctrl &= ~DWC3_TRB_CTRL_HWO;
+       if ((req->zero || req->unaligned) && !chain) {
+               if (trb->ctrl & DWC3_TRB_CTRL_HWO)
+                       trb->ctrl &= ~DWC3_TRB_CTRL_HWO;
+
                return 1;
        }

This is a rathher minimal fix. I like it. So this together with the one I wrote for the TRB type, right? Can you send this one as a proper patch and add the correct Cc stable and Fixes tags?

thanks