• Ross Lagerwall's avatar
    ixgbe: Fix race when the VF driver does a reset · 96d1a731
    Ross Lagerwall authored
    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: 939b701a ("ixgbe: fix driver behaviour after issuing VFLR")
    Signed-off-by: default avatarRoss Lagerwall <ross.lagerwall@citrix.com>
    Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    96d1a731
ixgbe_sriov.c 45 KB