aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/pch_gbe
diff options
context:
space:
mode:
authorToshiharu Okada <toshiharu-linux@dsn.okisemi.com>2011-02-09 12:28:06 -0800
committerDavid S. Miller <davem@davemloft.net>2011-02-09 12:28:06 -0800
commit75d1a7522f8b3f4de3eea040fdcdb640deeda64d (patch)
treea2e7d99b70dc9f9d6b6f3518df29a303b1095ca6 /drivers/net/pch_gbe
parentc69b90920a36b88ab0d649963d81355d865eeb05 (diff)
pch_gbe: Fix the issue which a driver locks when rx offload is set by ethtool
This driver will be in a deadlock, When the rx offload is set by ethtool. The pch_gbe_reinit_locked function was modified. Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/pch_gbe')
-rw-r--r--drivers/net/pch_gbe/pch_gbe_main.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/pch_gbe/pch_gbe_main.c b/drivers/net/pch_gbe/pch_gbe_main.c
index 1bf12339441..4c9a7d4f3fc 100644
--- a/drivers/net/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/pch_gbe/pch_gbe_main.c
@@ -519,7 +519,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();
}
/**
@@ -528,14 +530,8 @@ static void pch_gbe_reset_task(struct work_struct *work)
*/
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);
}
/**