Jeff Garzik <jgarzik@xxxxxxxxx> :
[tulip_media_select]
1) called from timer context, from the media poll timer
2) called from spin_lock_irqsave() context, in the ->tx_timeout hook.
The first case can be fixed by moved all the timer code to a workqueue. Then when the existing timer fires, kick the workqueue.
The second case can be fixed by kicking the workqueue upon tx_timeout (which is the reason why I did not suggest queue_delayed_work() use).
First try below. It only moves tulip_select_media() to process context.
The original patch (with s/udelay/msleep/ or such) is not included.
Patch applies/compiles against 2.6.12-rc4.