]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
bnx2x: Lock DMAE when used by statistic flow
authorAriel Elior <ariele@broadcom.com>
Sun, 20 Oct 2013 14:51:32 +0000 (16:51 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Oct 2013 22:31:35 +0000 (18:31 -0400)
commit32316a46f2bbd4a898acf86547197cff8476f442
tree815a114bcc30968e82c73e3b8b534f722ed00969
parent6b991c3763e15a0884095fc0c133980c5577e9c7
bnx2x: Lock DMAE when used by statistic flow

bnx2x has several clients to its DMAE machines - all of them with the exception
of the statistics flow used the same locking mechanisms to synchronize the DMAE
machines' usage.

Since statistics (which are periodically entered) use DMAE without taking the
locks, they may erase the commands which were previously set -
e.g., it may cause a VF to timeout while waiting for a PF answer on the VF-PF
channel as that command header would have been overwritten by the statistics'
header.

This patch makes certain that all flows utilizing DMAE will use the same
API, assuring that the locking scheme will be kept by all said flows.

Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.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
drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c