OSDN Git Service

can: mcp251xfd: revert "can: mcp251xfd: add BQL support"
authorMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 22 Feb 2021 19:46:06 +0000 (20:46 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 1 Mar 2021 10:44:45 +0000 (11:44 +0100)
commit2afe72ead5ab672c8012bda83cbe65f8145568e0
tree35c3ed5828af16861e0b35d56ccbab99e174333e
parentc63820045e2000f05657467a08715c18c9f490d9
can: mcp251xfd: revert "can: mcp251xfd: add BQL support"

In the following 4 patches

99842c9685ab can: dev: can_rx_offload_get_echo_skb(): extend to return can frame length
9420e1d495e2 can: dev: can_get_echo_skb(): extend to return can frame length
1dcb6e57db83 can: dev: can_put_echo_skb(): extend to handle frame_len
f0ef72febc9a can: dev: extend struct can_skb_priv to hold CAN frame length

the CAN echo SKB support was extended to hold the CAN frame
length (which is the length of the CAN frame on the wire). It is meant
as a helper for BQL support, to avoid the re-calculation of the frame
length before sending it and on TX-completion.

However if the CAN frame is send without the request to be looped back
the SKB is discarded in can_put_echo_skb() and the subsequent
can_get_echo_skb() and can_rx_offload_get_echo_skb() return 0 for the
CAN frame length. This results in BQL stalling the TX queue after a
few packages.

Until the BQL helpers can_get_echo_skb() and
can_rx_offload_get_echo_skb() are fixed, revert the BQL support for
the mcp251xfd driver.

This reverts commit 4162e18e949ba520d5116ac0323500355479a00e.

Fixes: 4162e18e949b ("can: mcp251xfd: add BQL support")
Cc: Manivannan Sadhasivam <mani@kernel.org>
Cc: Thomas Kopp <thomas.kopp@microchip.com>
Link: https://lore.kernel.org/r/20210228083347.28580-1-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c