ice: split ice_aq_wait_for_event() func into two
authorPrzemek Kitszel <przemyslaw.kitszel@intel.com>
Tue, 8 Aug 2023 21:54:17 +0000 (17:54 -0400)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 17 Aug 2023 20:59:46 +0000 (13:59 -0700)
commitfb9840c4ec13629f36c5e0e88a5df78ca2acc3e0
tree42f8809881d0ac9afc22165d5bf64b5c6a06aa4a
parentb214b98a7fc4dfcce7b67b2e08a22b7fe62c55d0
ice: split ice_aq_wait_for_event() func into two

Mitigate race between registering on wait list and receiving
AQ Response from FW.

ice_aq_prep_for_event() should be called before sending AQ command,
ice_aq_wait_for_event() should be called after sending AQ command,
to wait for AQ Response.

Please note, that this was found by reading the code,
an actual race has not yet materialized.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_fw_update.c
drivers/net/ethernet/intel/ice/ice_main.c