]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ftgmac100: Use a scratch buffer for failed RX allocations
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 6 Apr 2017 01:02:45 +0000 (11:02 +1000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Apr 2017 22:39:45 +0000 (15:39 -0700)
commitd72e01a0430f8a1ae7adb3cbf0b2e73fcd99252e
tree14e9d4bc90f89704122ac9400acb3587cf48e2c3
parentb1977bfbca569426651ac47e0f99d279f00f8a94
ftgmac100: Use a scratch buffer for failed RX allocations

We can occasionally fail to allocate new RX buffers at
runtime or when starting the driver. At the moment the
latter just fails to open which is fine but the former
leaves stale DMA pointers in the ring.

Instead, use a scratch page and have all RX ring descriptors
point to it by default unless a proper buffer can be allocated.

It will help later on when re-initializing the whole ring
at runtime on link changes since there is no clean failure
path there unlike open().

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