For sg use cases, there will be serveral TRBs in TD, and the short transfer may occur during the TD, current code doesn't handle it well, improve it through this series. Tested by Android MTP and ADB use case. Peter Chen (8): usb: cdns3: gadget: using correct sg operations usb: cdns3: gadget: improve the dump TRB operation at cdns3_ep_run_transfer usb: cdns3: gadget: calculate TDL correctly usb: cdns3: gadget: add CHAIN and ISP bit for sg list use case usb: cdns3: gadget: handle sg list use case at completion correctly usb: cdns3: gadget: need to handle sg case for WA2 case usb: cdns3: gadget: sg_support is only for DEV_VER_V2 or above usb: cdns3: gadget: enlarge the TRB ring length drivers/usb/cdns3/gadget.c | 205 +++++++++++++++++++++++++------------ drivers/usb/cdns3/gadget.h | 11 +- 2 files changed, 151 insertions(+), 65 deletions(-) -- 2.17.1