On Wed, Apr 27, 2022 at 11:35:25AM -0500, Frank Li wrote: > Some devices have USB compositions which may require multiple endpoints. > To get better performance, need bigger CDNS3_EP_BUF_SIZE. > > But bigger CDNS3_EP_BUF_SIZE may exceed total hardware FIFO size when > multiple endpoints. > > By introducing the check_config() callback, calculate CDNS3_EP_BUF_SIZE. > > Move CDNS3_EP_BUF_SIZE into cnds3_device: ep_buf_size > Combine CDNS3_EP_ISO_SS_BURST and CDNS3_EP_ISO_HS_MULT into > ecnds3_device:ep_iso_burst > > Using a simple algorithm to calculate ep_buf_size. > ep_buf_size = ep_iso_burst = (onchip_buffers - 2k) / (number of IN EP + > 1). > > Test at 8qxp: > > Gadget ep_buf_size > > RNDIS: 5 > RNDIS+ACM: 3 > Mass Storage + NCM + ACM 2 > > Previous CDNS3_EP_BUF_SIZE is 4, RNDIS + ACM will be failure because > exceed FIFO memory. > > Signed-off-by: Frank Li <Frank.Li@xxxxxxx> > --- > Change from v1 to v2: > Add safe check for mult, buffering and maxburst that's nice, but this is v8, not v2? confused, greg k-h