• Hayes Wang's avatar
    r8152: avoid to call napi_disable twice · 5b1d9c17
    Hayes Wang authored
    Call napi_disable() twice would cause dead lock. There are three situations
    may result in the issue.
    
    1. rtl8152_pre_reset() and set_carrier() are run at the same time.
    2. Call rtl8152_set_tunable() after rtl8152_close().
    3. Call rtl8152_set_ringparam() after rtl8152_close().
    
    For #1, use the same solution as commit 84811412 ("r8152: Re-order
    napi_disable in rtl8152_close"). For #2 and #3, add checking the flag
    of IFF_UP and using napi_disable/napi_enable during mutex.
    Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5b1d9c17
r8152.c 133 KB