linux_dsm_epyc7002/drivers/net/ethernet/broadcom
Yuval Mintz dff173de84 bnx2x: Fix statistics locking scheme
Statistics' state-machine in bnx2x driver must be synced with various driver
flows, but its current locking scheme manages to be wasteful [using 2 locks +
additional local variable] and prone to race-conditions at the same time,
as the state-machine and 'action' are being accessed under different locks.

In addition, current 'safe exec' isn't in fact safe, since the only guarantee
it gives is that DMA transactions are over, but ramrods might still be running.

This patch cleans up said logic, leaving us with a single lock for the entire
flow and removing the possible races.

Changes from v2:
	- Switched into mutex locking from semaphore locking.
	- Release locks on error flows.

Changes from v1:
	Failure to acquire lock fails flow instead of printing a warning and
	allowing access to the critical section.

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>
2015-03-23 22:38:24 -04:00
..
bnx2x bnx2x: Fix statistics locking scheme 2015-03-23 22:38:24 -04:00
genet net: bcmgenet: properly disable password matching 2015-03-05 21:15:21 -05:00
b44.c treewide: Remove unnecessary SSB_DEVTABLE_END macro 2015-02-11 14:38:29 -08:00
b44.h b44: use fixed PHY device if we do not find any 2013-12-20 20:48:49 -05:00
bcm63xx_enet.c bcm63xx_enet: fix poll callback. 2015-03-04 15:44:52 -05:00
bcm63xx_enet.h bcm63xx_enet: add support Broadcom BCM6345 Ethernet 2013-06-13 17:22:08 -07:00
bcmsysport.c net: systemport: fix software maintained statistics 2015-03-01 14:02:11 -05:00
bcmsysport.h net: systemport: fix software maintained statistics 2015-03-01 14:02:11 -05:00
bgmac.c bgmac: Clean warning messages 2015-03-08 22:55:48 -04:00
bgmac.h bgmac: add support for Northstar SoC (BCM4707, BCM53018) 2014-01-04 20:25:20 -05:00
bnx2_fw.h bnx2: Rebranding bnx2 driver. 2014-06-25 16:27:27 -07:00
bnx2.c net: rename vlan_tx_* helpers since "tx" is misleading there 2015-01-13 17:51:08 -05:00
bnx2.h bnx2: Rebranding bnx2 driver. 2014-06-25 16:27:27 -07:00
cnic_defs.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
cnic_if.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
cnic.c cnic: Update the rcu_access_pointer() usages 2014-10-29 15:07:28 -04:00
cnic.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
Kconfig net: systemport: always select FIXED_PHY 2014-12-16 00:57:07 -05:00
Makefile net: systemport: hook SYSTEMPORT driver in the build 2014-04-26 12:57:40 -04:00
sb1250-mac.c net: ethernet: broadcom: drop owner assignment from platform_drivers 2014-10-20 16:21:05 +02:00
tg3.c tg3: Hold tp->lock before calling tg3_halt() from tg3_init_one() 2015-02-11 19:51:08 -08:00
tg3.h tg3: prevent ifup/ifdown during PCI error recovery 2014-09-02 13:02:19 -07:00