Hi Aaron, On Tue, Sep 10, 2019 at 7:53 AM Aaron Williams <awilli...@marvell.com> wrote: > > Hi Bin, > > I have some more data. It looks like U-Boot is not properly handling the short > transfer case according to section 4.10.1.1.2 in the XHCI 3.1 specification. > In this case, when the data fits in the first TRB, two transfer event TRBs > will be generated. The first one will indicate that there is a short packet > and points to the first TRB and the length is calculated based on the TRB > pointed to, not the total TRB. A second success TRB is also received. > > This seems consistent with what I am seeing. U-Boot does not handle this at > all. It expects there to always be a single transfer event TRB with the length > calculated based on the total length, not the TRB length. I can re-work this > so that short packets can be better handled. >
Thank you very much for your efforts on analyzing this. It looks short packet indeed is not correctly handled in the bulk transfer. But in the control transfer, looks it is being handled. Could you please adding the same piece of codes to the xhci_bulk_tx() to see if it fixes the issue? > The easiest way to test this is with a USB Ethernet dongle then modifying > drivers/usb/eth/usb_ether.c to force it to allocate a buffer that will span > 64K where packets fit in the first half. I have attached this patch to force > the XHCI problem to manifest itself. > Regards, Bin _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot