]> git.baikalelectronics.ru Git - kernel.git/commit
ionic: make all rx_mode work threadsafe
authorShannon Nelson <snelson@pensando.io>
Fri, 23 Jul 2021 18:02:45 +0000 (11:02 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Jul 2021 20:57:41 +0000 (21:57 +0100)
commita2f6239fab071c2f80254c440a88f90fe61e1d2e
treeec3b722ea54b69c6a03a2a013e0b4d541239b118
parent549fd7f7f1356d4af3ef7d832745e6057ba1425b
ionic: make all rx_mode work threadsafe

Move the bulk of the code from ionic_set_rx_mode(), which
can be called from atomic context, into ionic_lif_rx_mode()
which is a safe context.

A call from the stack will get pushed off into a work thread,
but it is also possible to simultaneously have a call driven
by a queue reconfig request from an ethtool command or fw
recovery event.  We add a mutex around the rx_mode work to be
sure they don't collide.

Fixes: 435728688937 ("ionic: change set_rx_mode from_ndo to can_sleep")
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_lif.c
drivers/net/ethernet/pensando/ionic/ionic_lif.h