Skip to content

Commit

Permalink
cxgb4: avoid enabling napi twice to the same queue
Browse files Browse the repository at this point in the history
Take uld mutex to avoid race between cxgb_up() and
cxgb4_register_uld() to enable napi for the same uld
queue.

Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ganesh Goudar authored and David S. Miller committed Jun 2, 2017
1 parent 6e80ac5 commit e7519f9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2196,10 +2196,14 @@ static int cxgb_up(struct adapter *adap)
if (err)
goto irq_err;
}

mutex_lock(&uld_mutex);
enable_rx(adap);
t4_sge_start(adap);
t4_intr_enable(adap);
adap->flags |= FULL_INIT_DONE;
mutex_unlock(&uld_mutex);

notify_ulds(adap, CXGB4_STATE_UP);
#if IS_ENABLED(CONFIG_IPV6)
update_clip(adap);
Expand Down

0 comments on commit e7519f9

Please sign in to comment.