From: Anirudh Venkataramanan Date: Sat, 16 May 2020 00:42:22 +0000 (-0700) Subject: ice: Poll for reset completion when DDP load fails X-Git-Tag: v5.8-rc1~165^2~44^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9918f2d22fd3ff1e76693512d29e743eba3dc8cb;p=thirdparty%2Fkernel%2Flinux.git ice: Poll for reset completion when DDP load fails There are certain cases where the DDP load fails and the FW issues a core reset. For these cases, wait for reset to complete before proceeding with reset of the driver init. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index b64c4e796636a..6583acf32575e 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -3086,6 +3086,9 @@ ice_log_pkg_init(struct ice_hw *hw, enum ice_status *status) case ICE_AQ_RC_EBADMAN: case ICE_AQ_RC_EBADBUF: dev_err(dev, "An error occurred on the device while loading the DDP package. The device will be reset.\n"); + /* poll for reset to complete */ + if (ice_check_reset(hw)) + dev_err(dev, "Error resetting device. Please reload the driver\n"); return; default: break;