qlge: fix a eeh handler to not add a pending timer
authorBreno Leitao <leitao@linux.vnet.ibm.com>
Thu, 1 Jul 2010 03:00:18 +0000 (03:00 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Jul 2010 04:59:06 +0000 (21:59 -0700)
On some ocasions the function qlge_io_resume() tries to add a
pending timer, which causes the system to hit the BUG() on
add_timer() function.

This patch removes the timer during the EEH recovery.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/qlge/qlge_main.c

index 509dadcd1c5aba1f70f13a936bc59d7ebfa1934f..d10bcefc0e45442aae6c468b622d9c9651249e30 100644 (file)
@@ -4712,6 +4712,8 @@ static void ql_eeh_close(struct net_device *ndev)
                netif_stop_queue(ndev);
        }
 
+       /* Disabling the timer */
+       del_timer_sync(&qdev->timer);
        if (test_bit(QL_ADAPTER_UP, &qdev->flags))
                cancel_delayed_work_sync(&qdev->asic_reset_work);
        cancel_delayed_work_sync(&qdev->mpi_reset_work);