ice: Poll for reset completion when DDP load fails
authorAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Sat, 16 May 2020 00:42:22 +0000 (17:42 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 28 May 2020 22:40:12 +0000 (15:40 -0700)
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 <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_main.c

index b64c4e796636a50f94f4a89b24e2cb16df3a67fd..6583acf32575ecbc9ec3bb9e477f6cab7132d3cd 100644 (file)
@@ -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;