]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: Fix race when the VF driver does a reset
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Wed, 5 Dec 2018 13:54:26 +0000 (13:54 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 12 Dec 2018 23:51:50 +0000 (15:51 -0800)
commit2b6399fa9be799b3387ff0c5531d30dc6a99515b
treee8fdb69be76835c8f04192638e894e0b329ee7a1
parent131da14ed336565d6148b0e2ebfb4e5ce9e643b6
ixgbe: Fix race when the VF driver does a reset

When the VF driver does a reset, it (at least the Linux one) writes to
the VFCTRL register to issue a reset and then immediately sends a reset
message using the mailbox API. This is racy because when the PF driver
detects that the VFCTRL register reset pin has been asserted, it clears
the mailbox memory. Depending on ordering, the reset message sent by
the VF could be cleared by the PF driver. It then responds to the
cleared message with a NACK which causes the VF driver to malfunction.
Fix this by deferring clearing the mailbox memory until the reset
message is received.

Fixes: 78b1c710904a ("ixgbe: fix driver behaviour after issuing VFLR")
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c