i40e/base: fix uncertain event descriptor issue
authorHelin Zhang <helin.zhang@intel.com>
Tue, 8 Mar 2016 08:14:16 +0000 (16:14 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 16 Mar 2016 16:24:47 +0000 (17:24 +0100)
commit1939d724f2d0bd2f81d7fbc9d0b17f0cf1815154
tree643de66788b83fdca79e7215adbc6be291f5db63
parent4a08159e6e7897f850017444fe3f3f1996c1babe
i40e/base: fix uncertain event descriptor issue

In one obscure corner case, it was possible to clear the NVM update
wait flag when no update_done message was actually received. This
patch cleans the event descriptor before use, and moves the opcode
check to where it won't get done if there was no event to clean.

Fixes: 8db9e2a1b232 ("i40e: base driver")

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
drivers/net/i40e/base/i40e_adminq.c