Commit bd98c620 authored by Nikolay Aleksandrov's avatar Nikolay Aleksandrov Committed by Tony Nguyen
Browse files

drivers: net: ice: fix devlink parameters get without irdma



If CONFIG_IRDMA isn't enabled but there are ice NICs in the system, the
driver will prevent full devlink dev param show dump because its rdma get
callbacks return ENODEV and stop the dump. For example:
 $ devlink dev param show
 pci/0000:82:00.0:
   name msix_vec_per_pf_max type generic
     values:
       cmode driverinit value 2
   name msix_vec_per_pf_min type generic
     values:
       cmode driverinit value 2
 kernel answers: No such device

Returning EOPNOTSUPP allows the dump to continue so we can see all devices'
devlink parameters.

Fixes: c24a65b6 ("iidc/ice/irdma: Update IDC to support multiple consumers")
Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 73aefba4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1360,7 +1360,7 @@ ice_devlink_enable_roce_get(struct devlink *devlink, u32 id,

	cdev = pf->cdev_info;
	if (!cdev)
		return -ENODEV;
		return -EOPNOTSUPP;

	ctx->val.vbool = !!(cdev->rdma_protocol & IIDC_RDMA_PROTOCOL_ROCEV2);

@@ -1427,7 +1427,7 @@ ice_devlink_enable_iw_get(struct devlink *devlink, u32 id,

	cdev = pf->cdev_info;
	if (!cdev)
		return -ENODEV;
		return -EOPNOTSUPP;

	ctx->val.vbool = !!(cdev->rdma_protocol & IIDC_RDMA_PROTOCOL_IWARP);