linux/drivers/net/ethernet
Hariprasad Shenai b38066daaa cxgb4vf: Synchronize access to mailbox
The issue comes when there are multiple threads attempting to use the
mailbox facility at the same time. The issue is the for the Virtual
Function Driver, the only way to get the Virtual Interface statistics
is to issue mailbox commands to ask the firmware for the VI Stats.
And, because the VI Stats command can only retrieve a smallish number of
stats per mailbox command, we have to issue three mailbox commands in quick
succession. When ethtool or netstat command to get interface stats and
interface up/down is run in a loop for every 0.1 sec, we observed
mailbox collisions. And out of the two commands one would fail with
the present code, since we don't queue the second command.

To overcome the above issue, added a queue to access the mailbox.
Whenever a mailbox command is issued add it to the queue. If its at the
head issue the mailbox command, else wait for the existing command to
complete. Usually command takes less than a milli-second to complete.
Also timeout from the loop, if the command under execution takes
long time to run.

In reality, the number of mailbox access collisions is going to be very
rare since no one runs such abusive script.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-25 12:04:33 -04:00
..
3com treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
8390 net: ethernet: ax88796: use phy_ethtool_{get|set}_link_ksettings 2016-06-16 17:07:05 -07:00
adaptec treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
adi treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
aeroflex aeroflex/greth: fix warning about unused variable 2016-05-20 18:33:37 -07:00
agere net: ethernet: et131x: use phy_ethtool_{get|set}_link_ksettings 2016-06-17 22:30:59 -07:00
allwinner net: ethernet: sun4i-emac: use phy_ethtool_{get|set}_link_ksettings 2016-06-22 16:22:41 -04:00
alteon
altera net: ethernet: altera_tse: use phy_ethtool_{get|set}_link_ksettings 2016-06-22 16:22:41 -04:00
amd net: au1000 eth: simplify logical expression 2016-05-19 11:32:05 -07:00
apm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-05-15 13:32:48 -04:00
apple
arc net: arc: trivial: Replace comma with a semicolon 2016-05-25 22:13:15 -07:00
atheros net: alx: use custom skb allocator 2016-05-25 19:52:27 -04:00
aurora net: ethernet: nb8800: use phy_ethtool_{get|set}_link_ksettings 2016-06-19 10:55:16 -07:00
broadcom net: ethernet: bgmac: use phy_ethtool_{get|set}_link_ksettings 2016-06-22 16:23:29 -04:00
brocade bna: fix list corruption 2016-03-01 15:19:43 -05:00
cadence net: ethernet: macb: use phy_ethtool_{get|set}_link_ksettings 2016-06-25 11:57:33 -04:00
calxeda
cavium net:liquidio: remove unused including <linux/version.h> 2016-06-17 22:28:49 -07:00
chelsio cxgb4vf: Synchronize access to mailbox 2016-06-25 12:04:33 -04:00
cirrus net: cx89x0: Add DT support 2016-06-15 12:17:57 -07:00
cisco net: ethernet: enic: move to new ethtool api {get|set}_link_ksettings 2016-06-14 17:16:14 -04:00
davicom drivers: net: Don't print unpopulated net_device name 2016-05-17 12:30:19 -04:00
dec treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
dlink treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
emulex benet: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port 2016-06-17 20:23:30 -07:00
ezchip net: nps_enet: Disable interrupts before napi reschedule 2016-05-29 22:35:21 -07:00
faraday net: ethernet: ftgmac100: use phy_ethtool_{get|set}_link_ksettings 2016-05-16 21:51:41 -04:00
freescale net: gianfar: fix old-style declaration 2016-06-16 22:06:30 -07:00
fujitsu treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
hisilicon net: hns: bug fix about TSO on|off when there is traffic 2016-06-21 04:51:56 -04:00
hp treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
i825xx treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
ibm net: ehea: avoid null pointer dereference 2016-05-19 11:25:30 -07:00
intel ixgbe: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port 2016-06-17 20:23:30 -07:00
marvell net: mvneta: Fix lacking spinlock initialization 2016-05-25 12:35:08 -07:00
mediatek net-next: mediatek: properly handle RGMII modes 2016-06-03 19:54:16 -04:00
mellanox net/mlx4_en: Add DCB PFC support through CEE netlink commands 2016-06-23 15:18:50 -04:00
micrel drivers: net: Don't print unpopulated net_device name 2016-05-17 12:30:19 -04:00
microchip treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
moxa treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
myricom myri10ge: fix sleeping with bh disabled 2016-04-28 14:21:14 -04:00
natsemi treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
neterion drivers: net: remove NETDEV_TX_LOCKED 2016-04-26 15:53:05 -04:00
netronome nfp: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port 2016-06-17 20:23:31 -07:00
nuvoton treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
nvidia
nxp
oki-semi pch_gbe: replace private tx ring lock with common netif_tx_lock 2016-04-28 17:19:58 -04:00
packetengines treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
pasemi
qlogic qede: Add support for coalescing config read/update. 2016-06-23 15:56:46 -04:00
qualcomm treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
rdc
realtek r8169: default to 64-bit DMA on recent PCIe chips 2016-05-17 14:31:09 -04:00
renesas ravb: Remove manual pause frame transmit 2016-06-01 23:33:21 -07:00
rocker switchdev: pass pointer to fib_info instead of copy 2016-05-17 13:58:49 -04:00
samsung net: sxgbe: fix error paths in sxgbe_platform_probe() 2016-03-27 22:39:22 -04:00
seeq treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
sfc sfc: Fix VLAN filtering feature if vPort has VLAN_RESTRICT flag 2016-06-15 22:26:27 -07:00
sgi treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
silan
sis treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
smsc treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
stmicro net: stmmac: dwmac-rk: keep the PHY up for WoL 2016-06-16 14:14:58 -07:00
sun treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
synopsys treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
tehuti treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
ti ti_cpsw: Check for disabled child nodes 2016-06-23 15:12:20 -04:00
tile drivers: fix dev->trans_start removal fallout 2016-05-04 17:07:14 -04:00
toshiba ps3_gelic: use kmemdup 2016-05-20 19:50:07 -04:00
tundra net: tsi108: use NULL for pointer-typed argument 2016-04-26 01:10:26 -04:00
via treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
wiznet net: ethernet: wiznet: Remove create_workqueue 2016-06-02 12:15:17 -07:00
xilinx treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
xircom treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
xscale
Kconfig netdev: Move octeon/octeon_mgmt driver to cavium directory. 2016-03-18 18:25:30 -04:00
Makefile netdev: Move octeon/octeon_mgmt driver to cavium directory. 2016-03-18 18:25:30 -04:00
dnet.c
dnet.h
ec_bhf.c
ethoc.c net/ethoc: fix null dereference on error exit path 2016-06-01 22:02:01 -07:00
fealnx.c treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
jme.c drivers/net/ethernet/jme.c: Deinline jme_reset_mac_processor, save 2816 bytes 2016-04-13 22:57:00 -04:00
jme.h
korina.c treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
lantiq_etop.c net: lantiq_etop: remove unused variable 2016-06-17 20:54:35 -07:00
netx-eth.c drivers: net: Don't print unpopulated net_device name 2016-05-17 12:30:19 -04:00