Re: [patch 3/6] 2.6.18: sb1250-mac: Phylib IRQ handling fixes

2006-12-04 Thread Andy Fleming
On Nov 30, 2006, at 12:07, Maciej W. Rozycki wrote: On Mon, 23 Oct 2006, Maciej W. Rozycki wrote: I'm not too enthusiastic about requiring the ethernet drivers to call phy_disconnect in a separate thread after "close" is called. Assuming there's not some sort of "squash work queue" functi

Re: [patch 3/6] 2.6.18: sb1250-mac: Phylib IRQ handling fixes

2006-11-30 Thread Maciej W. Rozycki
On Mon, 23 Oct 2006, Maciej W. Rozycki wrote: > > I'm not too enthusiastic about requiring the ethernet drivers to call > > phy_disconnect in a separate thread after "close" is called. Assuming > > there's > > not some sort of "squash work queue" function that can be invoked with > > rtnl_lock h

Re: [patch 3/6] 2.6.18: sb1250-mac: Phylib IRQ handling fixes

2006-10-23 Thread Maciej W. Rozycki
On Fri, 20 Oct 2006, Andy Fleming wrote: > I've been trying to figure out this problem since you posted this, and I'm not > sure I understand it fully (And I apologize profusely for the horror that is > the PHY interrupt handling code. I'd love to rewrite it if there's some First of all I don't

Re: [patch 3/6] 2.6.18: sb1250-mac: Phylib IRQ handling fixes

2006-10-20 Thread Andrew Morton
On Fri, 20 Oct 2006 16:40:20 -0500 Andy Fleming <[EMAIL PROTECTED]> wrote: > >The solution is to ignore phy_interrupt() calls if the reported > > device > >has already been halted and calling flush_scheduled_work() from > >phy_stop_interrupts() (but guarded with current_is_keventd()

Re: [patch 3/6] 2.6.18: sb1250-mac: Phylib IRQ handling fixes

2006-10-20 Thread Andy Fleming
On Oct 3, 2006, at 10:18, Maciej W. Rozycki wrote: Hello, This patch fixes a couple of problems discovered with interrupt handling in the phylib core, namely: 1. The driver uses timer and workqueue calls, but does not include nor . Good catch. 2. The driver uses schedule_work()

Re: [patch 3/6] 2.6.18: sb1250-mac: Phylib IRQ handling fixes

2006-10-17 Thread Maciej W. Rozycki
On Mon, 16 Oct 2006, Andrew Morton wrote: > Vaguely. Why doesn't it deadlock if !current_is_keventd()? I mean, > whether or not the caller is keventd, the flush_scheduled_work() caller > will still be dependent upon rtnl_lock() being acquirable. This !current_is_keventd() condition is just wha

Re: [patch 3/6] 2.6.18: sb1250-mac: Phylib IRQ handling fixes

2006-10-16 Thread Andrew Morton
On Mon, 16 Oct 2006 15:50:55 +0100 (BST) "Maciej W. Rozycki" <[EMAIL PROTECTED]> wrote: > Andrew, > > > I don't get it. If some code does > > > > rtnl_lock(); > > flush_scheduled_work(); > > > > and there's some work scheduled which does rtnl_lock() then it'll deadlock. > > > > But it

Re: [patch 3/6] 2.6.18: sb1250-mac: Phylib IRQ handling fixes

2006-10-16 Thread Maciej W. Rozycki
Andrew, > I don't get it. If some code does > > rtnl_lock(); > flush_scheduled_work(); > > and there's some work scheduled which does rtnl_lock() then it'll deadlock. > > But it'll deadlock whether or not the caller of flush_scheduled_work() is > keventd. > > Calling flush_schedul

Re: [patch 3/6] 2.6.18: sb1250-mac: Phylib IRQ handling fixes

2006-10-06 Thread Andrew Morton
On Fri, 6 Oct 2006 12:26:22 +0100 (BST) "Maciej W. Rozycki" <[EMAIL PROTECTED]> wrote: > On Thu, 5 Oct 2006, Andrew Morton wrote: > > > > 2. The driver uses schedule_work() for handling interrupts, but does not > > >make sure any pending work scheduled thus has been completed before > > >

Re: [patch 3/6] 2.6.18: sb1250-mac: Phylib IRQ handling fixes

2006-10-06 Thread Maciej W. Rozycki
On Thu, 5 Oct 2006, Andrew Morton wrote: > > 2. The driver uses schedule_work() for handling interrupts, but does not > >make sure any pending work scheduled thus has been completed before > >driver's structures get freed from memory. This is especially > >important as interrupts m

Re: [patch 3/6] 2.6.18: sb1250-mac: Phylib IRQ handling fixes

2006-10-05 Thread Andrew Morton
On Tue, 3 Oct 2006 16:18:35 +0100 (BST) "Maciej W. Rozycki" <[EMAIL PROTECTED]> wrote: > > 2. The driver uses schedule_work() for handling interrupts, but does not >make sure any pending work scheduled thus has been completed before >driver's structures get freed from memory. This is e

[patch 3/6] 2.6.18: sb1250-mac: Phylib IRQ handling fixes

2006-10-03 Thread Maciej W. Rozycki
Hello, This patch fixes a couple of problems discovered with interrupt handling in the phylib core, namely: 1. The driver uses timer and workqueue calls, but does not include nor . 2. The driver uses schedule_work() for handling interrupts, but does not make sure any pending work sche