aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/sungem.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index 4ceb3cf6a9a9..9e992ca4f543 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -2380,10 +2380,8 @@ static int gem_suspend(struct pci_dev *pdev, pm_message_t state)
2380 */ 2380 */
2381 mutex_unlock(&gp->pm_mutex); 2381 mutex_unlock(&gp->pm_mutex);
2382 2382
2383 /* Wait for a pending reset task to complete */ 2383 /* Wait for the pending reset task to complete */
2384 while (gp->reset_task_pending) 2384 flush_work_sync(&gp->reset_task);
2385 yield();
2386 flush_scheduled_work();
2387 2385
2388 /* Shut the PHY down eventually and setup WOL */ 2386 /* Shut the PHY down eventually and setup WOL */
2389 gem_stop_phy(gp, gp->asleep_wol); 2387 gem_stop_phy(gp, gp->asleep_wol);
@@ -2928,10 +2926,8 @@ static void gem_remove_one(struct pci_dev *pdev)
2928 /* We shouldn't need any locking here */ 2926 /* We shouldn't need any locking here */
2929 gem_get_cell(gp); 2927 gem_get_cell(gp);
2930 2928
2931 /* Wait for a pending reset task to complete */ 2929 /* Cancel reset task */
2932 while (gp->reset_task_pending) 2930 cancel_work_sync(&gp->reset_task);
2933 yield();
2934 flush_scheduled_work();
2935 2931
2936 /* Shut the PHY down */ 2932 /* Shut the PHY down */
2937 gem_stop_phy(gp, 0); 2933 gem_stop_phy(gp, 0);