aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-imx.c
diff options
context:
space:
mode:
authorMaciej Żenczykowski <[email protected]>2021-06-08 01:54:38 -0700
committerGreg Kroah-Hartman <[email protected]>2021-06-09 10:34:18 +0200
commit1958ff5ad2d4908b44a72bcf564dfe67c981e7fe (patch)
tree7f006b805b421effb2193d265de444969a103e8b /drivers/usb/cdns3/cdns3-imx.c
parent3370139745853f7826895293e8ac3aec1430508e (diff)
usb: f_ncm: only first packet of aggregate needs to start timer
The reasoning for this change is that if we already had a packet pending, then we also already had a pending timer, and as such there is no need to reschedule it. This also prevents packets getting delayed 60 ms worst case under a tiny packet every 290us transmit load, by keeping the timeout always relative to the first queued up packet. (300us delay * 16KB max aggregation / 80 byte packet =~ 60 ms) As such the first packet is now at most delayed by 300us. Under low transmit load, this will simply result in us sending a shorter aggregate, as originally intended. This patch has the benefit of greatly reducing (by ~10 factor with 1500 byte frames aggregated into 16 kiB) the number of (potentially pretty costly) updates to the hrtimer. Cc: Brooke Basile <[email protected]> Cc: Bryan O'Donoghue <[email protected]> Cc: Felipe Balbi <[email protected]> Cc: Lorenzo Colitti <[email protected]> Signed-off-by: Maciej Żenczykowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-imx.c')
0 files changed, 0 insertions, 0 deletions