• Ahmed S. Darwish's avatar
    can: kvaser_usb: Comply with firmware max tx URBs value · 082d70b6
    Ahmed S. Darwish authored
    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>
    082d70b6
kvaser_usb.c 50 KB