From: Carl-Daniel Hailfinger Fix a hang on Yukon-EC (0xb6) rev 1 where suddenly no more interrupts were delivered. I don't know the real cause of the hang due to lack of docs, but the patch has been running stable for a few hours whereas the unmodified driver will hang after less than 2 minutes. Signed-off-by: Carl-Daniel Hailfinger Cc: Stephen Hemminger Signed-off-by: Andrew Morton --- drivers/net/sky2.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+) diff -puN drivers/net/sky2.c~sky2-fix-hang-on-yukon-ec-0xb6-rev-1 drivers/net/sky2.c --- 25/drivers/net/sky2.c~sky2-fix-hang-on-yukon-ec-0xb6-rev-1 Tue Jan 31 13:11:45 2006 +++ 25-akpm/drivers/net/sky2.c Tue Jan 31 13:11:45 2006 @@ -1913,8 +1913,26 @@ static int sky2_poll(struct net_device * } exit_loop: + /* Is this really a good idea? + * We clear all IRQs although there may be pending work due to + * - packets arrived since start of this function + * - the (++work_done >= to_do) abort + */ sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ); + /* Pending resolution of the comment above, at least kick the + * STAT_LEV_TIMER_CTRL timer. + * This fixes my hangs on Yukon-EC (0xb6) rev 1. + * The if clause is there to start the timer only if it has been + * configured correctly and not been disabled via ethtool. + * Maybe it would be sufficient to only restart the timer if + * there is pending work. Without docs, that is hard to say. + */ + if (sky2_read8(hw, STAT_LEV_TIMER_CTRL) == TIM_START) { + sky2_write8(hw, STAT_LEV_TIMER_CTRL, TIM_STOP); + sky2_write8(hw, STAT_LEV_TIMER_CTRL, TIM_START); + } + sky2_tx_check(hw, 0, tx_done[0]); sky2_tx_check(hw, 1, tx_done[1]); _