Skip to content

Commit 9a8385f

Browse files
kubalewskianguy11
authored andcommitted
ice: fix dpll periodic work data updates on PF reset
Do not allow dpll periodic work function to acquire data from firmware if PF reset is in progress. Acquiring data will cause dmesg errors as the firmware cannot respond or process the request properly during the reset time. Test by looping execution of below step until dmesg error appears: - perform PF reset $ echo 1 > /sys/class/net/<ice PF>/device/reset Fixes: d7999f5 ("ice: implement dpll interface to control cgu") Reviewed-by: Igor Bagnucki <[email protected]> Signed-off-by: Arkadiusz Kubalewski <[email protected]> Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]>
1 parent fc7fd1a commit 9a8385f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/net/ethernet/intel/ice/ice_dpll.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1364,8 +1364,10 @@ static void ice_dpll_periodic_work(struct kthread_work *work)
13641364
struct ice_pf *pf = container_of(d, struct ice_pf, dplls);
13651365
struct ice_dpll *de = &pf->dplls.eec;
13661366
struct ice_dpll *dp = &pf->dplls.pps;
1367-
int ret;
1367+
int ret = 0;
13681368

1369+
if (ice_is_reset_in_progress(pf->state))
1370+
goto resched;
13691371
mutex_lock(&pf->dplls.lock);
13701372
ret = ice_dpll_update_state(pf, de, false);
13711373
if (!ret)
@@ -1385,6 +1387,7 @@ static void ice_dpll_periodic_work(struct kthread_work *work)
13851387
ice_dpll_notify_changes(de);
13861388
ice_dpll_notify_changes(dp);
13871389

1390+
resched:
13881391
/* Run twice a second or reschedule if update failed */
13891392
kthread_queue_delayed_work(d->kworker, &d->work,
13901393
ret ? msecs_to_jiffies(10) :

0 commit comments

Comments
 (0)