Skip to content

Commit e7519f9

Browse files
Ganesh Goudardavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6e80ac5 commit e7519f9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,10 +2196,14 @@ static int cxgb_up(struct adapter *adap)
21962196
if (err)
21972197
goto irq_err;
21982198
}
2199+
2200+
mutex_lock(&uld_mutex);
21992201
enable_rx(adap);
22002202
t4_sge_start(adap);
22012203
t4_intr_enable(adap);
22022204
adap->flags |= FULL_INIT_DONE;
2205+
mutex_unlock(&uld_mutex);
2206+
22032207
notify_ulds(adap, CXGB4_STATE_UP);
22042208
#if IS_ENABLED(CONFIG_IPV6)
22052209
update_clip(adap);

0 commit comments

Comments
 (0)