netdev
[Top] [All Lists]

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

To: Grant Grundler <grundler@xxxxxxxxxxxxxxxx>
Subject: Re: patch tulip-natsemi-dp83840a-phy-fix.patch added to -mm tree
From: Jeff Garzik <jgarzik@xxxxxxxxx>
Date: Mon, 16 May 2005 12:46:09 -0400
Cc: akpm@xxxxxxxx, T-Bone@xxxxxxxxxxxxxxxx, varenet@xxxxxxxxxxxxxxxx, Linux Kernel <linux-kernel@xxxxxxxxxxxxxxx>, Netdev <netdev@xxxxxxxxxxx>
In-reply-to: <20050516050843.GA20107@colo.lackof.org>
References: <200505101955.j4AJtX9x032464@shell0.pdx.osdl.net> <42881C58.40001@pobox.com> <20050516050843.GA20107@colo.lackof.org>
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
Simply ensure that tulip_select_media() is always called from a process context. Then can you delay all you want. Several of the calls are already this way, so that leaves two cases:

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).

See, it's not rocket science :)

        Jeff




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