Lines Matching full:pf

9 static void ice_info_get_dsn(struct ice_pf *pf, char *buf, size_t len)  in ice_info_get_dsn()  argument
14 put_unaligned_be64(pci_get_dsn(pf->pdev), dsn); in ice_info_get_dsn()
19 static int ice_info_pba(struct ice_pf *pf, char *buf, size_t len) in ice_info_pba() argument
21 struct ice_hw *hw = &pf->hw; in ice_info_pba()
31 static int ice_info_fw_mgmt(struct ice_pf *pf, char *buf, size_t len) in ice_info_fw_mgmt() argument
33 struct ice_hw *hw = &pf->hw; in ice_info_fw_mgmt()
41 static int ice_info_fw_api(struct ice_pf *pf, char *buf, size_t len) in ice_info_fw_api() argument
43 struct ice_hw *hw = &pf->hw; in ice_info_fw_api()
50 static int ice_info_fw_build(struct ice_pf *pf, char *buf, size_t len) in ice_info_fw_build() argument
52 struct ice_hw *hw = &pf->hw; in ice_info_fw_build()
59 static int ice_info_orom_ver(struct ice_pf *pf, char *buf, size_t len) in ice_info_orom_ver() argument
61 struct ice_orom_info *orom = &pf->hw.nvm.orom; in ice_info_orom_ver()
68 static int ice_info_nvm_ver(struct ice_pf *pf, char *buf, size_t len) in ice_info_nvm_ver() argument
70 struct ice_nvm_info *nvm = &pf->hw.nvm; in ice_info_nvm_ver()
77 static int ice_info_eetrack(struct ice_pf *pf, char *buf, size_t len) in ice_info_eetrack() argument
79 struct ice_nvm_info *nvm = &pf->hw.nvm; in ice_info_eetrack()
86 static int ice_info_ddp_pkg_name(struct ice_pf *pf, char *buf, size_t len) in ice_info_ddp_pkg_name() argument
88 struct ice_hw *hw = &pf->hw; in ice_info_ddp_pkg_name()
95 static int ice_info_ddp_pkg_version(struct ice_pf *pf, char *buf, size_t len) in ice_info_ddp_pkg_version() argument
97 struct ice_pkg_ver *pkg = &pf->hw.active_pkg_ver; in ice_info_ddp_pkg_version()
105 static int ice_info_ddp_pkg_bundle_id(struct ice_pf *pf, char *buf, size_t len) in ice_info_ddp_pkg_bundle_id() argument
107 snprintf(buf, len, "0x%08x", pf->hw.active_track_id); in ice_info_ddp_pkg_bundle_id()
112 static int ice_info_netlist_ver(struct ice_pf *pf, char *buf, size_t len) in ice_info_netlist_ver() argument
114 struct ice_netlist_ver_info *netlist = &pf->hw.netlist_ver; in ice_info_netlist_ver()
124 static int ice_info_netlist_build(struct ice_pf *pf, char *buf, size_t len) in ice_info_netlist_build() argument
126 struct ice_netlist_ver_info *netlist = &pf->hw.netlist_ver; in ice_info_netlist_build()
145 int (*getter)(struct ice_pf *pf, char *buf, size_t len);
176 struct ice_pf *pf = devlink_priv(devlink); in ice_devlink_info_get() local
187 ice_info_get_dsn(pf, buf, sizeof(buf)); in ice_devlink_info_get()
199 err = ice_devlink_versions[i].getter(pf, buf, sizeof(buf)); in ice_devlink_info_get()
249 struct ice_pf *pf = devlink_priv(devlink); in ice_devlink_flash_update() local
250 struct device *dev = &pf->pdev->dev; in ice_devlink_flash_update()
251 struct ice_hw *hw = &pf->hw; in ice_devlink_flash_update()
276 err = ice_check_for_pending_update(pf, NULL, extack); in ice_devlink_flash_update()
290 err = ice_flash_pldm_image(pf, fw, preservation, extack); in ice_devlink_flash_update()
310 * ice_allocate_pf - Allocate devlink and return PF structure pointer
314 * the PF structure. The devlink memory is kept track of through devres by
335 * ice_devlink_register - Register devlink interface for this PF
336 * @pf: the PF to register the devlink for.
342 int ice_devlink_register(struct ice_pf *pf) in ice_devlink_register() argument
344 struct devlink *devlink = priv_to_devlink(pf); in ice_devlink_register()
345 struct device *dev = ice_pf_to_dev(pf); in ice_devlink_register()
358 * ice_devlink_unregister - Unregister devlink resources for this PF.
359 * @pf: the PF structure to cleanup
363 void ice_devlink_unregister(struct ice_pf *pf) in ice_devlink_unregister() argument
365 devlink_unregister(priv_to_devlink(pf)); in ice_devlink_unregister()
382 struct ice_pf *pf; in ice_devlink_create_port() local
385 /* Currently we only create devlink_port instances for PF VSIs */ in ice_devlink_create_port()
389 pf = vsi->back; in ice_devlink_create_port()
390 devlink = priv_to_devlink(pf); in ice_devlink_create_port()
391 dev = ice_pf_to_dev(pf); in ice_devlink_create_port()
392 pi = pf->hw.port_info; in ice_devlink_create_port()
444 struct ice_pf *pf = devlink_priv(devlink); in ice_devlink_nvm_snapshot() local
445 struct device *dev = ice_pf_to_dev(pf); in ice_devlink_nvm_snapshot()
446 struct ice_hw *hw = &pf->hw; in ice_devlink_nvm_snapshot()
501 struct ice_pf *pf = devlink_priv(devlink); in ice_devlink_devcaps_snapshot() local
502 struct device *dev = ice_pf_to_dev(pf); in ice_devlink_devcaps_snapshot()
503 struct ice_hw *hw = &pf->hw; in ice_devlink_devcaps_snapshot()
540 * @pf: the PF device structure
545 void ice_devlink_init_regions(struct ice_pf *pf) in ice_devlink_init_regions() argument
547 struct devlink *devlink = priv_to_devlink(pf); in ice_devlink_init_regions()
548 struct device *dev = ice_pf_to_dev(pf); in ice_devlink_init_regions()
551 nvm_size = pf->hw.nvm.flash_size; in ice_devlink_init_regions()
552 pf->nvm_region = devlink_region_create(devlink, &ice_nvm_region_ops, 1, in ice_devlink_init_regions()
554 if (IS_ERR(pf->nvm_region)) { in ice_devlink_init_regions()
556 PTR_ERR(pf->nvm_region)); in ice_devlink_init_regions()
557 pf->nvm_region = NULL; in ice_devlink_init_regions()
560 pf->devcaps_region = devlink_region_create(devlink, in ice_devlink_init_regions()
563 if (IS_ERR(pf->devcaps_region)) { in ice_devlink_init_regions()
565 PTR_ERR(pf->devcaps_region)); in ice_devlink_init_regions()
566 pf->devcaps_region = NULL; in ice_devlink_init_regions()
572 * @pf: the PF device structure
574 * Remove previously created regions for this PF.
576 void ice_devlink_destroy_regions(struct ice_pf *pf) in ice_devlink_destroy_regions() argument
578 if (pf->nvm_region) in ice_devlink_destroy_regions()
579 devlink_region_destroy(pf->nvm_region); in ice_devlink_destroy_regions()
580 if (pf->devcaps_region) in ice_devlink_destroy_regions()
581 devlink_region_destroy(pf->devcaps_region); in ice_devlink_destroy_regions()