staging/rdma/hfi1: No firmware retry for simulation
authorDean Luick <dean.luick@intel.com>
Wed, 3 Feb 2016 22:32:23 +0000 (14:32 -0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 11 Mar 2016 01:37:49 +0000 (20:37 -0500)
Simulation has no firmware, so it will never move firmware
acquire to the FINAL state.  Avoid that by skiping the TRY
state and moving directly to FINAL.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/staging/rdma/hfi1/firmware.c

index 817cbf9..4ba524b 100644 (file)
@@ -631,7 +631,8 @@ done:
                fw_err = -ENOENT;
        } else {
                /* success */
-               if (fw_state == FW_EMPTY)
+               if (fw_state == FW_EMPTY &&
+                   dd->icode != ICODE_FUNCTIONAL_SIMULATOR)
                        fw_state = FW_TRY;      /* may retry later */
                else
                        fw_state = FW_FINAL;    /* cannot try again */