diff options
author | Ganesh Goudar <ganeshgr@chelsio.com> | 2017-05-31 18:26:28 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-02 14:06:23 -0400 |
commit | e7519f9926f1d0d11c776eb0475eb098c7760f68 (patch) | |
tree | 0b9689526922b65c31b4e05ae16d4efab4bbac1f /drivers | |
parent | 6e80ac5cc992ab6256c3dae87f7e57db15e1a58c (diff) |
cxgb4: avoid enabling napi twice to the same queue
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index b512149684fd..77ed2f628f9c 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c @@ -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); |