Commit 503ab6ee authored by Michal Swiatkowski's avatar Michal Swiatkowski Committed by Tony Nguyen
Browse files

ice: use internal pf id instead of function number



Use always the same pf id in devlink port number. When doing
pass-through the PF to VM bus info func number can be any value.

Fixes: 2ae0aa47 ("ice: Move devlink port to PF/VF struct")
Reviewed-by: default avatarWojciech Drewek <wojciech.drewek@intel.com>
Suggested-by: default avatarJiri Pirko <jiri@resnulli.us>
Signed-off-by: default avatarMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent d53d4dcc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -337,7 +337,7 @@ int ice_devlink_create_pf_port(struct ice_pf *pf)
		return -EIO;

	attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL;
	attrs.phys.port_number = pf->hw.bus.func;
	attrs.phys.port_number = pf->hw.pf_id;

	/* As FW supports only port split options for whole device,
	 * set port split options only for first PF.
@@ -455,7 +455,7 @@ int ice_devlink_create_vf_port(struct ice_vf *vf)
		return -EINVAL;

	attrs.flavour = DEVLINK_PORT_FLAVOUR_PCI_VF;
	attrs.pci_vf.pf = pf->hw.bus.func;
	attrs.pci_vf.pf = pf->hw.pf_id;
	attrs.pci_vf.vf = vf->vf_id;

	ice_devlink_set_switch_id(pf, &attrs.switch_id);