Lines Matching full:pf

28 static void ice_info_get_dsn(struct ice_pf *pf, struct ice_info_ctx *ctx)  in ice_info_get_dsn()  argument
33 put_unaligned_be64(pci_get_dsn(pf->pdev), dsn); in ice_info_get_dsn()
38 static int ice_info_pba(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_pba() argument
40 struct ice_hw *hw = &pf->hw; in ice_info_pba()
46 dev_dbg(ice_pf_to_dev(pf), "Failed to read Product Board Assembly string, status %s\n", in ice_info_pba()
52 static int ice_info_fw_mgmt(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_fw_mgmt() argument
54 struct ice_hw *hw = &pf->hw; in ice_info_fw_mgmt()
62 static int ice_info_fw_api(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_fw_api() argument
64 struct ice_hw *hw = &pf->hw; in ice_info_fw_api()
72 static int ice_info_fw_build(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_fw_build() argument
74 struct ice_hw *hw = &pf->hw; in ice_info_fw_build()
81 static int ice_info_orom_ver(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_orom_ver() argument
83 struct ice_orom_info *orom = &pf->hw.flash.orom; in ice_info_orom_ver()
91 ice_info_pending_orom_ver(struct ice_pf __always_unused *pf, struct ice_info_ctx *ctx) in ice_info_pending_orom_ver() argument
102 static int ice_info_nvm_ver(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_nvm_ver() argument
104 struct ice_nvm_info *nvm = &pf->hw.flash.nvm; in ice_info_nvm_ver()
112 ice_info_pending_nvm_ver(struct ice_pf __always_unused *pf, struct ice_info_ctx *ctx) in ice_info_pending_nvm_ver() argument
122 static int ice_info_eetrack(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_eetrack() argument
124 struct ice_nvm_info *nvm = &pf->hw.flash.nvm; in ice_info_eetrack()
132 ice_info_pending_eetrack(struct ice_pf __always_unused *pf, struct ice_info_ctx *ctx) in ice_info_pending_eetrack() argument
142 static int ice_info_ddp_pkg_name(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_ddp_pkg_name() argument
144 struct ice_hw *hw = &pf->hw; in ice_info_ddp_pkg_name()
151 static int ice_info_ddp_pkg_version(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_ddp_pkg_version() argument
153 struct ice_pkg_ver *pkg = &pf->hw.active_pkg_ver; in ice_info_ddp_pkg_version()
161 static int ice_info_ddp_pkg_bundle_id(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_ddp_pkg_bundle_id() argument
163 snprintf(ctx->buf, sizeof(ctx->buf), "0x%08x", pf->hw.active_track_id); in ice_info_ddp_pkg_bundle_id()
168 static int ice_info_netlist_ver(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_netlist_ver() argument
170 struct ice_netlist_info *netlist = &pf->hw.flash.netlist; in ice_info_netlist_ver()
180 static int ice_info_netlist_build(struct ice_pf *pf, struct ice_info_ctx *ctx) in ice_info_netlist_build() argument
182 struct ice_netlist_info *netlist = &pf->hw.flash.netlist; in ice_info_netlist_build()
190 ice_info_pending_netlist_ver(struct ice_pf __always_unused *pf, struct ice_info_ctx *ctx) in ice_info_pending_netlist_ver() argument
205 ice_info_pending_netlist_build(struct ice_pf __always_unused *pf, struct ice_info_ctx *ctx) in ice_info_pending_netlist_build() argument
242 int (*getter)(struct ice_pf *pf, struct ice_info_ctx *ctx);
243 int (*fallback)(struct ice_pf *pf, struct ice_info_ctx *ctx);
274 struct ice_pf *pf = devlink_priv(devlink); in ice_devlink_info_get() local
275 struct device *dev = ice_pf_to_dev(pf); in ice_devlink_info_get()
276 struct ice_hw *hw = &pf->hw; in ice_devlink_info_get()
282 err = ice_wait_for_reset(pf, 10 * HZ); in ice_devlink_info_get()
341 ice_info_get_dsn(pf, ctx); in ice_devlink_info_get()
355 err = ice_devlink_versions[i].getter(pf, ctx); in ice_devlink_info_get()
367 err = ice_devlink_versions[i].fallback(pf, ctx); in ice_devlink_info_get()
424 struct ice_pf *pf = devlink_priv(devlink); in ice_devlink_flash_update() local
425 struct ice_hw *hw = &pf->hw; in ice_devlink_flash_update()
449 err = ice_check_for_pending_update(pf, NULL, extack); in ice_devlink_flash_update()
455 return ice_flash_pldm_image(pf, params->fw, preservation, extack); in ice_devlink_flash_update()
470 * ice_allocate_pf - Allocate devlink and return PF structure pointer
474 * the PF structure. The devlink memory is kept track of through devres by
495 * ice_devlink_register - Register devlink interface for this PF
496 * @pf: the PF to register the devlink for.
502 int ice_devlink_register(struct ice_pf *pf) in ice_devlink_register() argument
504 struct devlink *devlink = priv_to_devlink(pf); in ice_devlink_register()
505 struct device *dev = ice_pf_to_dev(pf); in ice_devlink_register()
518 * ice_devlink_unregister - Unregister devlink resources for this PF.
519 * @pf: the PF structure to cleanup
523 void ice_devlink_unregister(struct ice_pf *pf) in ice_devlink_unregister() argument
525 devlink_unregister(priv_to_devlink(pf)); in ice_devlink_unregister()
542 struct ice_pf *pf; in ice_devlink_create_port() local
545 /* Currently we only create devlink_port instances for PF VSIs */ in ice_devlink_create_port()
549 pf = vsi->back; in ice_devlink_create_port()
550 devlink = priv_to_devlink(pf); in ice_devlink_create_port()
551 dev = ice_pf_to_dev(pf); in ice_devlink_create_port()
552 pi = pf->hw.port_info; in ice_devlink_create_port()
604 struct ice_pf *pf = devlink_priv(devlink); in ice_devlink_nvm_snapshot() local
605 struct device *dev = ice_pf_to_dev(pf); in ice_devlink_nvm_snapshot()
606 struct ice_hw *hw = &pf->hw; in ice_devlink_nvm_snapshot()
661 struct ice_pf *pf = devlink_priv(devlink); in ice_devlink_devcaps_snapshot() local
662 struct device *dev = ice_pf_to_dev(pf); in ice_devlink_devcaps_snapshot()
663 struct ice_hw *hw = &pf->hw; in ice_devlink_devcaps_snapshot()
700 * @pf: the PF device structure
705 void ice_devlink_init_regions(struct ice_pf *pf) in ice_devlink_init_regions() argument
707 struct devlink *devlink = priv_to_devlink(pf); in ice_devlink_init_regions()
708 struct device *dev = ice_pf_to_dev(pf); in ice_devlink_init_regions()
711 nvm_size = pf->hw.flash.flash_size; in ice_devlink_init_regions()
712 pf->nvm_region = devlink_region_create(devlink, &ice_nvm_region_ops, 1, in ice_devlink_init_regions()
714 if (IS_ERR(pf->nvm_region)) { in ice_devlink_init_regions()
716 PTR_ERR(pf->nvm_region)); in ice_devlink_init_regions()
717 pf->nvm_region = NULL; in ice_devlink_init_regions()
720 pf->devcaps_region = devlink_region_create(devlink, in ice_devlink_init_regions()
723 if (IS_ERR(pf->devcaps_region)) { in ice_devlink_init_regions()
725 PTR_ERR(pf->devcaps_region)); in ice_devlink_init_regions()
726 pf->devcaps_region = NULL; in ice_devlink_init_regions()
732 * @pf: the PF device structure
734 * Remove previously created regions for this PF.
736 void ice_devlink_destroy_regions(struct ice_pf *pf) in ice_devlink_destroy_regions() argument
738 if (pf->nvm_region) in ice_devlink_destroy_regions()
739 devlink_region_destroy(pf->nvm_region); in ice_devlink_destroy_regions()
740 if (pf->devcaps_region) in ice_devlink_destroy_regions()
741 devlink_region_destroy(pf->devcaps_region); in ice_devlink_destroy_regions()