ice: add extack when unable to read device caps
When filling out information for the DEVLINK_CMD_INFO_GET, the driver needs to read some device capabilities. Add an extack message to properly inform the caller of the failure, as we do for other failures in this function. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Tony Brelinski <tonyx.brelinski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
committed by
Tony Nguyen
parent
96cf4f689b
commit
d5f84ae95f
@@ -283,6 +283,9 @@ static int ice_devlink_info_get(struct devlink *devlink,
|
|||||||
/* discover capabilities first */
|
/* discover capabilities first */
|
||||||
status = ice_discover_dev_caps(hw, &ctx->dev_caps);
|
status = ice_discover_dev_caps(hw, &ctx->dev_caps);
|
||||||
if (status) {
|
if (status) {
|
||||||
|
dev_dbg(dev, "Failed to discover device capabilities, status %s aq_err %s\n",
|
||||||
|
ice_stat_str(status), ice_aq_str(hw->adminq.sq_last_status));
|
||||||
|
NL_SET_ERR_MSG_MOD(extack, "Unable to discover device capabilities");
|
||||||
err = -EIO;
|
err = -EIO;
|
||||||
goto out_free_ctx;
|
goto out_free_ctx;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user