]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - mkaricheri-ti-linux-kernel/mkaricheri-ti-linux-kernel.git/commit
be2net: replace polling with sleeping in the FW completion path
authorSathya Perla <sathya.perla@broadcom.com>
Wed, 27 Jul 2016 09:26:18 +0000 (05:26 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Aug 2016 22:38:27 +0000 (15:38 -0700)
commitb71724147e7307d9d6f89b3f60b92375b304e181
treede17129e973a659f0cf7b8ebab45fd64e51189ac
parent92fbb1df83ec17f62a46b23507ebb3f06ca10cd3
be2net: replace polling with sleeping in the FW completion path

The ndo_set_rx_mode() and ndo_add/del_vxlan_port() calls may be called with
BHs disabled. The driver currently issues the required cmds to the FW in
these contexts and polls on completions from the FW, while BHs remain
disabled.  This can cause either packet loss or packet reception to be
delayed on that CPU.

This patch defers processing of the above cmds to a separate workqueue.
With this change, FW cmds are now issued only in process context.
Now that the FW cmds are issued only in process context, they can sleep
waiting for a completion instead of polling. All the spin_lock_bh(mcc_lock)
calls are now replaced with mutex calls.

Also a new rx_filter_lock is now needed to protect the RX filtering fields
like vids[] between be_vlan_add/rem_vid() and __be_set_rx_mode() contexts.

Signed-off-by: Sathya Perla <sathya.perla@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be.h
drivers/net/ethernet/emulex/benet/be_cmds.c
drivers/net/ethernet/emulex/benet/be_main.c