diff options
author | Wolfgang Grandegger <wg@grandegger.com> | 2017-09-14 18:37:14 +0200 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2018-01-01 20:51:57 +0000 |
commit | bf5ac638a0ffa923ed03ba8cdb8241b812f5fe4f (patch) | |
tree | a964a804b95b6766f8826c18058e6e97c8c747b8 /net/sctp | |
parent | e3ae1363b68f628ef972f766d1b4a40e89d37691 (diff) | |
download | linux-stable-bf5ac638a0ffa923ed03ba8cdb8241b812f5fe4f.tar.gz linux-stable-bf5ac638a0ffa923ed03ba8cdb8241b812f5fe4f.tar.bz2 linux-stable-bf5ac638a0ffa923ed03ba8cdb8241b812f5fe4f.zip |
can: gs_usb: fix busy loop if no more TX context is available
commit 97819f943063b622eca44d3644067c190dc75039 upstream.
If sending messages with no cable connected, it quickly happens that
there is no more TX context available. Then "gs_can_start_xmit()"
returns with "NETDEV_TX_BUSY" and the upper layer does retry
immediately keeping the CPU busy. To fix that issue, I moved
"atomic_dec(&dev->active_tx_urbs)" from "gs_usb_xmit_callback()" to
the TX done handling in "gs_usb_receive_bulk_callback()". Renaming
"active_tx_urbs" to "active_tx_contexts" and moving it into
"gs_[alloc|free]_tx_context()" would also make sense.
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net/sctp')
0 files changed, 0 insertions, 0 deletions