Commit 75d1a752 authored by Toshiharu Okada's avatar Toshiharu Okada Committed by David S. Miller

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: default avatarToshiharu Okada <toshiharu-linux@dsn.okisemi.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c69b9092
...@@ -519,7 +519,9 @@ static void pch_gbe_reset_task(struct work_struct *work) ...@@ -519,7 +519,9 @@ static void pch_gbe_reset_task(struct work_struct *work)
struct pch_gbe_adapter *adapter; struct pch_gbe_adapter *adapter;
adapter = container_of(work, struct pch_gbe_adapter, reset_task); adapter = container_of(work, struct pch_gbe_adapter, reset_task);
rtnl_lock();
pch_gbe_reinit_locked(adapter); pch_gbe_reinit_locked(adapter);
rtnl_unlock();
} }
/** /**
...@@ -528,14 +530,8 @@ static void pch_gbe_reset_task(struct work_struct *work) ...@@ -528,14 +530,8 @@ static void pch_gbe_reset_task(struct work_struct *work)
*/ */
void pch_gbe_reinit_locked(struct pch_gbe_adapter *adapter) void pch_gbe_reinit_locked(struct pch_gbe_adapter *adapter)
{ {
struct net_device *netdev = adapter->netdev; pch_gbe_down(adapter);
pch_gbe_up(adapter);
rtnl_lock();
if (netif_running(netdev)) {
pch_gbe_down(adapter);
pch_gbe_up(adapter);
}
rtnl_unlock();
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment