Skip to content
  • Stefan Roese's avatar
    net: macb: Fix rx buffer cache handling · 5ccd657b
    Stefan Roese authored and Joe Hershberger's avatar Joe Hershberger committed
    With commit c6d07bf4
    
     ("net/macb: increase RX buffer size for GEM")
    ethernet support does not work any more with d-cache enabled on the
    AT91SAM. The reason is, that MACB_RX_BUFFER_SIZE was changed from 4096
    to 128 but this change was not refected in the rx_buffer flush and
    invalidate functions, as these also use this macro.
    
    This patch now fixes this by calculating the rx buffer size correctly
    again in those functions. With this change, ethernet works again
    reliably on my AT91SAM board.
    
    Signed-off-by: default avatarStefan Roese <sr@denx.de>
    Fixes: c6d07bf4
    
     ("net/macb: increase RX buffer size for GEM")
    Cc: Ramon Fried <rfried.dev@gmail.com>
    Cc: Eugen Hristev <eugen.hristev@microchip.com>
    Cc: Anup Patel <anup.patel@wdc.com>
    Cc: Bin Meng <bmeng.cn@gmail.com>
    Cc: Joe Hershberger <joe.hershberger@ni.com>
    Reviewed-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
    Tested-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
    Acked-by: Joe Hershberger's avatarJoe Hershberger <joe.hershberger@ni.com>
    5ccd657b