linux/drivers/net/ethernet/intel
Jacob Keller 325782a173 fm10k: don't re-map queues when a mailbox message suffices
When the PF assigns a new MAC address to a VF it uses the base address
registers to store the MAC address. This allows a VF which loads after
this setup the ability to get the initial address without having to wait
for a mailbox message. Unfortunately to do this, the PF must take queue
ownership away from the VF, which can cause fault errors when there is
already an active VF driver.

This queue ownership assignment causes race condition between the PF and
the VF such that potentially a VF can cause FUM fault errors due to
normal PF/VF driver behavior.

It is not safe to simply allow the PF to write the base address
registers without taking queue ownership back as the PF must also
disable the queues, and this would impact active VF use. The current
code is safe because the queue ownership will prevent the VF from
actually writing but does trigger the FUM fault.

We can do better by simply avoiding the register write process when
a mailbox message suffices. If the message can be sent over the mailbox,
then we will not perform the queue ownership assignment and we won't
update the base address to be the same as the MAC address.

We do still have to write the TXQCTL registers in order to update the
VID of the queue. This is necessary because the TXQCTL register is
read-only from the VF, and thus the VF cannot do this for itself. This
register does not need to wait for the Tx queue to be disabled and is
safe for the PF to write during normal VF operation, so we move this
write to the top of the function above the mailbox message. Without
this, the TXQCTL register would be misconfigured and cause the VF to Tx
hang.

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>
2016-08-29 01:31:03 -07:00
..
e1000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-04-09 17:41:41 -04:00
e1000e e1000e: fix PTP on e1000_pch_lpt variants 2016-08-16 10:47:20 -07:00
fm10k fm10k: don't re-map queues when a mailbox message suffices 2016-08-29 01:31:03 -07:00
i40e i40e/i40evf: Fix indentation 2016-08-19 21:47:41 -07:00
i40evf i40evf: Open RDMA Client after reset 2016-08-19 21:57:19 -07:00
igb igb: fix error code in igb_add_ethtool_nfc_entry() 2016-08-18 22:27:48 -07:00
igbvf intel: Add support for IPv6 IP-in-IP offload 2016-05-20 19:25:52 -04:00
ixgb drivers/net: get rid of unnecessary initializations in .get_drvinfo() 2015-10-16 00:24:10 -07:00
ixgbe ixgbe: Add support for new X557 device 2016-08-20 19:51:25 -07:00
ixgbevf ixgbevf: fix incorrect MAC address on load 2016-08-20 19:41:21 -07:00
e100.c e100: Release skb when DMA mapping is failed in e100_xmit_prepare 2015-08-18 14:06:05 -07:00
Kconfig ixgbe: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port 2016-06-17 20:23:30 -07:00
Makefile fm10k: Add skeletal frame for Intel(R) FM10000 Ethernet Switch Host Interface Driver 2014-09-23 03:59:13 -07:00