staging: unisys: Fix improper use of NETDEV_TX_BUSY
authorNeil Horman <nhorman@redhat.com>
Tue, 21 Jul 2015 13:55:45 +0000 (09:55 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jul 2015 04:20:25 +0000 (21:20 -0700)
commitf6346ad662e44d7086bc3c18fc19a33f0b95b576
tree5d58e619718a8853ae5cf42680e83c4ca0f92b5e
parent35a8dd310efbbcec37de2da6301f9bdaf83b2632
staging: unisys: Fix improper use of NETDEV_TX_BUSY

Using NETDEV_TX_BUSY is tricky.  Its meant for situations where the error
in question is transient and quickly resolved.  But the driver rarely is
able to know that to a certainty.  And in the case of visornic, it just
uses it without any care for that, in the hopes that it won't loose frames,
even if the problem is that the skb is somehow malformed for the hardware.
If we get one of those kinds of skbs, NETDEV_TX_BUSY will just cause us to
spin, processing the same error over and over.

Fix it by dropping the frame, stopping the queue where appropriate, and
returning NETDEV_TX_OK

Signed-off-by: Neil Horman <nhorman@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visornic/visornic_main.c