[PATCH] sungem: fix suspend regression due to NAPI changes

David Miller davem at davemloft.net
Tue Nov 13 13:09:46 EST 2007


From: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Date: Tue, 13 Nov 2007 09:32:46 +1100

> 
> On Mon, 2007-11-12 at 18:45 +0100, Johannes Berg wrote:
> > Commit bea3348e (the NAPI changes) made sungem unconditionally enable
> > NAPI when resuming and unconditionally disable when suspending, this,
> > however, makes napi_disable() hang when suspending when the interface
> > was taken down before suspend because taking the interface down also
> > disables NAPI. This patch makes touching the napi struct in
> > suspend/resume code paths depend on having the interface up, thereby
> > fixing the hang on suspend.
> > 
> > The patch also moves the napi_disable() in gem_close() under the lock so
> > that the NAPI state is always modified atomically together with the
> > "opened" variable.
> > 
> > Signed-off-by: Johannes Berg <johannes at sipsolutions.net>
> 
> Thanks for fixing that !
> 
> Acked-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>

Indeed, thanks a lot Johannes.

Patch applied.



More information about the Linuxppc-dev mailing list