]> git.baikalelectronics.ru Git - kernel.git/commit
bnx2x: Move statistics implementation into semaphores
authorYuval Mintz <Yuval.Mintz@qlogic.com>
Mon, 1 Jun 2015 12:08:18 +0000 (15:08 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Jun 2015 19:04:31 +0000 (12:04 -0700)
commitc334288e11589e94018c10db2c02aca939d35243
tree6ba06f3353eaff41b0a9ccc01d9418033a3e4ed5
parent8c79fb98bf8705eda39a3c0595f875bb825235ce
bnx2x: Move statistics implementation into semaphores

Commit c1386177a2268 ("bnx2x: Fix statistics locking scheme") changed the
bnx2x locking around statistics state into using a mutex - but the lock
is being accessed via a timer which is forbidden.

[If compiled with CONFIG_DEBUG_MUTEXES, logs show a warning about
accessing the mutex in interrupt context]

This moves the implementation into using a semaphore [with size '1']
instead.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c