Hi Jules, On Tue, Aug 11, 2020 at 05:16:26PM +0200, Jules Maselbas wrote: > + > +static int transfer_chunk(struct dwc2 *dwc2, u8 hc, > + u8 *pid, int in, void *buffer, int num_packets, > + int xfer_len, int *actual_len, int odd_frame) > +{ > + uint32_t hctsiz, hcchar, sub; > + dma_addr_t dma_addr; > + int ret = 0; > + > + dma_addr = dma_map_single(dwc2->dev, buffer, xfer_len, > + in ? DMA_FROM_DEVICE : DMA_TO_DEVICE); > + > + dwc2_dbg(dwc2, "chunk: pid=%d xfer_len=%u pkts=%u dma_addr=%pad\n", > + *pid, xfer_len, num_packets, (void *)dma_addr); > + > + dwc2_writel(dwc2, dma_addr, HCDMA(hc)); > + > + hctsiz = (xfer_len << TSIZ_XFERSIZE_SHIFT) > + | (1 << TSIZ_PKTCNT_SHIFT) > + | (*pid << TSIZ_SC_MC_PID_SHIFT); Any reason to ignore num_packets here and hardcode 1 to the packet count? This breaks transfers > 512 bytes in my case. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox