summaryrefslogtreecommitdiff
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorFrank Li <Frank.Li@nxp.com>2022-05-09 19:40:55 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-19 19:14:29 +0300
commitdce49449e04ff150838a31386ee65917beb9ebb5 (patch)
tree5b55a57f555eb07593c48bd771755b506036ee10 /drivers/usb/core/hub.c
parent9d778f0c5f95ca5aa2ff628ea281978697e8d89b (diff)
downloadlinux-dce49449e04ff150838a31386ee65917beb9ebb5.tar.xz
usb: cdns3: allocate TX FIFO size according to composite EP number
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 cnds3_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. Acked-by: Peter Chen <peter.chen@kernel.org> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20220509164055.1815081-1-Frank.Li@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/hub.c')
0 files changed, 0 insertions, 0 deletions