ftgmac100: Cleanup tx queue handling
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 10 Apr 2017 01:15:21 +0000 (11:15 +1000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Apr 2017 20:03:57 +0000 (16:03 -0400)
commit6ad3d7edcbdae233a24f67a6713f461b2325e5cc
tree745b120875191ec08342a418ff175498eedf52c6
parent83617317d2136ca18265955de7782c33be27ff62
ftgmac100: Cleanup tx queue handling

We have a private lock which isn't terribly useful, and we maintain
a "tx_pending" counter for information that's already available
via a trivial arithmetic operation. Then we unconditionaly wake
the queue even when not stopped. Finally our code in tx isn't
really safe vs. a concurrent reclaim. The aspeed chips aren't SMP
today but I prefer the code being right and future proof.

So rip that out and replace it with more "standard" queue handling,
currently with a threshold of 1 queue element, which will be
increased when we implement fragmented sends.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/faraday/ftgmac100.c