diff options
author | Greg Edwards <gedwards@ddn.com> | 2017-06-28 18:22:26 +0300 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2017-08-09 03:52:45 +0300 |
commit | 46b3bb9b47ae63632892ad19976948b290aec2c6 (patch) | |
tree | 7caa76645a61ac0e449274318f733e9af84afb08 /drivers/net/ethernet/intel/igb/e1000_mbx.h | |
parent | 1a6c4a3b1e6f8fa1185457300514cd9f902de1a1 (diff) | |
download | linux-46b3bb9b47ae63632892ad19976948b290aec2c6.tar.xz |
igb: do not drop PF mailbox lock after read of VF message
When the PF receives a mailbox message from the VF, it grabs the mailbox
lock, reads the VF message from the mailbox, ACKs the message and drops
the lock.
While the PF is performing the action for the VF message, nothing
prevents another VF message from being posted to the mailbox. The
current code handles this condition by just dropping any new VF messages
without processing them. This results in a mailbox timeout in the VM
for posted messages waiting for an ACK, and the VF is reset by the
igbvf_watchdog_task in the VM.
Given the right sequence of VF messages and mailbox timeouts, this
condition can go on ad infinitum.
Modify the PF mailbox read method to take an 'unlock' argument that
optionally leaves the mailbox locked by the PF after reading the VF
message. This ensures another VF message is not posted to the mailbox
until after the PF has completed processing the VF message and written
its reply.
Signed-off-by: Greg Edwards <gedwards@ddn.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/e1000_mbx.h')
-rw-r--r-- | drivers/net/ethernet/intel/igb/e1000_mbx.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/igb/e1000_mbx.h b/drivers/net/ethernet/intel/igb/e1000_mbx.h index a98c5dc60afd..a62b08e1572e 100644 --- a/drivers/net/ethernet/intel/igb/e1000_mbx.h +++ b/drivers/net/ethernet/intel/igb/e1000_mbx.h @@ -67,7 +67,8 @@ #define E1000_PF_CONTROL_MSG 0x0100 /* PF control message */ -s32 igb_read_mbx(struct e1000_hw *hw, u32 *msg, u16 size, u16 mbx_id); +s32 igb_read_mbx(struct e1000_hw *hw, u32 *msg, u16 size, u16 mbx_id, + bool unlock); s32 igb_write_mbx(struct e1000_hw *hw, u32 *msg, u16 size, u16 mbx_id); s32 igb_check_for_msg(struct e1000_hw *hw, u16 mbx_id); s32 igb_check_for_ack(struct e1000_hw *hw, u16 mbx_id); |