* [PATCH net] cxgb4: avoid enabling napi twice to the same queue
@ 2017-05-31 12:56 Ganesh Goudar
2017-06-02 18:06 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Ganesh Goudar @ 2017-05-31 12:56 UTC (permalink / raw)
To: netdev, davem; +Cc: nirranjan, indranil, Ganesh Goudar
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>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index b512149..77ed2f6 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);
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] cxgb4: avoid enabling napi twice to the same queue
2017-05-31 12:56 [PATCH net] cxgb4: avoid enabling napi twice to the same queue Ganesh Goudar
@ 2017-06-02 18:06 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-06-02 18:06 UTC (permalink / raw)
To: ganeshgr; +Cc: netdev, nirranjan, indranil
From: Ganesh Goudar <ganeshgr@chelsio.com>
Date: Wed, 31 May 2017 18:26:28 +0530
> 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>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-02 18:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-31 12:56 [PATCH net] cxgb4: avoid enabling napi twice to the same queue Ganesh Goudar
2017-06-02 18:06 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.