• Sergei Shtylyov's avatar
    ravb: fix ring memory allocation · d8b48911
    Sergei Shtylyov authored
    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: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    d8b48911
ravb_main.c 46 KB