• Claudiu Manoil's avatar
    gianfar: Fix tx napi polling · c233cf40
    Claudiu Manoil authored
    There are 2 issues with the current napi poll routine, with regards
    to tx ring cleanup:
    1) for multi-queue devices (MQ_MG_MODE), should tx_bit_map != rx_bit_map,
    which is possible (and supported in h/w) if the DT property "fsl,tx-bit-map"
    holds a different value than rx_bit_map, the current polling routine will
    service the wrong Tx queues in this case (i.e. the interrupt group will
    receive interrupts from tx queues that it will not service)
    2) Tx cleanup completion consumes napi budget, whereas the napi budget
    should be reserved for Rx work only.
    
    The patch fixes these issues and provides a clean napi polling routine.
    Napi poll completion is reached when all the Rx queues have been
    serviced and there is no Tx work to do.
    Signed-off-by: default avatarClaudiu Manoil <claudiu.manoil@freescale.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c233cf40
gianfar.c 86.1 KB