netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pch_gbe: Fix the issue which a driver locks when rx offload is set by ethtool
@ 2011-02-08 11:33 Toshiharu Okada
  2011-02-09  0:40 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Toshiharu Okada @ 2011-02-08 11:33 UTC (permalink / raw)
  To: ML netdev, David S. Miller
  Cc: Tomoya Morinaga, Wang, Qi, Wang, Yong Y, Andrew, Intel OTC,
	Ewe, Kok Howg, LKML

This driver will be in a deadlock, When the rx offload is set by ethtool.
So, The pch_gbe_reinit_locked function was modified.

Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
---
 drivers/net/pch_gbe/pch_gbe_main.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/net/pch_gbe/pch_gbe_main.c b/drivers/net/pch_gbe/pch_gbe_main.c
index 3248313..0e6922f 100644
--- a/drivers/net/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/pch_gbe/pch_gbe_main.c
@@ -520,7 +520,9 @@ static void pch_gbe_reset_task(struct work_struct *work)
 	struct pch_gbe_adapter *adapter;
 	adapter = container_of(work, struct pch_gbe_adapter, reset_task);
 
+	rtnl_lock();
 	pch_gbe_reinit_locked(adapter);
+	rtnl_unlock();
 }
 
 /**
@@ -531,12 +533,8 @@ void pch_gbe_reinit_locked(struct pch_gbe_adapter *adapter)
 {
 	struct net_device *netdev = adapter->netdev;
 
-	rtnl_lock();
-	if (netif_running(netdev)) {
-		pch_gbe_down(adapter);
-		pch_gbe_up(adapter);
-	}
-	rtnl_unlock();
+	pch_gbe_down(adapter);
+	pch_gbe_up(adapter);
 }
 
 /**
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-02-09  7:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-08 11:33 [PATCH] pch_gbe: Fix the issue which a driver locks when rx offload is set by ethtool Toshiharu Okada
2011-02-09  0:40 ` David Miller
2011-02-09  2:04   ` Toshiharu Okada
2011-02-09  6:57     ` David Miller
2011-02-09  7:04       ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).