• Michael Chan's avatar
    [BNX2]: Fix occasional counter corruption on 5708. · 02537b06
    Michael Chan authored
    The statistics block DMA on 5708 can be messed up occasionally on the
    average of about once per hour.  If the user is reading the counters
    within one second after the corruption, the counters will be all
    messed up.  One second later, the counters will be ok again until the
    next corruption occurs.
    
    The workaround is to disable the periodic statistics DMA.  Instead,
    we manually trigger the DMA once a second in bnx2_timer().  This
    manual trigger of the DMA avoids the problem.
    
    As a consequence, we can only allow 0 or 1 second settings for
    ethtool -C statistics block.
    
    Thanks to Jean-Daniel Pauget <jd@disjunkt.com> and
    CaT <cat@zip.com.au> for reporting this rare problem.
    Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
    Acked-by: default avatarJeff Garzik <jeff@garzik.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    02537b06
bnx2.c 157 KB