• Hayes Wang's avatar
    r8152: fix flow control issue of RTL8156A · 8ceda6d5
    Hayes Wang authored
    The feature of flow control becomes abnormal, if the device sends a
    pause frame and the tx/rx is disabled before sending a release frame. It
    causes the lost of packets.
    
    Set PLA_RX_FIFO_FULL and PLA_RX_FIFO_EMPTY to zeros before disabling the
    tx/rx. And, toggle FC_PATCH_TASK before enabling tx/rx to reset the flow
    control patch and timer. Then, the hardware could clear the state and
    the flow control becomes normal after enabling tx/rx.
    
    Besides, remove inline for fc_pause_on_auto() and fc_pause_off_auto().
    
    Fixes: 195aae32 ("r8152: support new chips")
    Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8ceda6d5
r8152.c 236 KB