If the FW fails bnxt_hwrm_func_reset() with an error status,
instead of returning -1, return a more standard value of -EIO.
Similarly sometimes the status returned by certain FW commands
may not be generic. Return a more standard value of -EIO in
that case as well.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
err_out:
bnxt_free_all_hwrm_resources(bp);
+ /* Some of the error status returned by FW may not be from errno.h */
+ if (rc > 0)
+ rc = -EIO;
+
return rc;
}
rc = bnxt_hwrm_func_reset(bp);
if (rc) {
RTE_LOG(ERR, PMD, "hwrm chip reset failure rc: %x\n", rc);
- rc = -1;
+ rc = -EIO;
goto error_free;
}