diff options
author | Toshiharu Okada <toshiharu-linux@dsn.okisemi.com> | 2011-02-09 15:28:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-09 15:28:06 -0500 |
commit | 75d1a7522f8b3f4de3eea040fdcdb640deeda64d (patch) | |
tree | a2e7d99b70dc9f9d6b6f3518df29a303b1095ca6 /drivers/net | |
parent | c69b90920a36b88ab0d649963d81355d865eeb05 (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')
-rw-r--r-- | drivers/net/pch_gbe/pch_gbe_main.c | 12 |
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 1bf12339441b..4c9a7d4f3fca 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) | |||
519 | struct pch_gbe_adapter *adapter; | 519 | struct pch_gbe_adapter *adapter; |
520 | adapter = container_of(work, struct pch_gbe_adapter, reset_task); | 520 | adapter = container_of(work, struct pch_gbe_adapter, reset_task); |
521 | 521 | ||
522 | rtnl_lock(); | ||
522 | pch_gbe_reinit_locked(adapter); | 523 | pch_gbe_reinit_locked(adapter); |
524 | rtnl_unlock(); | ||
523 | } | 525 | } |
524 | 526 | ||
525 | /** | 527 | /** |
@@ -528,14 +530,8 @@ static void pch_gbe_reset_task(struct work_struct *work) | |||
528 | */ | 530 | */ |
529 | void pch_gbe_reinit_locked(struct pch_gbe_adapter *adapter) | 531 | void pch_gbe_reinit_locked(struct pch_gbe_adapter *adapter) |
530 | { | 532 | { |
531 | struct net_device *netdev = adapter->netdev; | 533 | pch_gbe_down(adapter); |
532 | 534 | pch_gbe_up(adapter); | |
533 | rtnl_lock(); | ||
534 | if (netif_running(netdev)) { | ||
535 | pch_gbe_down(adapter); | ||
536 | pch_gbe_up(adapter); | ||
537 | } | ||
538 | rtnl_unlock(); | ||
539 | } | 535 | } |
540 | 536 | ||
541 | /** | 537 | /** |