]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[SUNGEM]: Fix suspend regression due to NAPI changes.
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 13 Nov 2007 02:09:25 +0000 (18:09 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Nov 2007 02:09:25 +0000 (18:09 -0800)
commit62768e28d606c10ba54217f908123de34dad9374
treee245674de36746c80ec9ddd62e821d2244fbea5b
parentcd228d5458186f66bc36c4884f4f26ed955c5945
[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 <johannes@sipsolutions.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/sungem.c