• Finn Thain's avatar
    net/sonic: Fix receive buffer handling · 9e311820
    Finn Thain authored
    The SONIC can sometimes advance its rx buffer pointer (RRP register)
    without advancing its rx descriptor pointer (CRDA register). As a result
    the index of the current rx descriptor may not equal that of the current
    rx buffer. The driver mistakenly assumes that they are always equal.
    This assumption leads to incorrect packet lengths and possible packet
    duplication. Avoid this by calling a new function to locate the buffer
    corresponding to a given descriptor.
    
    Fixes: efcce839 ("[PATCH] macsonic/jazzsonic network drivers update")
    Tested-by: default avatarStan Johnson <userm57@yahoo.com>
    Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9e311820
sonic.c 21.7 KB