Lines Matching refs:pf

29 static void ice_info_get_dsn(struct ice_pf *pf, struct ice_info_ctx *ctx)  in ice_info_get_dsn()  argument
34 put_unaligned_be64(pci_get_dsn(pf->pdev), dsn); in ice_info_get_dsn()
39 static void ice_info_pba(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_pba() argument
41 struct ice_hw *hw = &pf->hw; in ice_info_pba()
47 dev_dbg(ice_pf_to_dev(pf), "Failed to read Product Board Assembly string, status %s\n", in ice_info_pba()
51 static void ice_info_fw_mgmt(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_fw_mgmt() argument
53 struct ice_hw *hw = &pf->hw; in ice_info_fw_mgmt()
59 static void ice_info_fw_api(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_fw_api() argument
61 struct ice_hw *hw = &pf->hw; in ice_info_fw_api()
67 static void ice_info_fw_build(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_fw_build() argument
69 struct ice_hw *hw = &pf->hw; in ice_info_fw_build()
74 static void ice_info_orom_ver(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_orom_ver() argument
76 struct ice_orom_info *orom = &pf->hw.flash.orom; in ice_info_orom_ver()
83 ice_info_pending_orom_ver(struct ice_pf __always_unused *pf, in ice_info_pending_orom_ver() argument
93 static void ice_info_nvm_ver(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_nvm_ver() argument
95 struct ice_nvm_info *nvm = &pf->hw.flash.nvm; in ice_info_nvm_ver()
101 ice_info_pending_nvm_ver(struct ice_pf __always_unused *pf, in ice_info_pending_nvm_ver() argument
111 static void ice_info_eetrack(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_eetrack() argument
113 struct ice_nvm_info *nvm = &pf->hw.flash.nvm; in ice_info_eetrack()
119 ice_info_pending_eetrack(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_pending_eetrack() argument
127 static void ice_info_ddp_pkg_name(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_ddp_pkg_name() argument
129 struct ice_hw *hw = &pf->hw; in ice_info_ddp_pkg_name()
135 ice_info_ddp_pkg_version(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_ddp_pkg_version() argument
137 struct ice_pkg_ver *pkg = &pf->hw.active_pkg_ver; in ice_info_ddp_pkg_version()
144 ice_info_ddp_pkg_bundle_id(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_ddp_pkg_bundle_id() argument
146 snprintf(ctx->buf, sizeof(ctx->buf), "0x%08x", pf->hw.active_track_id); in ice_info_ddp_pkg_bundle_id()
149 static void ice_info_netlist_ver(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_netlist_ver() argument
151 struct ice_netlist_info *netlist = &pf->hw.flash.netlist; in ice_info_netlist_ver()
160 static void ice_info_netlist_build(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_netlist_build() argument
162 struct ice_netlist_info *netlist = &pf->hw.flash.netlist; in ice_info_netlist_build()
168 ice_info_pending_netlist_ver(struct ice_pf __always_unused *pf, in ice_info_pending_netlist_ver() argument
182 ice_info_pending_netlist_build(struct ice_pf __always_unused *pf, in ice_info_pending_netlist_build() argument
218 void (*getter)(struct ice_pf *pf, struct ice_info_ctx *ctx);
219 void (*fallback)(struct ice_pf *pf, struct ice_info_ctx *ctx);
250 struct ice_pf *pf = devlink_priv(devlink); in ice_devlink_info_get() local
251 struct device *dev = ice_pf_to_dev(pf); in ice_devlink_info_get()
252 struct ice_hw *hw = &pf->hw; in ice_devlink_info_get()
258 err = ice_wait_for_reset(pf, 10 * HZ); in ice_devlink_info_get()
317 ice_info_get_dsn(pf, ctx); in ice_devlink_info_get()
331 ice_devlink_versions[i].getter(pf, ctx); in ice_devlink_info_get()
339 ice_devlink_versions[i].fallback(pf, ctx); in ice_devlink_info_get()
391 struct ice_pf *pf = devlink_priv(devlink); in ice_devlink_flash_update() local
392 struct ice_hw *hw = &pf->hw; in ice_devlink_flash_update()
416 err = ice_check_for_pending_update(pf, NULL, extack); in ice_devlink_flash_update()
422 return ice_flash_pldm_image(pf, params->fw, preservation, extack); in ice_devlink_flash_update()
469 void ice_devlink_register(struct ice_pf *pf) in ice_devlink_register() argument
471 struct devlink *devlink = priv_to_devlink(pf); in ice_devlink_register()
482 void ice_devlink_unregister(struct ice_pf *pf) in ice_devlink_unregister() argument
484 devlink_unregister(priv_to_devlink(pf)); in ice_devlink_unregister()
495 int ice_devlink_create_pf_port(struct ice_pf *pf) in ice_devlink_create_pf_port() argument
504 dev = ice_pf_to_dev(pf); in ice_devlink_create_pf_port()
506 devlink_port = &pf->devlink_port; in ice_devlink_create_pf_port()
508 vsi = ice_get_main_vsi(pf); in ice_devlink_create_pf_port()
513 attrs.phys.port_number = pf->hw.bus.func; in ice_devlink_create_pf_port()
515 devlink = priv_to_devlink(pf); in ice_devlink_create_pf_port()
520 pf->hw.pf_id, err); in ice_devlink_create_pf_port()
533 void ice_devlink_destroy_pf_port(struct ice_pf *pf) in ice_devlink_destroy_pf_port() argument
537 devlink_port = &pf->devlink_port; in ice_devlink_destroy_pf_port()
558 struct ice_pf *pf; in ice_devlink_create_vf_port() local
561 pf = vf->pf; in ice_devlink_create_vf_port()
562 dev = ice_pf_to_dev(pf); in ice_devlink_create_vf_port()
567 attrs.pci_vf.pf = pf->hw.bus.func; in ice_devlink_create_vf_port()
571 devlink = priv_to_devlink(pf); in ice_devlink_create_vf_port()
618 struct ice_pf *pf = devlink_priv(devlink); in ice_devlink_nvm_snapshot() local
619 struct device *dev = ice_pf_to_dev(pf); in ice_devlink_nvm_snapshot()
620 struct ice_hw *hw = &pf->hw; in ice_devlink_nvm_snapshot()
675 struct ice_pf *pf = devlink_priv(devlink); in ice_devlink_devcaps_snapshot() local
676 struct device *dev = ice_pf_to_dev(pf); in ice_devlink_devcaps_snapshot()
677 struct ice_hw *hw = &pf->hw; in ice_devlink_devcaps_snapshot()
719 void ice_devlink_init_regions(struct ice_pf *pf) in ice_devlink_init_regions() argument
721 struct devlink *devlink = priv_to_devlink(pf); in ice_devlink_init_regions()
722 struct device *dev = ice_pf_to_dev(pf); in ice_devlink_init_regions()
725 nvm_size = pf->hw.flash.flash_size; in ice_devlink_init_regions()
726 pf->nvm_region = devlink_region_create(devlink, &ice_nvm_region_ops, 1, in ice_devlink_init_regions()
728 if (IS_ERR(pf->nvm_region)) { in ice_devlink_init_regions()
730 PTR_ERR(pf->nvm_region)); in ice_devlink_init_regions()
731 pf->nvm_region = NULL; in ice_devlink_init_regions()
734 pf->devcaps_region = devlink_region_create(devlink, in ice_devlink_init_regions()
737 if (IS_ERR(pf->devcaps_region)) { in ice_devlink_init_regions()
739 PTR_ERR(pf->devcaps_region)); in ice_devlink_init_regions()
740 pf->devcaps_region = NULL; in ice_devlink_init_regions()
750 void ice_devlink_destroy_regions(struct ice_pf *pf) in ice_devlink_destroy_regions() argument
752 if (pf->nvm_region) in ice_devlink_destroy_regions()
753 devlink_region_destroy(pf->nvm_region); in ice_devlink_destroy_regions()
754 if (pf->devcaps_region) in ice_devlink_destroy_regions()
755 devlink_region_destroy(pf->devcaps_region); in ice_devlink_destroy_regions()