linux/drivers/net/ethernet
Jacob Keller 4b09728e9d fm10k: drop transmitted messages in Tx FIFO as part of reset_work
This patch fixes a corner case issue with the PF/VF mailbox code.
Currently, fm10k_mbx_reset_work clears various state about the mailbox.
However, it does not clear the Tx FIFO head/tail pointers. We can't
simply clear these pointers as we unintentionally drop untransmitted
messages without error.

Doing nothing results in a possible phantom re-transmission of messages,
since we leave tx.head and tx.tail intact, but clear the tx_pulled and
tail_len values. This means that the PF could continuously re-send a
message which triggers a reset in the VF. Upon reset, the VF will
re-receive the same message after a reconnect.

If we reset the tx.head and tx.tail pointers completely, we end up
dropping some messages that were pending before connect. This results in
missing LPORT_MSG_READY bits, and VFs will end up reporting no link.

However, we can resolve both issues by simply incrementing head to
account for the already transmitted messages, before we reset tx_pulled.
We do this via the same logic as fm10k_mbx_head_pull.

We account for the tail_len which includes all data not yet transmitted,
once we account for the acked data which means re-reading the HEAD
variable from the message header. Then, we drop messages until we've
dropped more than the new tx_pulled value. At this point, resetting
tail_len and tx_pulled, but not tx.head and tx.tail will result in
prevention of the phantom message. It also prevents us from dropping
untransmitted messages upon attempting to Tx into a connect or
disconnect header.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-09-22 15:58:27 -07:00
..
3com 3c59x: Add BQL support for 3c59x ethernet driver. 2015-08-24 12:20:58 -07:00
8390 drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
adaptec drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
adi drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
aeroflex
agere drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
allwinner net: sun4i-emac: Claim emac sram 2015-08-25 13:48:59 -07:00
alteon drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
altera net: eth: altera: Fix the initial device operstate 2015-09-09 12:10:15 -07:00
amd treewide: fix typos in comment blocks 2015-08-07 14:46:24 +02:00
apm driver: net: xgene: Add support for 2nd 10GbE port 2015-09-15 12:47:46 -07:00
apple drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
arc drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
atheros net: atl1c: add BQL support 2015-08-12 16:27:40 -07:00
broadcom net: bcmgenet: Remove duplicate test for tx_coalesce_usecs_high 2015-09-21 16:26:12 -07:00
brocade bna: fix interrupts storm caused by erroneous packets 2015-08-10 10:58:37 -07:00
cadence Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-07-31 23:52:20 -07:00
calxeda
cavium net: cavium: liquidio: use kzalloc in setup_glist() 2015-09-09 17:06:00 -07:00
chelsio cxgb4: changes for new firmware 1.14.4.0 2015-09-09 21:30:18 -07:00
cirrus drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
cisco flow_dissector: Add flags argument to skb_flow_dissector functions 2015-09-01 15:06:22 -07:00
davicom dm9000: fix a typo 2015-09-08 22:44:42 -07:00
dec drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
dlink drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
emulex be2net: Revert "make the RX_FILTER command asynchronous" commit 2015-09-05 22:01:21 -07:00
ezchip NET: nps_enet: minor namespace cleanup 2015-08-23 16:08:54 -07:00
faraday drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
freescale net: fec: add netif status check before set mac address 2015-09-09 20:30:10 -07:00
fujitsu drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
hisilicon net: add Hisilicon Network Subsystem basic ethernet support 2015-09-20 21:42:58 -07:00
hp drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
i825xx drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
ibm ibmveth: add support for TSO6 2015-07-15 21:34:56 -07:00
icplus net: icplus: fix typo in constant name 2015-06-29 15:57:50 -07:00
intel fm10k: drop transmitted messages in Tx FIFO as part of reset_work 2015-09-22 15:58:27 -07:00
marvell mv643xx_eth: Neaten mv643xx_eth_program_multicast_filter 2015-09-15 12:49:11 -07:00
mellanox Changes for 4.3 2015-09-09 08:33:31 -07:00
micrel net: ethernet: micrel: fix an error code 2015-08-17 12:23:22 -07:00
microchip drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
moxa drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
myricom Minor merge needed, due to function move. 2015-07-01 10:49:25 -07:00
natsemi drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
neterion neterion: s2io: Use module_pci_driver 2015-07-09 00:19:00 -07:00
nuvoton drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
nvidia drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
nxp
octeon
oki-semi drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
packetengines drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
pasemi drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
qlogic net: qlcnic: delete redundant memsets 2015-09-09 17:06:01 -07:00
qualcomm drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
rdc drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
realtek r8169: Fix sleeping function called during get_stats64, v2 2015-09-10 10:06:11 -07:00
renesas Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-08-30 21:45:01 -07:00
rocker rocker: use change upper info 2015-08-27 16:28:35 -07:00
samsung
seeq drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
sfc sfc: Allow driver to cope with a lower number of VIs than it needs for RSS 2015-08-28 13:53:47 -07:00
sgi drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
silan drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
sis sis900: Trivial: Fix typos in enums 2015-06-29 12:52:06 -07:00
smsc net: smc91x: convert pxa dma to dmaengine 2015-09-17 13:36:52 -07:00
stmicro stmmac: fix check for phydev being open 2015-09-09 17:07:43 -07:00
sun niu: don't count tx error twice in case of headroom realloc fails 2015-07-26 21:17:54 -07:00
synopsys ethernet: synopsys: SYNOPSYS_DWC_ETH_QOS should depend on HAS_DMA 2015-09-06 19:48:53 -07:00
tehuti drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
ti drivers: net: cpsw-common: add support for reading mac address for dra7 and am437x platforms 2015-09-21 17:21:46 -07:00
tile nohz: Prevent tilegx network driver interrupts 2015-07-29 15:44:59 +02:00
toshiba drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
tundra drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
via net: via: VIA_RHINE and VIA_VELOCITY should depend on HAS_DMA 2015-06-28 20:20:55 -07:00
wiznet drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
xilinx net: axienet: Fix devm_ioremap_resource return value check 2015-07-09 21:43:16 -07:00
xircom drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
xscale drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
dnet.c
dnet.h
ec_bhf.c net: ec_bhf: Use module_pci_driver 2015-07-08 16:04:06 -07:00
ethoc.c net: ethoc: Remove unnecessary #ifdef CONFIG_OF 2015-09-09 14:16:05 -07:00
fealnx.c
jme.c net: jme: use kzalloc() instead of kmalloc+memset 2015-09-09 17:06:00 -07:00
jme.h
Kconfig dwc_eth_qos: Add the synopsys folder to the build system. 2015-07-28 23:55:00 -07:00
korina.c
lantiq_etop.c
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-08-27 21:45:31 -07:00
netx-eth.c