]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
can: kvaser_usb: Comply with firmware max tx URBs value
authorAhmed S. Darwish <ahmed.darwish@valeo.com>
Sun, 15 Mar 2015 15:03:38 +0000 (11:03 -0400)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sun, 22 Mar 2015 17:14:49 +0000 (18:14 +0100)
commit082d70b6142f623c10f7a032d9b63a2399fb4ded
tree5f2e845a45b9829a2f201e777cd89fefc4bbbdb1
parentf40bff4239d45ac061044a8a79cf6868c62df345
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: Ahmed S. Darwish <ahmed.darwish@valeo.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/kvaser_usb.c