• Vardan Mikayelyan's avatar
    usb: dwc2: gadget: Add Incomplete ISO IN/OUT Interrupt handlers · 381fc8f8
    Vardan Mikayelyan authored
    Incomplete ISO IN interrupt indicates one of the following conditions
    occurred while transmitting an ISOC transaction.
    - Corrupted IN Token for ISOC EP.
    - Packet not complete in FIFO.
    
    Incomplete ISO OUT indicates that there is at least one isochronous OUT
    endpoint on which the transfer is not completed in the current
    microframe.
    
    The following actions will be taken:
    
    In case of EP-IN
    - Determine the EP
    - Disable EP directly from this handler; when "Endpoint Disabled"
      interrupt is received flush FIFO
    
    In case of EP-OUT
    - Determine the EP
    - If target frame elapsed set DCTL_SGOUTNAK, unmask GOUTNAKEFF and
      proceed as described in section 7.5.1 of DWC-HSOTG Programming Guide
    
    Also added dwc2_gadget_target_frame_elapsed() helper function which
    will be used in Incomplete ISO IN/OUT Interrupt handlers.
    Tested-by: default avatarJohn Keeping <john@metanate.com>
    Signed-off-by: default avatarVardan Mikayelyan <mvardan@synopsys.com>
    Signed-off-by: default avatarJohn Youn <johnyoun@synopsys.com>
    Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
    381fc8f8
gadget.c 104 KB