* [PATCH] sky2: fix hang on Yukon-EC (0xb6) rev 1
@ 2006-01-24 13:19 Carl-Daniel Hailfinger
0 siblings, 0 replies; only message in thread
From: Carl-Daniel Hailfinger @ 2006-01-24 13:19 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Linux Kernel Mailing List, netdev
This patch for sky2 fixes 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.
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
--- linux-2.6.15/drivers/net/sky2.c 2006-01-23 23:41:35.000000000 +0100
+++ linux-2.6.15/drivers/net/sky2.c 2006-01-24 14:12:12.000000000 +0100
@@ -1913,8 +1913,26 @@
}
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]);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-01-24 13:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-24 13:19 [PATCH] sky2: fix hang on Yukon-EC (0xb6) rev 1 Carl-Daniel Hailfinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).