netdev
[Top] [All Lists]

Re: patch tulip-natsemi-dp83840a-phy-fix.patch added to -mm tree

To: Francois Romieu <romieu@xxxxxxxxxxxxx>
Subject: Re: patch tulip-natsemi-dp83840a-phy-fix.patch added to -mm tree
From: Jeff Garzik <jgarzik@xxxxxxxxx>
Date: Thu, 26 May 2005 22:16:50 -0400
Cc: Grant Grundler <grundler@xxxxxxxxxxxxxxxx>, akpm@xxxxxxxx, T-Bone@xxxxxxxxxxxxxxxx, varenet@xxxxxxxxxxxxxxxx, Linux Kernel <linux-kernel@xxxxxxxxxxxxxxx>, Netdev <netdev@xxxxxxxxxxx>
In-reply-to: <20050521223959.GA4337@xxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <200505101955.j4AJtX9x032464@xxxxxxxxxxxxxxxxxxx> <42881C58.40001@xxxxxxxxx> <20050516050843.GA20107@xxxxxxxxxxxxxxx> <4288CE51.1050703@xxxxxxxxx> <20050521223959.GA4337@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050328 Fedora/1.7.6-1.2.5
Francois Romieu wrote:
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.

Looks pretty good to me, at first look.

I'll give it some thought, and probably apply it, in a few days.

        Jeff




<Prev in Thread] Current Thread [Next in Thread>