Commit fe072e20 authored by Dean Luick's avatar Dean Luick Committed by Doug Ledford

staging/rdma/hfi1: Make firmware failure messages warnings

Make firmware validation failure and missing firmware messages
a warning since alternates can be tried.  Add an error message
when all attempts fail.
Reviewed-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDean Luick <dean.luick@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 845f876d
...@@ -433,7 +433,7 @@ static int obtain_one_firmware(struct hfi1_devdata *dd, const char *name, ...@@ -433,7 +433,7 @@ static int obtain_one_firmware(struct hfi1_devdata *dd, const char *name,
ret = request_firmware(&fdet->fw, name, &dd->pcidev->dev); ret = request_firmware(&fdet->fw, name, &dd->pcidev->dev);
if (ret) { if (ret) {
dd_dev_err(dd, "cannot find firmware \"%s\", err %d\n", dd_dev_warn(dd, "cannot find firmware \"%s\", err %d\n",
name, ret); name, ret);
return ret; return ret;
} }
...@@ -572,7 +572,7 @@ static void __obtain_firmware(struct hfi1_devdata *dd) ...@@ -572,7 +572,7 @@ static void __obtain_firmware(struct hfi1_devdata *dd)
* We tried the original and it failed. Move to the * We tried the original and it failed. Move to the
* alternate. * alternate.
*/ */
dd_dev_info(dd, "using alternate firmware names\n"); dd_dev_warn(dd, "using alternate firmware names\n");
/* /*
* Let others run. Some systems, when missing firmware, does * Let others run. Some systems, when missing firmware, does
* something that holds for 30 seconds. If we do that twice * something that holds for 30 seconds. If we do that twice
...@@ -626,6 +626,7 @@ static void __obtain_firmware(struct hfi1_devdata *dd) ...@@ -626,6 +626,7 @@ static void __obtain_firmware(struct hfi1_devdata *dd)
fw_state = FW_TRY; fw_state = FW_TRY;
goto retry; goto retry;
} }
dd_dev_err(dd, "unable to obtain working firmware\n");
fw_state = FW_ERR; fw_state = FW_ERR;
fw_err = -ENOENT; fw_err = -ENOENT;
} else { } else {
...@@ -896,16 +897,17 @@ static int run_rsa(struct hfi1_devdata *dd, const char *who, ...@@ -896,16 +897,17 @@ static int run_rsa(struct hfi1_devdata *dd, const char *who,
MISC_ERR_STATUS_MISC_FW_AUTH_FAILED_ERR_SMASK MISC_ERR_STATUS_MISC_FW_AUTH_FAILED_ERR_SMASK
| MISC_ERR_STATUS_MISC_KEY_MISMATCH_ERR_SMASK); | MISC_ERR_STATUS_MISC_KEY_MISMATCH_ERR_SMASK);
/* /*
* All that is left are the current errors. Print failure details, * All that is left are the current errors. Print warnings on
* if any. * authorization failure details, if any. Firmware authorization
* can be retried, so these are only warnings.
*/ */
reg = read_csr(dd, MISC_ERR_STATUS); reg = read_csr(dd, MISC_ERR_STATUS);
if (ret) { if (ret) {
if (reg & MISC_ERR_STATUS_MISC_FW_AUTH_FAILED_ERR_SMASK) if (reg & MISC_ERR_STATUS_MISC_FW_AUTH_FAILED_ERR_SMASK)
dd_dev_err(dd, "%s firmware authorization failed\n", dd_dev_warn(dd, "%s firmware authorization failed\n",
who); who);
if (reg & MISC_ERR_STATUS_MISC_KEY_MISMATCH_ERR_SMASK) if (reg & MISC_ERR_STATUS_MISC_KEY_MISMATCH_ERR_SMASK)
dd_dev_err(dd, "%s firmware key mismatch\n", who); dd_dev_warn(dd, "%s firmware key mismatch\n", who);
} }
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment