dev_err(ice_pf_to_dev(pf), "PTP reset failed %d\n", err);
}
-static int ice_ptp_setup_adapter(struct ice_pf *pf)
+static void ice_ptp_setup_adapter(struct ice_pf *pf)
{
- if (!ice_pf_src_tmr_owned(pf) || !ice_is_primary(&pf->hw))
- return -EPERM;
-
pf->adapter->ctrl_pf = pf;
-
- return 0;
}
static int ice_ptp_setup_pf(struct ice_pf *pf)
/* If this function owns the clock hardware, it must allocate and
* configure the PTP clock device to represent it.
*/
- if (ice_pf_src_tmr_owned(pf) && ice_is_primary(hw)) {
- err = ice_ptp_setup_adapter(pf);
- if (err)
- goto err_exit;
+ if (ice_pf_src_tmr_owned(pf)) {
+ ice_ptp_setup_adapter(pf);
+
err = ice_ptp_init_owner(pf);
if (err)
goto err_exit;