• Claudiu Manoil's avatar
    gianfar: Fix Tx int miss, dont write IC on-the-fly · f19015ba
    Claudiu Manoil authored
    Programming the interrupt coalescing (IC) registers while
    the controller/DMA is on may incur the loss of one Tx
    confirmation interrupt, under certain conditions.  This is
    a subtle hw race because it does not occur during a burst
    of Tx packets.  It has been observed on p2020 devices that,
    if just one packet is being xmit'ed, the Tx confirmation
    doesn't trigger and BQL evetually blocks the Tx queues,
    followed by Tx timeout and an un-responsive device.
    This issue was not apparent prior to introducing BQL
    support, as a late Tx confirmation was not an issue back then
    and the next burst of Tx frames would have triggered the
    Tx confirmation/ Tx ring cleanup anyway.
    
    Bottom line, the hw specifications state that the IC registers
    should not be programmed while the Rx/Tx blocks (the DMA) are
    enabled. Further more, these registers are currently re-written
    with the same values on the processing path, over and over again.
    To fix this, rewriting the IC registers has been removed from
    the processing path (napi poll).  A complete MAC reset procedure
    has been implemented for the ethtool -c option instead, to
    reliably update these registers while the controller is stopped.
    Signed-off-by: default avatarClaudiu Manoil <claudiu.manoil@freescale.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f19015ba
gianfar_ethtool.c 49.2 KB