Commit:     8cfcbe998aa0459e20bbad61376f81c1715b25d6
Parent:     4c537e6371a9510c82eb96fb7e1e66017e0e2053
Author:     Stephen Hemminger <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 3 17:02:17 2007 -0800
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue Dec 4 14:53:22 2007 -0500

    sky2: recovery deadlock fix
    Prevent deadlock in sky2 recovery logic. sky2_down calls napi_synchronize
    which gets stuck if napi was already disabled.
    Fix by rearranging slightly and not calling napi_disable until after
    both ports are stopped. The napi_disable probably is being overly
    paranoid, but it is safe now.
    Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
 drivers/net/sky2.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 3d1dfc9..6197afb 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2906,16 +2906,14 @@ static void sky2_restart(struct work_struct *work)
        int i, err;
-       sky2_write32(hw, B0_IMSK, 0);
-       sky2_read32(hw, B0_IMSK);
-       napi_disable(&hw->napi);
        for (i = 0; i < hw->ports; i++) {
                dev = hw->dev[i];
                if (netif_running(dev))
+       napi_disable(&hw->napi);
+       sky2_write32(hw, B0_IMSK, 0);
        sky2_write32(hw, B0_IMSK, Y2_IS_BASE);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to