• Giuseppe CAVALLARO's avatar
    stmmac: add Rx watchdog support to mitigate the DMA irqs · 62a2ab93
    Giuseppe CAVALLARO authored
    GMAC devices newer than databook 3.40 has an embedded timer
    that can be used for mitigating the number of interrupts.
    So this patch adds this optimizations.
    
    At any rate, the Rx watchdog can be disable (on bugged HW) by
    passing from the platform the riwt_off field.
    
    In this implementation the rx timer stored in the Reg9 is fixed
    to the max value. This will be tuned by using ethtool.
    
    V2: added a platform parameter to force to disable the rx-watchdog
    for example on new core where it is bugged.
    
    V3: do not disable NAPI when Rx watchdog is used.
    
    V4: a new extra statistic field has been added to show the early
    receive status in the interrupt handler.
    This patch also adds an extra check to avoid to call
    napi_schedule when the DMA_INTR_ENA_RIE bit is disabled in the
    Interrupt Mask register.
    Signed-off-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    62a2ab93
dwmac1000_dma.c 6.09 KB