ravb: fix ring memory allocation
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Tue, 21 Jul 2015 22:31:59 +0000 (01:31 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Jul 2015 05:34:27 +0000 (22:34 -0700)
commitd8b48911fd249bc1a3431a9515619403c96d6af3
tree8c2c420f08b034b03499ac9d8a0dd27d73f0a6ab
parenta46fa260f6f5e8f80a725b28e4aee5a04d1bd79e
ravb: fix ring memory allocation

The driver is written as if it can adapt to a low memory situation  allocating
less RX  skbs and TX aligned buffers than the respective RX/TX ring sizes.  In
reality  though  the driver  would malfunction in this case. Stop being overly
smart and just fail in such situation -- this is achieved by moving the memory
allocation from ravb_ring_format() to ravb_ring_init().

We leave dma_map_single() calls in place but make their failure non-fatal
by marking the corresponding RX descriptors  with zero data size which should
prevent DMA to an invalid addresses.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/ravb_main.c
This page took 0.026076 seconds and 5 git commands to generate.