Skip to contentSkip to conversation

ice: dpll: fix initial lock status of dpll

PATCH In review Arkadiusz Kubalewski 2 participants 2 messages Oct 13, 2023 – Nov 2, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ice: dpll: fix initial lock status of dpll

When dpll device is registered and dpll subsystem performs notify of a new device, the lock state value provided to dpll subsystem equals 0 which is invalid value for the enum dpll_lock_status. Provide correct value by obtaining it from firmware before registering the dpll device.

Fixes d7999f5ea64b ("ice: implement dpll interface to control cgu")
---
 drivers/net/ethernet/intel/ice/ice_dpll.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/intel/ice/ice_dpll.c +1 -2
index 1faee9cb944d..69d20a203e40 100644
@@ -1549,6 +1549,7 @@ ice_dpll_init_dpll(struct ice_pf *pf, struct ice_dpll *d, bool cgu,
 	}
 	d->pf = pf;
 	if (cgu) {
+		ice_dpll_update_state(pf, d, true);
 		ret = dpll_device_register(d->dpll, type, &ice_dpll_ops, d);
 		if (ret) {
 			dpll_device_put(d->dpll);
@@ -1589,8 +1590,6 @@ static int ice_dpll_init_worker(struct ice_pf *pf)
 	struct ice_dplls *d = &pf->dplls;
 	struct kthread_worker *kworker;
 
-	ice_dpll_update_state(pf, &d->eec, true);
-	ice_dpll_update_state(pf, &d->pps, true);
 	kthread_init_delayed_work(&d->work, ice_dpll_periodic_work);
 	kworker = kthread_create_worker(0, "ice-dplls-%s",
 					dev_name(ice_pf_to_dev(pf)));
Signature · 6 lines
2.38.1

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Tested-by on v1 1/1
#1 lore raw
Quoted 13 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Arkadiusz Kubalewski
Sent: Friday, October 13, 2023 3:25 AM
To: [email protected]
Cc: Loktionov, Aleksandr <[email protected]>; Kubalewski, Arkadiusz <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-next] ice: dpll: fix initial lock status of dpll

When dpll device is registered and dpll subsystem performs notify of a new device, the lock state value provided to dpll subsystem equals 0 which is invalid value for the enum dpll_lock_status. Provide correct value by obtaining it from firmware before registering the dpll device.

Quoted 8 lines
Fixes d7999f5ea64b ("ice: implement dpll interface to control cgu")
---
 drivers/net/ethernet/intel/ice/ice_dpll.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan