• Matt Carlson's avatar
    tg3: Schedule at most one tg3_reset_task run · db219973
    Matt Carlson authored
    It is possible for multiple threads in the tg3 driver to each attempt to
    schedule a run of tg3_reset_task().  The multiple tg3_reset_task
    executions could all wind up on the same queue (and execute serially) or
    wind up on the queues of another processor (which could execute in
    parallel).  Either scenario is not what was truly desired.
    
    This patch adds a new flag, TG3_FLAG_RESET_TASK_PENDING, and uses it to
    determine whether or not to schedule another run of tg3_reset_task().
    With the new flag comes two new functions to facilitate scheduling and
    descheduling of tg3_reset_task().
    Signed-off-by: default avatarMatt Carlson <mcarlson@broadcom.com>
    Reviewed-by: default avatarMichael Chan <mchan@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    db219973
tg3.c 416 KB