Skip to content
Commit 082d70b6 authored by Ahmed S. Darwish's avatar Ahmed S. Darwish Committed by Marc Kleine-Budde
Browse files

can: kvaser_usb: Comply with firmware max tx URBs value



Current driver code arbitrarily assumes a max outstanding tx
value of 16 parallel transmissions. Meanwhile, the device
firmware provides its actual maximum inside its reply to the
CMD_GET_SOFTWARE_INFO message.

Under heavy tx traffic, if the interleaved transmissions count
increases above the limit reported by firmware, the firmware
breaks up badly, reports a massive list of internal errors, and
the candump traces hardly matches the actual frames sent and
received.

On the other hand, in certain models, the firmware can support
up to 48 tx URBs instead of just 16, increasing the driver
throughput by two-fold and reducing the possibility of -ENOBUFs.

Thus dynamically set the driver's max tx URBs value according
to firmware replies.

Signed-off-by: default avatarAhmed S. Darwish <ahmed.darwish@valeo.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent f40bff42
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment