]> git.baikalelectronics.ru Git - kernel.git/commit
tile: fix panic bug in napi support for tilegx network driver
authorChris Metcalf <cmetcalf@tilera.com>
Thu, 1 Aug 2013 15:36:42 +0000 (11:36 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Aug 2013 21:35:50 +0000 (14:35 -0700)
commitc75db399f28a5b550927a0422f185d0386e1c9c7
tree0337e2ae87443c788ec4469f0c9e5f206e960069
parent5534d0f834b300d15eae6811a4f73d93b516c1cb
tile: fix panic bug in napi support for tilegx network driver

The code used to call napi_disable() in an interrupt handler
(from smp_call_function), which in turn could call msleep().
Unfortunately you can't sleep in an interrupt context.

Luckily it turns out all the NAPI support functions are
just operating on data structures and not on any deeply
per-cpu data, so we can arrange to set up and tear down all
the NAPI state on the core driving the process, and just
do the IRQ enable/disable as a smp_call_function thing.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/tile/tilegx.c