Skip to content

Commit 503ab6e

Browse files
Michal Swiatkowskianguy11
authored andcommitted
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: 2ae0aa4 ("ice: Move devlink port to PF/VF struct") Reviewed-by: Wojciech Drewek <[email protected]> Suggested-by: Jiri Pirko <[email protected]> Signed-off-by: Michal Swiatkowski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent d53d4dc commit 503ab6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/intel/ice/devlink/devlink_port.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ int ice_devlink_create_pf_port(struct ice_pf *pf)
337337
return -EIO;
338338

339339
attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL;
340-
attrs.phys.port_number = pf->hw.bus.func;
340+
attrs.phys.port_number = pf->hw.pf_id;
341341

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

457457
attrs.flavour = DEVLINK_PORT_FLAVOUR_PCI_VF;
458-
attrs.pci_vf.pf = pf->hw.bus.func;
458+
attrs.pci_vf.pf = pf->hw.pf_id;
459459
attrs.pci_vf.vf = vf->vf_id;
460460

461461
ice_devlink_set_switch_id(pf, &attrs.switch_id);

0 commit comments

Comments
 (0)