From: Dean Luick Date: Wed, 3 Feb 2016 22:32:23 +0000 (-0800) Subject: staging/rdma/hfi1: No firmware retry for simulation X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=dcc68e528238c9e1173a8e98de29f0149122ac4c;p=linux-beck.git staging/rdma/hfi1: No firmware retry for simulation 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 Signed-off-by: Dean Luick Signed-off-by: Doug Ledford --- diff --git a/drivers/staging/rdma/hfi1/firmware.c b/drivers/staging/rdma/hfi1/firmware.c index 817cbf94f973..4ba524b82edd 100644 --- a/drivers/staging/rdma/hfi1/firmware.c +++ b/drivers/staging/rdma/hfi1/firmware.c @@ -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 */