• Felipe Balbi's avatar
    usb: dwc3: gadget: fix for short pkts during chained xfers · e5b36ae2
    Felipe Balbi authored
    DWC3 has one interesting peculiarity with chained
    transfers. If we setup N chained transfers and we
    get a short packet before processing all N TRBs,
    DWC3 will (conditionally) issue a XferComplete or
    XferInProgress event and retire all TRBs from the
    one which got a short packet to the last without
    clearing their HWO bits.
    
    This means SW must clear HWO bit manually, which
    this patch is doing.
    
    Cc: <stable@vger.kernel.org>
    Cc: Brian E Rogers <brian.e.rogers@intel.com>
    Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
    e5b36ae2
gadget.c 76.1 KB