From: Johannes Berg Date: Tue, 13 Nov 2007 02:09:25 +0000 (-0800) Subject: [SUNGEM]: Fix suspend regression due to NAPI changes. X-Git-Tag: v2.6.24-rc3~145^2~29 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62768e28d606c10ba54217f908123de34dad9374;p=pandora-kernel.git [SUNGEM]: Fix suspend regression due to NAPI changes. 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 Acked-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller --- Reading git-diff-tree failed