]> git.baikalelectronics.ru Git - kernel.git/commit
qed: Set HW-channel to ready before ACKing VF
authorMintz, Yuval <Yuval.Mintz@cavium.com>
Sun, 19 Mar 2017 11:08:14 +0000 (13:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Mar 2017 02:02:36 +0000 (19:02 -0700)
commitd30d898e514549fe07caaaf01036c14d4740ace6
tree38f2177ee884ad16f0549525482fdaa878bd73be
parentb09f76399e14439c7cb639d12ede2e4dbb6b248a
qed: Set HW-channel to ready before ACKing VF

When PF responds to the VF requests it also cleans the HW-channel
indication in firmware to allow further VF messages to arrive,
but the order currently applied is wrong -
The PF is copying by DMAE the response the VF is polling on for
completion, and only afterwards sets the HW-channel to ready state.

This creates a race condition where the VF would be able to send
an additional message to the PF before the channel would get ready
again, causing the firmware to consider the VF as malicious.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_sriov.c