]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - drivers/usb/dwc3/gadget.c
usb: dwc3: gadget: always enable CSP
[mirror_ubuntu-hirsute-kernel.git] / drivers / usb / dwc3 / gadget.c
index 3a5c2715a3b5e05e19d9656628705331fb115339..28d512a65ada54f2571a660d03a8e551c9f6344e 100644 (file)
@@ -726,6 +726,9 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep,
                        trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS_FIRST;
                else
                        trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS;
+
+               /* always enable Interrupt on Missed ISOC */
+               trb->ctrl |= DWC3_TRB_CTRL_ISP_IMI;
                break;
 
        case USB_ENDPOINT_XFER_BULK:
@@ -740,15 +743,14 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep,
                BUG();
        }
 
-       if (!req->request.no_interrupt && !chain)
-               trb->ctrl |= DWC3_TRB_CTRL_IOC;
+       /* always enable Continue on Short Packet */
+       trb->ctrl |= DWC3_TRB_CTRL_CSP;
 
-       if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
-               trb->ctrl |= DWC3_TRB_CTRL_ISP_IMI;
-               trb->ctrl |= DWC3_TRB_CTRL_CSP;
-       } else if (last) {
+       if (!req->request.no_interrupt)
+               trb->ctrl |= DWC3_TRB_CTRL_IOC | DWC3_TRB_CTRL_ISP_IMI;
+
+       if (last)
                trb->ctrl |= DWC3_TRB_CTRL_LST;
-       }
 
        if (chain)
                trb->ctrl |= DWC3_TRB_CTRL_CHN;